public class BalloonResizeController extends AbstractResizeHotSpot
Balloon by dragging the mouse. This class should usually not be instantiated
directly. Instead, BalloonController will instantiate it when a balloon needs to be resized.BalloonController| Modifier and Type | Field and Description |
|---|---|
protected Balloon |
balloon |
protected java.awt.Rectangle |
bounds |
protected static java.awt.Dimension |
DEFAULT_MIN_SIZE |
protected WorldWindow |
wwd |
adjustLocationX, adjustLocationY, allowHorizontalResize, allowVerticalResize, cursor, dragging, dragRefPoint, EAST, NORTH, NORTHEAST, NORTHWEST, refLocation, refSize, SOUTH, SOUTHEAST, SOUTHWEST, WEST, xSign, ySignactive| Constructor and Description |
|---|
BalloonResizeController(WorldWindow wwd,
Balloon balloon)
Create a resize controller.
|
| Modifier and Type | Method and Description |
|---|---|
void |
detach()
Remove this controller as an event listener.
|
java.awt.Rectangle |
getBounds()
Gets the bounds of the Balloon being sized.
|
protected java.awt.Rectangle |
getBounds(PickedObject pickedObject)
Get the balloon bounds from a SelectEvent.
|
protected java.awt.Dimension |
getMinimumSize()
Get the minimum size of the frame.
|
protected java.awt.Point |
getScreenPoint()
Get the screen point of the upper left corner of the frame.
|
protected java.awt.Dimension |
getSize()
Get the size of the frame.
|
boolean |
isResizing()
Is the controller currently resizing a balloon?
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Update the resize cursor when the mouse moves.
|
void |
setBounds(java.awt.Rectangle bounds)
Specifies the bounds of the Balloon to be sized.
|
protected void |
setScreenPoint(java.awt.Point newPoint)
Set the screen point of the upper left corner of the frame.
|
protected void |
setSize(java.awt.Dimension newSize)
Set the size of the frame.
|
protected void |
updateCursor()
Update the WorldWindow's cursor to the current resize cursor.
|
beginDrag, drag, endDrag, getCursor, isDragging, isValidSize, selected, setActive, setDirection, setDirection, setDirectionFromPointisActive, isConsumed, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMovedaddPropertyChangeListener, 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, setValuesprotected Balloon balloon
protected java.awt.Rectangle bounds
protected static final java.awt.Dimension DEFAULT_MIN_SIZE
protected WorldWindow wwd
public BalloonResizeController(WorldWindow wwd, Balloon balloon)
wwd - WorldWindow to interact with.balloon - Balloon to resize.public void detach()
public java.awt.Rectangle getBounds()
null if no bounds have been set.protected java.awt.Rectangle getBounds(PickedObject pickedObject)
pickedObject - Top picked object. The bounds are expected to be attached to the to PickedObject
under AVKey.BOUNDS.null if no bounds are found in the top PickedObject.protected java.awt.Dimension getMinimumSize()
getMinimumSize in class AbstractResizeHotSpotAbstractResizeHotSpot.isValidSize(int, int)protected java.awt.Point getScreenPoint()
getScreenPoint in class AbstractResizeHotSpotprotected java.awt.Dimension getSize()
getSize in class AbstractResizeHotSpotpublic boolean isResizing()
public void mouseMoved(java.awt.event.MouseEvent e)
AbstractResizeHotSpotmouseMoved in interface HotSpotmouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class AbstractResizeHotSpote - Mouse event.public void setBounds(java.awt.Rectangle bounds)
bounds - Balloon bounds, in AWT coordinates.protected void setScreenPoint(java.awt.Point newPoint)
setScreenPoint in class AbstractResizeHotSpotnewPoint - New screen point measured from upper left corner of the screen (AWT coordinates).protected void setSize(java.awt.Dimension newSize)
setSize in class AbstractResizeHotSpotnewSize - New frame size in pixels.protected void updateCursor()