|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.gadgets.SpecifierGadget
com.partnersoft.v3x.apps.MapBrowser.MapGraphicSpecifier
public abstract class MapGraphicSpecifier
A specifier for graphical map objects that works from MapMouseEvents in some fashion (some use the pixels, some use the map coordinates). These are designed to hook into MapViewPanels, so an MX toggle and a global on/off toggle control whether selection should happen. Subclasses should simply override the findSelectedObjectAt() method.
| Constructor Summary | |
|---|---|
MapGraphicSpecifier()
|
|
| Method Summary | |
|---|---|
void |
disable()
|
void |
enable()
|
abstract java.lang.Object |
findSelectedObjectAt(Coord3D coords,
int pixelX,
int pixelY)
Subclasses must override this to provide the function deriving the selected object from the given coordinates and pixels. |
Toggle |
getGlobalToggle()
Toggle switch that controls global selection for a MapViewPanel - if it's off, don't select. |
Specifier |
getIndicationSpecifier()
|
boolean |
getListening()
|
MapViewPanel |
getMapViewPanel()
|
Toggle |
getMXToggle()
Toggle switch that controls MX selection for a MapViewPanel so that only one specifier is active at a time - if it's off, don't select. |
java.lang.String |
indicateObjectAt(Coord3D coords,
int pixelX,
int pixelY)
Subclasses must override this to provide the function indicating (generally by hilite) an object from the given coordinates and pixels. |
void |
mapClicked(MapMouseEvent e)
Invoked when the mouse has been clicked on a map. |
void |
mapDragged(MapMouseEvent e)
Invoked when a mouse button is pressed on a map and then dragged. |
void |
mapEntered(MapMouseEvent e)
Invoked when the mouse enters a map. |
void |
mapExited(MapMouseEvent e)
Invoked when the mouse exits a map. |
void |
mapMoved(MapMouseEvent e)
Invoked when the mouse button has been moved on a map (with no buttons no down). |
void |
mapPressed(MapMouseEvent e)
Invoked when a mouse button has been pressed on a map. |
void |
mapReleased(MapMouseEvent e)
Invoked when a mouse button has been released on a map. |
void |
setGlobalToggle(Toggle newToggle)
|
void |
setListening(boolean tizit)
|
void |
setMapViewPanel(MapViewPanel newView)
|
void |
setMXToggle(Toggle newToggle)
|
| Methods inherited from class com.partnersoft.v3x.gadgets.SpecifierGadget |
|---|
addSpecificationListener, getSpecified, getSpecifiedClass, removeSpecificationListener, setSpecified, setSpecifiedClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapGraphicSpecifier()
| Method Detail |
|---|
public abstract java.lang.Object findSelectedObjectAt(Coord3D coords,
int pixelX,
int pixelY)
public java.lang.String indicateObjectAt(Coord3D coords,
int pixelX,
int pixelY)
public void mapReleased(MapMouseEvent e)
MapMouseListener
mapReleased in interface MapMouseListenerpublic void mapClicked(MapMouseEvent e)
MapMouseListener
mapClicked in interface MapMouseListenerpublic void mapPressed(MapMouseEvent e)
MapMouseListener
mapPressed in interface MapMouseListenerpublic void mapEntered(MapMouseEvent e)
MapMouseListener
mapEntered in interface MapMouseListenerpublic void mapExited(MapMouseEvent e)
MapMouseListener
mapExited in interface MapMouseListenerpublic void mapDragged(MapMouseEvent e)
MapMotionListener
mapDragged in interface MapMotionListenerpublic void mapMoved(MapMouseEvent e)
MapMotionListener
mapMoved in interface MapMotionListenerpublic Specifier getIndicationSpecifier()
public Toggle getGlobalToggle()
public void setGlobalToggle(Toggle newToggle)
public Toggle getMXToggle()
public void setMXToggle(Toggle newToggle)
public void setMapViewPanel(MapViewPanel newView)
public MapViewPanel getMapViewPanel()
public boolean getListening()
public void setListening(boolean tizit)
public void enable()
public void disable()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||