byucc.jhdl.apps.Viewers.Event
Class JHDLMouseEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjava.awt.AWTEvent
          extended byjava.awt.event.ComponentEvent
              extended byjava.awt.event.InputEvent
                  extended byjava.awt.event.MouseEvent
                      extended bybyucc.jhdl.apps.Viewers.Event.JHDLMouseEvent
All Implemented Interfaces:
java.io.Serializable

public class JHDLMouseEvent
extends java.awt.event.MouseEvent

Passed to JHDLMouseEventListeners by JHDLMouseEventGenerators.

Version:
$Id: JHDLMouseEvent.java,v 1.5 2004/04/20 21:23:31 tsa6 Exp $
Author:
Tyler Anderson
See Also:
JHDLMouseEventListener,JHDLMouseEventGenerator, Serialized Form

Field Summary
static int CELL_DOUBLE_CLICKED
          Means a single cell was double clicked, and it can then be accessed by the getCell() method.
static int CELL_SINGLE_CLICKED
          Means a single cell was clicked, and it can then be accessed by the getCell() method.
static int CELL_SINGLE_CLICKED_MULTIPLE
          Means multiple cell were clicked, and they can then be accessed by the getCells() method.
static int ERROR_CONSTRUCTING
          Means an error occured in the constructor, meaning it probably did not send a correct argument type to the constructor.
static int UNSELECT_ALL
          Means everything was unselected
static int UNSELECT_CELLS
          Means all Cells were unselected
static int UNSELECT_WIRES
          Means all Wires were unselected
static int WIRE_DOUBLE_CLICKED
          Means a single cell was clicked, and it can then be accessed by the getWire() method.
static int WIRE_SINGLE_CLICKED
          Means a single wire was clicked, and it can then be accessed by the getWire() method.
static int WIRE_SINGLE_CLICKED_MULTIPLE
          Means multiple wires were clicked, and they can then be accessed by the getWires() method.
static int WIRE_SINGLE_CLICKED_STRING
          Means a single wire was clicked and its name was passed as a String, and it can then be accessed by the getString() method.
 
Fields inherited from class java.awt.event.MouseEvent
BUTTON1, BUTTON2, BUTTON3, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_WHEEL, NOBUTTON
 
Fields inherited from class java.awt.event.InputEvent
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON1_MASK, BUTTON2_DOWN_MASK, BUTTON2_MASK, BUTTON3_DOWN_MASK, BUTTON3_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASK
 
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Constructor Summary
JHDLMouseEvent(java.awt.event.MouseEvent me, java.lang.Object obj, int id, java.lang.Object source)
          Main constructor.
JHDLMouseEvent(java.lang.Object obj, int id, java.lang.Object source)
          Secondary constructor--Overloaded method because sometimes there is no MouseEvent to send.
 
Method Summary
 Cell getCell()
           
 java.util.ArrayList getCells()
           
 int getID()
           
 java.lang.Object getSource()
           
 java.lang.String getString()
           
 Wire getWire()
           
 java.util.ArrayList getWires()
           
 
Methods inherited from class java.awt.event.MouseEvent
getButton, getClickCount, getMouseModifiersText, getPoint, getX, getY, isPopupTrigger, paramString, translatePoint
 
Methods inherited from class java.awt.event.InputEvent
consume, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
 
Methods inherited from class java.awt.event.ComponentEvent
getComponent
 
Methods inherited from class java.awt.AWTEvent
setSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR_CONSTRUCTING

public static final int ERROR_CONSTRUCTING
Means an error occured in the constructor, meaning it probably did not send a correct argument type to the constructor.

See Also:
Constant Field Values

CELL_SINGLE_CLICKED

public static final int CELL_SINGLE_CLICKED
Means a single cell was clicked, and it can then be accessed by the getCell() method.

See Also:
Constant Field Values

CELL_SINGLE_CLICKED_MULTIPLE

public static final int CELL_SINGLE_CLICKED_MULTIPLE
Means multiple cell were clicked, and they can then be accessed by the getCells() method.

See Also:
Constant Field Values

CELL_DOUBLE_CLICKED

public static final int CELL_DOUBLE_CLICKED
Means a single cell was double clicked, and it can then be accessed by the getCell() method.

See Also:
Constant Field Values

WIRE_SINGLE_CLICKED

public static final int WIRE_SINGLE_CLICKED
Means a single wire was clicked, and it can then be accessed by the getWire() method.

See Also:
Constant Field Values

WIRE_SINGLE_CLICKED_STRING

public static final int WIRE_SINGLE_CLICKED_STRING
Means a single wire was clicked and its name was passed as a String, and it can then be accessed by the getString() method.

See Also:
Constant Field Values

WIRE_SINGLE_CLICKED_MULTIPLE

public static final int WIRE_SINGLE_CLICKED_MULTIPLE
Means multiple wires were clicked, and they can then be accessed by the getWires() method.

See Also:
Constant Field Values

WIRE_DOUBLE_CLICKED

public static final int WIRE_DOUBLE_CLICKED
Means a single cell was clicked, and it can then be accessed by the getWire() method.

See Also:
Constant Field Values

UNSELECT_CELLS

public static final int UNSELECT_CELLS
Means all Cells were unselected

See Also:
Constant Field Values

UNSELECT_WIRES

public static final int UNSELECT_WIRES
Means all Wires were unselected

See Also:
Constant Field Values

UNSELECT_ALL

public static final int UNSELECT_ALL
Means everything was unselected

See Also:
Constant Field Values
Constructor Detail

JHDLMouseEvent

public JHDLMouseEvent(java.awt.event.MouseEvent me,
                      java.lang.Object obj,
                      int id,
                      java.lang.Object source)
Main constructor.

Parameters:
me - The MouseEvent that began the event chain.
obj - The Wire, Cell, String, WireList, or CellList that caused the action.
id - The id, meaning the reason for this event, encoded in JHDLMouseEvent.
source - The source object of this event.

JHDLMouseEvent

public JHDLMouseEvent(java.lang.Object obj,
                      int id,
                      java.lang.Object source)
Secondary constructor--Overloaded method because sometimes there is no MouseEvent to send.

Parameters:
obj - The Wire, Cell, String, WireList, or CellList that caused the action.
id - The id, meaning the reason for this event, encoded in JHDLMouseEvent.
source - The source object of this event.
Method Detail

getCell

public Cell getCell()
Returns:
the clicked cell

getWire

public Wire getWire()
Returns:
the clicked wire

getCells

public java.util.ArrayList getCells()
Returns:
the list of clicked cells

getWires

public java.util.ArrayList getWires()
Returns:
the list of clicked wires

getString

public java.lang.String getString()
Returns:
the string full name of the clicked object

getID

public int getID()
Returns:
the id

getSource

public java.lang.Object getSource()
Returns:
the source


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.