public class ScrollFrame extends DragControl implements PreRenderable, Renderable
Modifier and Type | Field and Description |
---|---|
protected FrameAttributes |
activeAttributes
Active attributes, either normal or highlight.
|
protected Size |
activeSize
The size of the active frame, minimized or maximized.
|
protected Animation |
animation
The active animation that is currently playing.
|
protected int |
animationDelay
Delay in milliseconds between frames of an animation.
|
protected java.awt.geom.Point2D |
awtScreenPoint
Indicates the location of the upper left corner of the frame, in AWT coordinates (origin at the upper left corner
of the screen.
|
protected OGLStackHandler |
BEogsh
Support for setting up and restoring OpenGL state during rendering.
|
protected int |
borderPickWidth
Width of the pickable frame border.
|
protected int |
buttonSize
The size, in pixels, of the frame's minimize button.
|
protected java.awt.Rectangle |
contentBounds
Bounds of the content part of the frame.
|
protected Scrollable |
contents
The contents of the frame.
|
protected java.awt.Dimension |
contentSize
Total size of the frame content.
|
protected static int |
DEFAULT_ANIMATION_DELAY
Default delay (in milliseconds) between frame when the frame is animating.
|
protected static int |
DEFAULT_BUTTON_SIZE
Default size of the minimize button.
|
protected static int |
DEFAULT_FRAME_BORDER_PICK_WIDTH
Default width of the pickable frame border.
|
protected static int |
DEFAULT_FRAME_BORDER_WIDTH
Default width of the frame border.
|
protected static int |
DEFAULT_LINE_WIDTH
Default width of lines used to draw the frame.
|
protected static Size |
DEFAULT_MAXIMIZED_SIZE
Default size of the maximized frame.
|
protected static int |
DEFAULT_SCROLL_BAR_SIZE
Default width of the scroll bars.
|
protected static int |
DEFAULT_TEXTURE_TILE_DIMENSION
Default dimension of tiles in the backing texture.
|
protected static int |
DEFAULT_TITLE_BAR_HEIGHT
Default height of the frame title bar.
|
protected static FrameAttributes |
defaultAttributes
The attributes used if attributes are not specified.
|
protected boolean |
drawTitleBar
Indicates whether or not to draw a title bar in the frame.
|
protected boolean |
enableMove
Indicates whether or not the user can move the frame by dragging with the mouse.
|
protected boolean |
enableResize
Indicates whether or not the user can resize the frame by dragging the edge.
|
protected int |
frameBorder
The width of the frame border.
|
protected java.awt.Rectangle |
frameBounds
Bounds of the full frame.
|
protected int |
frameLineWidth
The width of lines used to draw the frame.
|
protected long |
frameNumber |
protected FrameResizeControl |
frameResizeControl
Control to handle resizing the frame.
|
protected java.awt.Dimension |
frameSize
Size of the frame.
|
protected java.lang.String |
frameTitle
The full frame title.
|
protected int |
frameTitleWidth
Width of the frame title area.
|
protected FrameAttributes |
highlightAttributes
Attributes to use when the frame is highlighted.
|
protected boolean |
highlighted
Indicates whether or not the frame is highlighted.
|
protected ScrollBar |
horizontalScrollBar
Scroll bar to control horizontal scrolling.
|
protected java.lang.Object |
iconImageSource
Image source for the icon drawn in the upper left corner of the frame.
|
protected java.awt.Rectangle |
innerBounds
Bounds of the frame inside the frame border.
|
protected Size |
maximizedSize
The size of the maximized frame.
|
protected Size |
maxSize
The maximum size of the frame.
|
protected Animation |
minimizeAnimation
An animation to play when the frame is minimized or maximized.
|
protected HotSpot |
minimizeButton
HotSpot to handle user input on the minimize button.
|
protected boolean |
minimized
Indicates whether or not the frame is minimized.
|
protected Size |
minimizedSize
The size of the minimized frame.
|
protected boolean |
mustRecomputeFrameGeometry
Indicates that the frame must be regenerated because the size or attributes have changed.
|
protected FrameAttributes |
normalAttributes
Attributes to use when the frame is not highlighted.
|
protected java.awt.Rectangle |
pickBounds
Bounds of the pickable area.
|
protected PickSupport |
pickSupport
Support for setting up and restoring picking state, and resolving the picked object.
|
protected boolean |
renderToTexture
Indicates whether the contents should be rendered into a texture and cached, or rendered directly.
|
protected OGLRenderToTextureSupport |
rttSupport
Support class used to render to an offscreen texture.
|
protected Offset |
screenLocation
Indicates the location of the upper left corner of the frame.
|
protected int |
scrollBarSize
The width of the frame scroll bar.
|
protected java.awt.Rectangle |
scrollContentBounds |
protected java.awt.Font |
shortFrameTitleFont
Font used to generate
shortTitle . |
protected java.lang.String |
shortTitle
Frame title that is actually drawn in the title bar.
|
protected java.awt.geom.Rectangle2D |
shortTitleBounds
Text bounds of the
shortTitle . |
protected boolean |
showHorizontalScrollbar
Indicates whether or not the horizontal scroll bar must be drawn.
|
protected boolean |
showVerticalScrollbar
Indicates whether or not the vertical scroll bar must be drawn.
|
protected BasicWWTexture |
texture
Texture for the icon displayed in the frame title bar.
|
protected java.lang.Object |
textureCacheKey
Cache key used to locate the rendering texture in the DrawContext's texture cache.
|
protected int |
textureDimension
Dimension of the texture used to render the scrollable content.
|
protected int |
textureTileDimension
Dimension of a sub-tile in the rendering texture.
|
protected java.util.Map<gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile,gov.nasa.worldwind.util.tree.ScrollFrame.TextureTile> |
textureTileMap
Map that associates logical tiles in the scrollable content with allocated tiles in the texture used to render
the content.
|
protected java.util.List<gov.nasa.worldwind.util.tree.ScrollFrame.TextureTile> |
textureTiles
List to manage sub-tiles of the rendering texture.
|
protected java.util.List<gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile> |
tiles |
protected int |
titleBarHeight
The height, in pixels, of the frame title bar.
|
protected java.nio.DoubleBuffer |
vertexBuffer
The frame geometry vertices passed to OpenGL.
|
protected ScrollBar |
verticalScrollBar
Scroll bar to control vertical scrolling.
|
dragging, dragRefPoint
parent
active
Constructor and Description |
---|
ScrollFrame()
Create a new scroll frame.
|
ScrollFrame(int x,
int y)
Create a scroll frame with a position.
|
ScrollFrame(Offset screenLocation)
Create a scroll positioned with an Offset.
|
Modifier and Type | Method and Description |
---|---|
protected gov.nasa.worldwind.util.tree.ScrollFrame.TextureTile |
allocateTextureTile(gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile tile)
Allocate a texture tile for a ContentTile.
|
protected void |
assembleTiles(int rows,
int columns)
Build the list of ContentTile that represents the logical tiles in the frame contents.
|
protected void |
beginDrag(java.awt.Point point)
Called when a drag begins.
|
protected void |
beginDrawing(DrawContext dc) |
protected java.awt.Rectangle |
computeBounds(boolean showVerticalScrollBar,
boolean showHorizontalScrollBar)
Compute the content bounds, taking into account the frame size and the presence of scroll bars.
|
protected void |
computeFrameGeometry()
Updates the frame's screen-coordinate geometry in
vertexBuffer according to the current screen bounds. |
protected java.awt.Dimension |
computeFrameRectForContentRect(java.awt.Dimension contentSize)
Compute the size of the frame rectangle required to accommodate a given content size without displaying scroll
bars.
|
protected int |
computeTileTextureDimension(java.awt.Dimension frameSize,
java.awt.Dimension contentSize)
Compute the dimension of a texture large enough to represent the amount of the contents visible in the frame.
|
protected Texture |
createTileTexture(DrawContext dc,
int width,
int height)
Returns a new tile texture with the specified width and height.
|
protected void |
determineActiveAttributes()
Determines which attributes -- normal, highlight or default -- to use each frame.
|
protected void |
determineScrollbarAttributes()
Update the attributes of the scroll bars to match the frame's highlight state.
|
protected void |
determineSize()
Determine the frame size to use for the current frame.
|
protected void |
doScroll(java.awt.event.MouseWheelEvent e)
Handle a mouse wheel event.
|
protected void |
doScrollMacOS(java.awt.event.MouseWheelEvent e)
Handle a mouse wheel event on Mac OS X.
|
void |
drag(java.awt.Point point)
Called for each point within a drag action.
|
protected void |
drawContentDirect(DrawContext dc)
Draw the frame contents directly (not using previously generated tiles).
|
protected void |
drawContentTiles(DrawContext dc)
Draw the frame contents using previously build texture tiles.
|
protected void |
drawFrame(DrawContext dc)
Draw the frame, scroll bars, and title bar.
|
protected void |
drawIcon(DrawContext dc,
java.awt.Point drawPoint)
Draw an icon in the upper left corner of the title bar.
|
protected void |
drawMaximized(DrawContext dc)
Draw the frame in its maximized state.
|
protected void |
drawMinimizeButton(DrawContext dc)
Draw the minimize/maximize button in the frame title bar.
|
protected void |
drawMinimized(DrawContext dc)
Draw the frame in its minimized state.
|
protected void |
drawScrollBars(DrawContext dc)
Draw visible scroll bars for the frame.
|
protected void |
drawTitleBar(DrawContext dc)
Draw the title bar.
|
protected void |
drawTitleText(DrawContext dc,
java.awt.Point drawPoint)
Draw text in the frame title.
|
protected void |
endDrawing(DrawContext dc) |
protected void |
forceTileUpdate()
Force all tiles to update on the next frame.
|
protected void |
generateShortTitle(DrawContext dc,
java.lang.String frameTitle,
int width,
java.lang.String cutOff)
Generate a shortened version of the frame title that will fit in the frame title area.
|
protected FrameAttributes |
getActiveAttributes()
Get the currently active frame attributes.
|
protected Size |
getActiveSize()
Indicates the size that applies to the frame for this frame, either the maximumed or the minimized size.
|
FrameAttributes |
getAttributes()
Indicates the frame attributes used to draw the frame when it is not highlighted.
|
java.awt.Rectangle |
getBounds(DrawContext dc)
Get the bounds of the tree frame.
|
Scrollable |
getContents()
Indicates the frame contents.
|
protected java.awt.Rectangle |
getContentTileBounds(int row,
int column)
Get the bounds of a tile in the frame content.
|
java.awt.Dimension |
getCurrentSize()
Return the amount of screen that space that the frame is currently using.
|
java.lang.String |
getFrameTitle()
Get the title of the tree frame.
|
FrameAttributes |
getHighlightAttributes()
Indicates the frame attributes used to draw the frame when it is highlighted.
|
java.lang.Object |
getIconImageSource()
Get the image source for the frame icon.
|
Size |
getMaxSize()
Indicates the maximum size of frame.
|
Animation |
getMinimizeAnimation()
Get the animation that is played when the tree frame is minimized.
|
Size |
getMinimizedSize()
Indicates the size of the minimized tree frame.
|
protected java.awt.Dimension |
getMinimumSize()
Get the smallest dimension that the frame can draw itself.
|
protected int |
getMouseWheelScrollUnit(java.lang.String direction)
Get the scroll unit that the mouse wheel scrolls by.
|
Offset |
getScreenLocation()
Get the location of the upper left corner of the tree, measured in screen coordinates with the origin at the
upper left corner of the screen.
|
protected java.awt.geom.Point2D |
getScreenPoint()
Get the location of the upper left corner of the frame, measured from the upper left corner of the screen.
|
ScrollBar |
getScrollBar(java.lang.String direction)
Get a reference to one of the frame's scroll bars.
|
Size |
getSize()
Get the size of tree frame.
|
protected BasicWWTexture |
getTexture()
Get the texture loaded for the icon image source.
|
protected gov.nasa.worldwind.util.tree.ScrollFrame.TextureTile |
getTextureTile(gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile tile)
Get the texture tile allocated for a ContentTile in the frame content.
|
int |
getTitleBarHeight()
Indicates the height, in pixels, of the frame title bar.
|
protected BasicWWTexture |
initializeTexture()
Create and initialize the texture from the image source.
|
protected void |
initializeUIControls()
Initialize controls to resizing the frame, minimizing the frame, etc.
|
protected boolean |
intersectsFrustum(DrawContext dc)
Determines whether the frame intersects the view frustum.
|
protected boolean |
isAnimating()
Determines if the frame is currently animating.
|
protected boolean |
isDrawMinimized()
Determines if the frame should draw in its minimized form.
|
boolean |
isDrawTitleBar()
Does the frame have a title bar?
|
boolean |
isEnableMove()
Specifies whether the user can move the frame by dragging the title bar.
|
boolean |
isEnableResizeControl()
Indicates whether or not the user can resize the frame by dragging the frame border.
|
boolean |
isHighlighted()
Indicates whether or not the frame is highlighted.
|
boolean |
isMinimized()
Indicates if the frame is minimized.
|
protected boolean |
isRelativeSize(Size size)
Determines if the frame size is relative to the size of the scrollable content (as opposed to an absolute pixel
value, or a fraction of the viewport).
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Forwards the event to the parent HotSpot if the parent is non-null.
|
protected boolean |
mustGenerateShortTitle(java.awt.Font titleFont,
int titleAreaWidth)
Determine if a the shortened frame title needs to be regenerated.
|
protected boolean |
mustShowHorizontalScrollbar(java.awt.Dimension contentSize)
Determine if the horizontal scrollbar should be displayed.
|
protected boolean |
mustShowVerticalScrollbar(java.awt.Dimension contentSize)
Determine if the vertical scrollbar should be displayed.
|
protected boolean |
mustUpdateTile(gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile tile,
long contentUpdateTime)
Determine if a tile in the content layout needs to be updated.
|
protected boolean |
mustUpdateTiles(DrawContext dc)
Indicates whether or not any of the the rendered tiles must be updated.
|
void |
preRender(DrawContext dc) |
void |
render(DrawContext dc)
Causes this
Renderable to render itself using the provided draw context. |
void |
selected(SelectEvent event)
Handle a
SelectEvent and call DragControl.beginDrag(java.awt.Point) , DragControl.drag(java.awt.Point) ,
DragControl.endDrag() as appropriate. |
void |
setAttributes(FrameAttributes attributes)
Specifies the frame attributes used to draw the frame when it is not highlighted.
|
void |
setContents(Scrollable contents)
Specifies the frame contents.
|
void |
setDrawTitleBar(boolean drawTitleBar)
Set whether the frame has a title bar.
|
void |
setEnableMove(boolean enable)
Specifies whether the user can move the frame by dragging the title bar.
|
void |
setEnableResizeControl(boolean enable)
Specifies whether the user can resize the frame by dragging the border.
|
void |
setFrameTitle(java.lang.String frameTitle)
Set the title of the tree frame.
|
void |
setHighlightAttributes(FrameAttributes attributes)
Specifies the frame attributes used to draw the frame when it is highlighted.
|
void |
setHighlighted(boolean highlighted)
Sets the frame its highlighted or not highlighted state.
|
void |
setIconImageSource(java.lang.Object imageSource)
Set the image source of the frame icon.
|
void |
setMaxSize(Size size)
Specifies the maximum size of the frame.
|
void |
setMinimizeAnimation(Animation minimizeAnimation)
Set the animation that is played when the tree frame is minimized.
|
void |
setMinimized(boolean minimized)
Sets the frame to its minimized or maximized state.
|
void |
setMinimizedSize(Size size)
Specifies the size of the minimized tree frame.
|
void |
setScreenLocation(Offset screenLocation)
Set the location of the upper left corner of the tree, measured in screen coordinates with the origin at the
upper left corner of the screen.
|
void |
setSize(Size size)
Set the size of the frame.
|
void |
setTitleBarHeight(int titleBarHeight)
Specifies the height, in pixels, of the frame title bar.
|
protected void |
stepAnimation(DrawContext dc)
Increment the active animation.
|
void |
updateBounds(DrawContext dc)
Compute the bounds of the content frame, and the extents of the scroll range.
|
protected void |
updateTile(DrawContext dc,
gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile tile,
java.awt.Rectangle tileBounds)
Draws the current list of ScrollableTiles into the texture tiles.
|
protected void |
updateTiles(DrawContext dc)
Update content tiles that have been rendered to a texture.
|
endDrag, isDragging
mouseClicked, mousePressed, mouseReleased
getCursor, isActive, isConsumed, keyPressed, keyReleased, keyTyped, mouseDragged, mouseEntered, mouseExited, mouseMoved, setActive
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected FrameAttributes activeAttributes
protected Size activeSize
protected Animation animation
protected int animationDelay
protected java.awt.geom.Point2D awtScreenPoint
protected OGLStackHandler BEogsh
protected int borderPickWidth
protected int buttonSize
protected java.awt.Rectangle contentBounds
protected Scrollable contents
protected java.awt.Dimension contentSize
protected static final int DEFAULT_ANIMATION_DELAY
protected static final int DEFAULT_BUTTON_SIZE
protected static final int DEFAULT_FRAME_BORDER_PICK_WIDTH
protected static final int DEFAULT_FRAME_BORDER_WIDTH
protected static final int DEFAULT_LINE_WIDTH
protected static final Size DEFAULT_MAXIMIZED_SIZE
protected static final int DEFAULT_SCROLL_BAR_SIZE
protected static final int DEFAULT_TEXTURE_TILE_DIMENSION
protected static final int DEFAULT_TITLE_BAR_HEIGHT
protected static final FrameAttributes defaultAttributes
protected boolean drawTitleBar
protected boolean enableMove
protected boolean enableResize
protected int frameBorder
protected java.awt.Rectangle frameBounds
protected int frameLineWidth
protected long frameNumber
protected FrameResizeControl frameResizeControl
protected java.awt.Dimension frameSize
protected java.lang.String frameTitle
protected int frameTitleWidth
protected FrameAttributes highlightAttributes
protected boolean highlighted
protected ScrollBar horizontalScrollBar
protected java.lang.Object iconImageSource
protected java.awt.Rectangle innerBounds
protected Size maximizedSize
protected Size maxSize
protected Animation minimizeAnimation
protected HotSpot minimizeButton
protected boolean minimized
protected Size minimizedSize
protected boolean mustRecomputeFrameGeometry
protected FrameAttributes normalAttributes
protected java.awt.Rectangle pickBounds
protected PickSupport pickSupport
protected boolean renderToTexture
protected OGLRenderToTextureSupport rttSupport
protected Offset screenLocation
protected int scrollBarSize
protected java.awt.Rectangle scrollContentBounds
protected java.awt.Font shortFrameTitleFont
shortTitle
.protected java.lang.String shortTitle
protected java.awt.geom.Rectangle2D shortTitleBounds
shortTitle
.protected boolean showHorizontalScrollbar
protected boolean showVerticalScrollbar
protected BasicWWTexture texture
iconImageSource
.protected final java.lang.Object textureCacheKey
protected int textureDimension
protected int textureTileDimension
protected java.util.Map<gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile,gov.nasa.worldwind.util.tree.ScrollFrame.TextureTile> textureTileMap
protected java.util.List<gov.nasa.worldwind.util.tree.ScrollFrame.TextureTile> textureTiles
protected java.util.List<gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile> tiles
protected int titleBarHeight
protected java.nio.DoubleBuffer vertexBuffer
protected ScrollBar verticalScrollBar
public ScrollFrame()
public ScrollFrame(int x, int y)
x
- x coordinate of the upper left corner of the frame, in AWT screen coordinates (origin upper left corner
of the screen).y
- y coordinate of the upper left corner of the frame, in AWT screen coordinates (origin upper left corner
of the screen).public ScrollFrame(Offset screenLocation)
screenLocation
- initial location of the upper left corner of the frame.protected gov.nasa.worldwind.util.tree.ScrollFrame.TextureTile allocateTextureTile(gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile tile)
tile
- ScrollableTile for which to allocate a texture tile.protected void assembleTiles(int rows, int columns)
rows
- Number of rows of tiles in the contents.columns
- Number of columns of tiles.protected void beginDrag(java.awt.Point point)
DragControl
DragControl.dragRefPoint
.beginDrag
in class DragControl
point
- Point at which dragging started.protected void beginDrawing(DrawContext dc)
protected java.awt.Rectangle computeBounds(boolean showVerticalScrollBar, boolean showHorizontalScrollBar)
showVerticalScrollBar
- True if the frame will have a vertical scroll bar. A vertical scroll bar will make
the content frame narrower.showHorizontalScrollBar
- True if the frame will have a horizontal scroll bar. A horizontal scroll bar will
make the content frame shorter.protected void computeFrameGeometry()
vertexBuffer
according to the current screen bounds.protected java.awt.Dimension computeFrameRectForContentRect(java.awt.Dimension contentSize)
contentSize
- Size of the frame content.protected int computeTileTextureDimension(java.awt.Dimension frameSize, java.awt.Dimension contentSize)
frameSize
- Size of the frame content area.contentSize
- Size of the frame content.protected Texture createTileTexture(DrawContext dc, int width, int height)
width
- the texture's width, in pixels.height
- the texture's height, in pixels.protected void determineActiveAttributes()
protected void determineScrollbarAttributes()
protected void determineSize()
protected void doScroll(java.awt.event.MouseWheelEvent e)
e
- Mouse event that triggered the scroll.protected void doScrollMacOS(java.awt.event.MouseWheelEvent e)
e
- Mouse event that triggered the scroll.public void drag(java.awt.Point point)
DragControl
drag
in class DragControl
point
- Current drag point.protected void drawContentDirect(DrawContext dc)
dc
- Current draw context.protected void drawContentTiles(DrawContext dc)
dc
- Current draw context.protected void drawFrame(DrawContext dc)
dc
- Current draw context.protected void drawIcon(DrawContext dc, java.awt.Point drawPoint)
dc
- Draw contextdrawPoint
- Point at which to draw the icon. This point is relative to the lower left corner of the title
bar. This point will be modified to indicate how much horizontal space was consumed by drawing
the icon. After drawing the icon, the x value with point to the first available space to the
right of the icon.protected void drawMaximized(DrawContext dc)
dc
- Current draw context.protected void drawMinimizeButton(DrawContext dc)
dc
- Current draw context.protected void drawMinimized(DrawContext dc)
dc
- Current draw context.protected void drawScrollBars(DrawContext dc)
dc
- Current draw context.protected void drawTitleBar(DrawContext dc)
dc
- Draw contextprotected void drawTitleText(DrawContext dc, java.awt.Point drawPoint)
dc
- Draw contextdrawPoint
- Point at which to draw text. This point is relative to the lower left corner of the title bar.protected void endDrawing(DrawContext dc)
protected void forceTileUpdate()
protected void generateShortTitle(DrawContext dc, java.lang.String frameTitle, int width, java.lang.String cutOff)
shortTitle
, shortFrameTitleFont
, frameTitleWidth
.dc
- Current draw context.frameTitle
- Full frame title.width
- Width in pixels of the frame title area.cutOff
- String to append to title to indicate that text has been cut off due to a small frame. For
example, if the cut off string is "...", the string "Frame Title" might be shortened to "Frame
T...".protected FrameAttributes getActiveAttributes()
protected Size getActiveSize()
public FrameAttributes getAttributes()
public java.awt.Rectangle getBounds(DrawContext dc)
dc
- Draw contextpublic Scrollable getContents()
protected java.awt.Rectangle getContentTileBounds(int row, int column)
row
- Row of the tile to get the bounds of.column
- Column of the tile to get the bounds of.public java.awt.Dimension getCurrentSize()
public java.lang.String getFrameTitle()
setFrameTitle(String)
public FrameAttributes getHighlightAttributes()
public java.lang.Object getIconImageSource()
setIconImageSource(Object)
public Size getMaxSize()
getSize()
).null
indicates no maximum.public Animation getMinimizeAnimation()
setMinimizeAnimation(Animation)
public Size getMinimizedSize()
null
indicates that there is no minimized size, in which case
the normal maximized frame size is used in the minimized state.protected java.awt.Dimension getMinimumSize()
protected int getMouseWheelScrollUnit(java.lang.String direction)
direction
- Direction of scroll.public Offset getScreenLocation()
protected java.awt.geom.Point2D getScreenPoint()
public ScrollBar getScrollBar(java.lang.String direction)
direction
- Determines which scroll bar to get. Either AVKey.VERTICAL
or AVKey.HORIZONTAL
.public Size getSize()
getMinimizedSize()
protected BasicWWTexture getTexture()
protected gov.nasa.worldwind.util.tree.ScrollFrame.TextureTile getTextureTile(gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile tile)
tile
- ContentTile for which to get a texture tile.null
if no TextureTile has been allocated.public int getTitleBarHeight()
isDrawTitleBar()
protected BasicWWTexture initializeTexture()
protected void initializeUIControls()
protected boolean intersectsFrustum(DrawContext dc)
dc
- the current draw context.true
If the frame intersects the frustum, otherwise false
.protected boolean isAnimating()
true
if an animation is in progress, otherwise false
.protected boolean isDrawMinimized()
true
if the frame should draw minimized, otherwise false
.public boolean isDrawTitleBar()
public boolean isEnableMove()
true
if the user can allowed to move the frame by dragging the title bar.public boolean isEnableResizeControl()
true
if the user can resize the frame by dragging.public boolean isHighlighted()
true
if the frame is highlighted, otherwise false
.public boolean isMinimized()
true
if the frame is minimized.protected boolean isRelativeSize(Size size)
size
- Size to test.true
if the absolute size of size
depends on the size of the frame content.public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
TreeHotSpot
mouseWheelMoved
in interface HotSpot
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
mouseWheelMoved
in class TreeHotSpot
e
- The event to handle.protected boolean mustGenerateShortTitle(java.awt.Font titleFont, int titleAreaWidth)
titleFont
- Title font.titleAreaWidth
- Width in pixels of the frame title area.true
if the shortened title needs to be regenerated, otherwise false
.protected boolean mustShowHorizontalScrollbar(java.awt.Dimension contentSize)
contentSize
- The total size, in pixels, of the scrollable content.true
if the horizontal scrollbar should be displayed, otherwise false
.protected boolean mustShowVerticalScrollbar(java.awt.Dimension contentSize)
contentSize
- The total size, in pixels, of the scrollable content.true
if the vertical scrollbar should be displayed, otherwise false
.protected boolean mustUpdateTile(gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile tile, long contentUpdateTime)
tile
- Tile to test.contentUpdateTime
- Time at which the content was last updated.true
if the tile needs to be updated. Always returns false
if the tile is not visible in
the current frame bounds.protected boolean mustUpdateTiles(DrawContext dc)
dc
- Current draw context.true
if any of the tiles need to be updated.public void preRender(DrawContext dc)
preRender
in interface PreRenderable
public void render(DrawContext dc)
Renderable
to render itself using the provided draw context.render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
public void selected(SelectEvent event)
DragControl
SelectEvent
and call DragControl.beginDrag(java.awt.Point)
, DragControl.drag(java.awt.Point)
,
DragControl.endDrag()
as appropriate. Subclasses may override this method if they need to handle events other than
drag events.selected
in interface SelectListener
selected
in interface HotSpot
selected
in class DragControl
event
- Select event.public void setAttributes(FrameAttributes attributes)
attributes
- new attributes bundle for normal state.public void setContents(Scrollable contents)
contents
- new frame contents.public void setDrawTitleBar(boolean drawTitleBar)
drawTitleBar
- True if the frame will draw a title bar.setTitleBarHeight(int)
public void setEnableMove(boolean enable)
enable
- true
if the user is allowed to move the frame by dragging.public void setEnableResizeControl(boolean enable)
enable
- true
to allow the user to resize the frame by dragging the border.public void setFrameTitle(java.lang.String frameTitle)
frameTitle
- New frame title.getFrameTitle()
public void setHighlightAttributes(FrameAttributes attributes)
attributes
- new attributes bundle for highlight state.public void setHighlighted(boolean highlighted)
highlighted
- true
if the frame is now highlighted.public void setIconImageSource(java.lang.Object imageSource)
imageSource
- New image source. May be a String, URL, or BufferedImage.public void setMaxSize(Size size)
getSize()
).size
- the maximum size of the minimized frame. Set null
for no maximum.public void setMinimizeAnimation(Animation minimizeAnimation)
minimizeAnimation
- New minimize animation.getMinimizeAnimation()
public void setMinimized(boolean minimized)
minimized
- true
if the frame must be minimized. false
if the frame must not be minimized.public void setMinimizedSize(Size size)
size
- the size of the minimized frame. Set null
to use the same size in maximized and minimized
states.public void setScreenLocation(Offset screenLocation)
screenLocation
- New screen location.public void setSize(Size size)
size
- New size.setMinimizedSize(gov.nasa.worldwind.render.Size)
public void setTitleBarHeight(int titleBarHeight)
titleBarHeight
- new height, in pixels.protected void stepAnimation(DrawContext dc)
dc
- Current draw context.public void updateBounds(DrawContext dc)
dc
- Current draw context.protected void updateTile(DrawContext dc, gov.nasa.worldwind.util.tree.ScrollFrame.ContentTile tile, java.awt.Rectangle tileBounds)
dc
- the draw context the tile relates to.tile
- the tile to update. A new texture tile will be allocated for the tile, if the tile does not
have a texture.tileBounds
- bounds of the tile being updated, within the larger texture.protected void updateTiles(DrawContext dc)
dc
- Current draw context.