public interface Scrollable
ScrollFrame
. A scrollable content object needs be able to determine its
size, and render itself at a given location.ScrollFrame
Modifier and Type | Method and Description |
---|---|
java.awt.Dimension |
getSize(DrawContext dc,
java.awt.Dimension frameSize)
Get the size of the object on screen.
|
long |
getUpdateTime()
Get the time in milliseconds since the Epoch at which the Scrollable contents last changed.
|
void |
renderScrollable(DrawContext dc,
java.awt.Point location,
java.awt.Dimension frameSize,
java.awt.Rectangle clipBounds)
Render the scrollable component.
|
void |
setHighlighted(boolean highlighted)
Set the highlight state of the content to match the frame.
|
java.awt.Dimension getSize(DrawContext dc, java.awt.Dimension frameSize)
dc
- Draw context.frameSize
- Size of the frame that will hold the the scrollable content. Implementations should be prepared
to handle a null
frame size because the frame may need to determine the content size
before it can determine its own size.long getUpdateTime()
ScrollFrame
uses this timestamp to determine if the contents have updated since they were last rendered. Only events that
might cause a change in the rendered content should change the update time.void renderScrollable(DrawContext dc, java.awt.Point location, java.awt.Dimension frameSize, java.awt.Rectangle clipBounds)
location
.in the rectangle specified by bounds
. Note that some of the content may be
clipped by the scroll frame.dc
- Draw context.location
- Point at which to draw the Scrollable contents. This point indicates the location of the lower
left corner of the content, in GL screen coordinates (origin at lower left corner of the
screen).frameSize
- Size of the frame that will hold the content.clipBounds
- Bounds of the clip rectangle. Any pixels outside of this box will be discarded, and do not need
to be drawn. The rectangle is specified in GL screen coordinates.void setHighlighted(boolean highlighted)
highlighted
- true
if the frame is highlighted.