Package gov.nasa.worldwind.util.tree
Class FrameResizeControl
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.util.AbstractHotSpot
-
- gov.nasa.worldwind.util.AbstractResizeHotSpot
-
- gov.nasa.worldwind.util.tree.FrameResizeControl
-
- All Implemented Interfaces:
AVList,SelectListener,HotSpot,java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.MouseWheelListener,java.util.EventListener
public class FrameResizeControl extends AbstractResizeHotSpot
A screen control for resizing a frame. This class handles the resize input events, but does does not actually draw the resize control.
-
-
Field Summary
Fields Modifier and Type Field Description protected ScrollFrameframe-
Fields inherited from class gov.nasa.worldwind.util.AbstractResizeHotSpot
adjustLocationX, adjustLocationY, allowHorizontalResize, allowVerticalResize, cursor, dragging, dragRefPoint, EAST, NORTH, NORTHEAST, NORTHWEST, refLocation, refSize, SOUTH, SOUTHEAST, SOUTHWEST, WEST, xSign, ySign
-
Fields inherited from class gov.nasa.worldwind.util.AbstractHotSpot
active
-
-
Constructor Summary
Constructors Constructor Description FrameResizeControl(ScrollFrame frame)Create a resize control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbeginDrag(java.awt.Point point)protected voidendDrag()Called when a drag action ends.protected java.awt.DimensiongetMinimumSize()Get the minimum size of the frame.protected java.awt.PointgetScreenPoint()Get the screen point of the upper left corner of the frame.protected java.awt.DimensiongetSize()Get the size of the frame.voidmouseWheelMoved(java.awt.event.MouseWheelEvent event)Forwards mouse wheel events to the frame, so that the contents can be scrolled when the mouse is over the resize area.protected voidsetScreenPoint(java.awt.Point newPoint)Set the screen point of the upper left corner of the frame.protected voidsetSize(java.awt.Dimension newSize)Set the size of the frame.-
Methods inherited from class gov.nasa.worldwind.util.AbstractResizeHotSpot
drag, getCursor, isDragging, isValidSize, mouseMoved, selected, setActive, setDirection, setDirection, setDirectionFromPoint
-
Methods inherited from class gov.nasa.worldwind.util.AbstractHotSpot
isActive, isConsumed, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
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
-
-
-
-
Field Detail
-
frame
protected ScrollFrame frame
-
-
Constructor Detail
-
FrameResizeControl
public FrameResizeControl(ScrollFrame frame)
Create a resize control.- Parameters:
frame- Frame to resize.
-
-
Method Detail
-
beginDrag
protected void beginDrag(java.awt.Point point)
- Overrides:
beginDragin classAbstractResizeHotSpot
-
endDrag
protected void endDrag()
Called when a drag action ends. This implementation setsAbstractResizeHotSpot.dragRefPointto null.- Overrides:
endDragin classAbstractResizeHotSpot
-
getSize
protected java.awt.Dimension getSize()
Get the size of the frame.- Specified by:
getSizein classAbstractResizeHotSpot- Returns:
- Frame size in pixels.
-
setSize
protected void setSize(java.awt.Dimension newSize)
Set the size of the frame.- Specified by:
setSizein classAbstractResizeHotSpot- Parameters:
newSize- New frame size in pixels.
-
getScreenPoint
protected java.awt.Point getScreenPoint()
Get the screen point of the upper left corner of the frame.- Specified by:
getScreenPointin classAbstractResizeHotSpot- Returns:
- Screen point measured from upper left corner of the screen (AWT coordinates).
-
setScreenPoint
protected void setScreenPoint(java.awt.Point newPoint)
Set the screen point of the upper left corner of the frame.- Specified by:
setScreenPointin classAbstractResizeHotSpot- Parameters:
newPoint- New screen point measured from upper left corner of the screen (AWT coordinates).
-
getMinimumSize
protected java.awt.Dimension getMinimumSize()
Get the minimum size of the frame. The user is not allowed to resize the frame to be smaller than this size. This implementation returns 0, 0.- Overrides:
getMinimumSizein classAbstractResizeHotSpot- Returns:
- Minimum frame size.
- See Also:
AbstractResizeHotSpot.isValidSize(int, int)
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent event)
Forwards mouse wheel events to the frame, so that the contents can be scrolled when the mouse is over the resize area.- Specified by:
mouseWheelMovedin interfaceHotSpot- Specified by:
mouseWheelMovedin interfacejava.awt.event.MouseWheelListener- Overrides:
mouseWheelMovedin classAbstractHotSpot- Parameters:
event- The event to handle.
-
-