visad
Class ScalarMapEvent

java.lang.Object
  |
  +--java.awt.Event
        |
        +--visad.VisADEvent
              |
              +--visad.ScalarMapEvent
Direct Known Subclasses:
ScalarMapControlEvent

public class ScalarMapEvent
extends VisADEvent

ScalarMapEvent is the VisAD class for Events from ScalarMap objects. They are sourced by ScalarMap objects and received by ScalarMapListener objects.

See Also:
Serialized Form

Field Summary
static int AUTO_SCALE
           
static int CONTROL_ADDED
           
static int CONTROL_REMOVED
           
static int CONTROL_REPLACED
           
static int MANUAL
           
static int UNKNOWN
          values for id
 
Fields inherited from class visad.VisADEvent
LOCAL_SOURCE, UNKNOWN_REMOTE_SOURCE
 
Fields inherited from class java.awt.Event
ACTION_EVENT, ALT_MASK, arg, BACK_SPACE, CAPS_LOCK, clickCount, CTRL_MASK, DELETE, DOWN, END, ENTER, ESCAPE, evt, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, GOT_FOCUS, HOME, id, INSERT, key, KEY_ACTION, KEY_ACTION_RELEASE, KEY_PRESS, KEY_RELEASE, LEFT, LIST_DESELECT, LIST_SELECT, LOAD_FILE, LOST_FOCUS, META_MASK, modifiers, MOUSE_DOWN, MOUSE_DRAG, MOUSE_ENTER, MOUSE_EXIT, MOUSE_MOVE, MOUSE_UP, NUM_LOCK, PAUSE, PGDN, PGUP, PRINT_SCREEN, RIGHT, SAVE_FILE, SCROLL_ABSOLUTE, SCROLL_BEGIN, SCROLL_END, SCROLL_LINE_DOWN, SCROLL_LINE_UP, SCROLL_LOCK, SCROLL_PAGE_DOWN, SCROLL_PAGE_UP, SHIFT_MASK, TAB, target, UP, when, WINDOW_DEICONIFY, WINDOW_DESTROY, WINDOW_EXPOSE, WINDOW_ICONIFY, WINDOW_MOVED, x, y
 
Constructor Summary
ScalarMapEvent(ScalarMap map, boolean auto)
          Deprecated. - Explicitly cite the event ID using the ScalarMapEvent(ScalarMap map, int id) constructor.
ScalarMapEvent(ScalarMap map, int id)
          Create a ScalarMap event
ScalarMapEvent(ScalarMap map, int id, int remoteId)
          Create a ScalarMap event
 
Method Summary
 int getId()
          Get the ID type of this event.
 String getIdString()
          Get the ID type of this event as a String
(package private)  String getMapString()
          Get a one-line description of the ScalarMap which originated this event.
 ScalarMap getScalarMap()
          Get the ScalarMap that sent this ScalarMapEvent (or a copy if the ScalarMap was on a different JVM)
 String toString()
           
 
Methods inherited from class visad.VisADEvent
getRemoteId, isRemote
 
Methods inherited from class java.awt.Event
, consume, controlDown, getKeyEventChar, getOldEventKey, isConsumed, metaDown, paramString, shiftDown, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
values for id

AUTO_SCALE

public static final int AUTO_SCALE

MANUAL

public static final int MANUAL

CONTROL_ADDED

public static final int CONTROL_ADDED

CONTROL_REMOVED

public static final int CONTROL_REMOVED

CONTROL_REPLACED

public static final int CONTROL_REPLACED
Constructor Detail

ScalarMapEvent

public ScalarMapEvent(ScalarMap map,
                      int id)
Create a ScalarMap event
Parameters:
map - map to which this event refers
id - the event type.

ScalarMapEvent

public ScalarMapEvent(ScalarMap map,
                      int id,
                      int remoteId)
Create a ScalarMap event
Parameters:
map - map to which this event refers
id - the event type.

ScalarMapEvent

public ScalarMapEvent(ScalarMap map,
                      boolean auto)
Deprecated. - Explicitly cite the event ID using the ScalarMapEvent(ScalarMap map, int id) constructor.
Create a ScalarMap event
Parameters:
map - map to which this event refers
auto - true if this is an AUTO_SCALE event false if it's a MANUAL event.
Method Detail

getScalarMap

public ScalarMap getScalarMap()
Get the ScalarMap that sent this ScalarMapEvent (or a copy if the ScalarMap was on a different JVM)
Returns:
the ScalarMap

getId

public int getId()
Get the ID type of this event.
Returns:
ScalarMapEvent type. Valid types are:
  • ScalarMapEvent.AUTO_SCALE
  • ScalarMapEvent.MANUAL
  • ScalarMapEvent.CONTROL_ADDED
  • ScalarMapEvent.CONTROL_REMOVED
  • ScalarMapEvent.CONTROL_REPLACED

getIdString

public String getIdString()
Get the ID type of this event as a String
Returns:
The event type string.

getMapString

String getMapString()
Get a one-line description of the ScalarMap which originated this event.
Returns:
the one-line map description.

toString

public String toString()
Overrides:
toString in class Event