Package gov.nasa.worldwind.util.tree
Interface Scrollable
-
- All Known Implementing Classes:
BasicTreeLayout
public interface ScrollableAn object that can be rendered in aScrollFrame. A scrollable content object needs be able to determine its size, and render itself at a given location.- See Also:
ScrollFrame
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.DimensiongetSize(DrawContext dc, java.awt.Dimension frameSize)Get the size of the object on screen.longgetUpdateTime()Get the time in milliseconds since the Epoch at which the Scrollable contents last changed.voidrenderScrollable(DrawContext dc, java.awt.Point location, java.awt.Dimension frameSize, java.awt.Rectangle clipBounds)Render the scrollable component.voidsetHighlighted(boolean highlighted)Set the highlight state of the content to match the frame.
-
-
-
Method Detail
-
renderScrollable
void renderScrollable(DrawContext dc, java.awt.Point location, java.awt.Dimension frameSize, java.awt.Rectangle clipBounds)
Render the scrollable component. The component should render itself with the lower left corner of the content located atlocation.in the rectangle specified bybounds. Note that some of the content may be clipped by the scroll frame.- Parameters:
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.
-
getSize
java.awt.Dimension getSize(DrawContext dc, java.awt.Dimension frameSize)
Get the size of the object on screen.- Parameters:
dc- Draw context.frameSize- Size of the frame that will hold the the scrollable content. Implementations should be prepared to handle anullframe size because the frame may need to determine the content size before it can determine its own size.- Returns:
- The size of the scrollable object.
-
setHighlighted
void setHighlighted(boolean highlighted)
Set the highlight state of the content to match the frame.- Parameters:
highlighted-trueif the frame is highlighted.
-
getUpdateTime
long getUpdateTime()
Get the time in milliseconds since the Epoch at which the Scrollable contents last changed.ScrollFrameuses 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.- Returns:
- Time at which the contents were last updated.
-
-