gov.nasa.worldwind.examples.util
Class SectorSelector
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.examples.util.SectorSelector
- All Implemented Interfaces:
- AVList, RenderingListener, SelectListener, WWObject, MouseListener, MouseMotionListener, PropertyChangeListener, EventListener
public class SectorSelector
- extends WWObjectImpl
- implements SelectListener, MouseListener, MouseMotionListener, RenderingListener
Provides an interactive region selector. To use, construct and call enable/disable. Register a property listener to
receive changes to the sector as they occur, or just wait until the user is done and then query the result via getSector()
.
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
EAST
protected static final int EAST
- See Also:
- Constant Field Values
MOVING
protected static final int MOVING
- See Also:
- Constant Field Values
NONE
protected static final int NONE
- See Also:
- Constant Field Values
NORTH
protected static final int NORTH
- See Also:
- Constant Field Values
NORTHEAST
protected static final int NORTHEAST
- See Also:
- Constant Field Values
NORTHWEST
protected static final int NORTHWEST
- See Also:
- Constant Field Values
SECTOR_PROPERTY
public static final String SECTOR_PROPERTY
- See Also:
- Constant Field Values
SIZING
protected static final int SIZING
- See Also:
- Constant Field Values
SOUTH
protected static final int SOUTH
- See Also:
- Constant Field Values
SOUTHEAST
protected static final int SOUTHEAST
- See Also:
- Constant Field Values
SOUTHWEST
protected static final int SOUTHWEST
- See Also:
- Constant Field Values
WEST
protected static final int WEST
- See Also:
- Constant Field Values
SectorSelector
public SectorSelector(WorldWindow worldWindow)
SectorSelector
protected SectorSelector(WorldWindow worldWindow,
SectorSelector.RegionShape shape,
RenderableLayer rLayer)
determineAdjustmentSide
protected int determineAdjustmentSide(Movable dragObject,
double factor)
disable
public void disable()
dragWholeShape
protected void dragWholeShape(DragSelectEvent dragEvent,
Movable dragObject)
enable
public void enable()
getBorderColor
public Color getBorderColor()
getBorderOpacity
public double getBorderOpacity()
getBorderWidth
public double getBorderWidth()
getEdgeFactor
protected double getEdgeFactor()
getInteriorColor
public Color getInteriorColor()
getInteriorOpacity
public double getInteriorOpacity()
getLayer
public Layer getLayer()
getOperation
protected int getOperation()
getPreviousPosition
protected Position getPreviousPosition()
getSector
public Sector getSector()
getShape
protected SectorSelector.RegionShape getShape()
getSide
protected int getSide()
getWwd
public WorldWindow getWwd()
isArmed
protected boolean isArmed()
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interface MouseListener
mouseDragged
public void mouseDragged(MouseEvent mouseEvent)
- Specified by:
mouseDragged
in interface MouseMotionListener
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered
in interface MouseListener
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited
in interface MouseListener
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interface MouseMotionListener
mousePressed
public void mousePressed(MouseEvent mouseEvent)
- Specified by:
mousePressed
in interface MouseListener
mouseReleased
public void mouseReleased(MouseEvent mouseEvent)
- Specified by:
mouseReleased
in interface MouseListener
notifySectorChanged
protected void notifySectorChanged()
resizeShape
protected Sector resizeShape(Movable dragObject,
int side)
selected
public void selected(SelectEvent event)
- Specified by:
selected
in interface SelectListener
setArmed
protected void setArmed(boolean armed)
setBorderColor
public void setBorderColor(Color color)
setBorderOpacity
public void setBorderOpacity(double opacity)
setBorderWidth
public void setBorderWidth(double width)
setCursor
protected void setCursor(Cursor cursor)
setCursor
protected void setCursor(int sideName)
setEdgeFactor
protected void setEdgeFactor(double edgeFactor)
setInteriorColor
public void setInteriorColor(Color color)
setInteriorOpacity
public void setInteriorOpacity(double opacity)
setOperation
protected void setOperation(int operation)
setPreviousPosition
protected void setPreviousPosition(Position previousPosition)
setSide
protected void setSide(int side)
stageChanged
public void stageChanged(RenderingEvent event)
- Specified by:
stageChanged
in interface RenderingListener