org.diylc.common
Enum EventType

java.lang.Object
  extended by java.lang.Enum<EventType>
      extended by org.diylc.common.EventType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<EventType>

public enum EventType
extends java.lang.Enum<EventType>

Enumerates all possible events between IPlugInPort and IPlugIn. Some events overlap so be careful which ones you subscribe for and how you process them.

Author:
Branislav Stojkovic

Enum Constant Summary
AVAILABLE_CTRL_POINTS_CHANGED
          Called when control points under the cursor are changed.
FILE_STATUS_CHANGED
          Called when either current file name or modified flag are changed.
LAYER_STATE_CHANGED
          Called when a layer status is changed.
MOUSE_MOVED
          Called when mouse cursor is moved.
PROJECT_LOADED
          Called when a new project is loaded.
PROJECT_MODIFIED
          Called when the current project has been modified.
REPAINT
          Called when selection size changes, together with a Point2D object containing selection size (x = width, y = height).
SELECTION_CHANGED
          Called when component selection is changed.
SELECTION_RECT_CHANGED
          Called when selection rectangle is changed.
SLOT_CHANGED
          Called when new component slot has been changed.
STATUS_MESSAGE_CHANGED
          Called to update the status message.
ZOOM_CHANGED
          Called when zoom level changes.
 
Method Summary
static EventType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static EventType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ZOOM_CHANGED

public static final EventType ZOOM_CHANGED
Called when zoom level changes. Typically only one parameter of type Double is passed with new zoom level.


PROJECT_LOADED

public static final EventType PROJECT_LOADED
Called when a new project is loaded. New Project is the first parameter. Boolean flag is the second parameter and it's true when new project is loaded, false when the same project has been either reloaded or loaded with undo/redo operations.


FILE_STATUS_CHANGED

public static final EventType FILE_STATUS_CHANGED
Called when either current file name or modified flag are changed. The first parameter is the current file name, the second one is a boolean modified flag.


SELECTION_RECT_CHANGED

public static final EventType SELECTION_RECT_CHANGED
Called when selection rectangle is changed. Object of type Rectangle is the only parameter and it contains the new selection rectangle.


SELECTION_CHANGED

public static final EventType SELECTION_CHANGED
Called when component selection is changed. New ComponentSelection is attached as a parameter.


REPAINT

public static final EventType REPAINT
Called when selection size changes, together with a Point2D object containing selection size (x = width, y = height). Size is expressed in the default measure (cm for metric, inches for imperial).


SLOT_CHANGED

public static final EventType SLOT_CHANGED
Called when new component slot has been changed. The only parameter is ComponentType and may be null.


PROJECT_MODIFIED

public static final EventType PROJECT_MODIFIED
Called when the current project has been modified. Two instances of Project are passed as parameters, one before and one after the change. The third parameter is a string containing change description.


AVAILABLE_CTRL_POINTS_CHANGED

public static final EventType AVAILABLE_CTRL_POINTS_CHANGED
Called when control points under the cursor are changed. A single parameter is passed, an instance of Map, Set> containing all the components and indices of their control points that are under the cursor.


MOUSE_MOVED

public static final EventType MOUSE_MOVED
Called when mouse cursor is moved. Point object is passed, containing the current cursor location (not taking zoom into account).


LAYER_STATE_CHANGED

public static final EventType LAYER_STATE_CHANGED
Called when a layer status is changed. The first parameter is a set of indices of locked layers. All layers not included are considered unlocked.


STATUS_MESSAGE_CHANGED

public static final EventType STATUS_MESSAGE_CHANGED
Called to update the status message. New status message is passed as a first parameter.

Method Detail

values

public static EventType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EventType c : EventType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EventType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null