LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.data
Class LyWorkSpaceEvent

java.lang.Object
  extended by leon.data.LyWorkSpaceEvent
Direct Known Subclasses:
LyAdvancedWorkSpaceEvent

public class LyWorkSpaceEvent
extends java.lang.Object

This class implements an event of adding/removing/changing an object within a workspace (dynamic objects list). These events are sent to 'registered listeners' : classes which implements the LyWorkSpaceListener interface and that were added as listeners on a workspace.

See Also:
LyWorkSpace, LyWorkSpaceListener

Nested Class Summary
static class LyWorkSpaceEvent.Type
          Event types.
 
Field Summary
static java.lang.String __VERSION
          File version
 
Constructor Summary
LyWorkSpaceEvent(LyWorkSpace source, LyObject object, int index, int oldIndex)
          Constructs an event notifying that the given object was moved within the workspace from the old position to the new one (due to a new sort).
LyWorkSpaceEvent(LyWorkSpace source, LyWorkSpaceEvent.Type type, LyObject object, int index)
          Constructs an event of the given type concerning the specified object without old position and associated values.
LyWorkSpaceEvent(LyWorkSpace source, LyWorkSpaceEvent.Type type, LyObject object, int index, int oldIndex, LyValueSet values)
          Constructs an event of the given type concerning the specified object.
 
Method Summary
 LyEventInfo getEventInfo()
           
 int getIndex()
          Gets index of the object in the workspace which created this event.
 LyObject getObject()
          Gets the object concerned by this notification.
 int getOldIndex()
          Gets previous index of the object in the workspace before this event was notified.
 LyWorkSpace getSource()
          Gets workspace that created and notified this event.
 LyWorkSpaceEvent.Type getType()
          Gets the type of this event.
 LyValueSet getValues()
          Gets the set of values associated to this event.
 boolean isIncremented()
           
 void setEventInfo(LyEventInfo eventInfo)
           
 void setIncremented(boolean incremented)
          Sets the flag indicated if the counter has been incremented or decremented.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyWorkSpaceEvent

public LyWorkSpaceEvent(LyWorkSpace source,
                        LyWorkSpaceEvent.Type type,
                        LyObject object,
                        int index,
                        int oldIndex,
                        LyValueSet values)
Constructs an event of the given type concerning the specified object.

Parameters:
source - Workspace that creates this event.
type - Type of event that occured. One of the TYPE_XXX constants.
object - Object concerned by the notification.
index - Index of the object in the workspace.
oldIndex - Old index of the object in the workspace.
values - Set of values associated to this event. May be null.
Throws:
java.lang.IllegalArgumentException - If source parameter or object parameter is null.
java.lang.IllegalArgumentException - If the given type is not one of valid types.

LyWorkSpaceEvent

public LyWorkSpaceEvent(LyWorkSpace source,
                        LyObject object,
                        int index,
                        int oldIndex)
Constructs an event notifying that the given object was moved within the workspace from the old position to the new one (due to a new sort). The type of this event is TYPE_CHANGE.

Parameters:
source - Workspace that creates this event.
object - Object concerned by the notification.
index - Index of the object in the workspace.
oldIndex - Old index of the object in the workspace.

LyWorkSpaceEvent

public LyWorkSpaceEvent(LyWorkSpace source,
                        LyWorkSpaceEvent.Type type,
                        LyObject object,
                        int index)
Constructs an event of the given type concerning the specified object without old position and associated values.

Parameters:
source - Workspace that creates this event.
type - Type of event that occured. One of the TYPE_XXX constants.
object - Object concerned by the notification.
index - Index of the object in the workspace.
Method Detail

getType

public LyWorkSpaceEvent.Type getType()
Gets the type of this event.

Returns:
Type of this event : one of the TYPE_XXX constants.

getSource

public LyWorkSpace getSource()
Gets workspace that created and notified this event.

Returns:
Workspace origin of this event.

getObject

public LyObject getObject()
Gets the object concerned by this notification.

Returns:
The object concerned by this event.

getIndex

public int getIndex()
Gets index of the object in the workspace which created this event.

Returns:
Index of the object in the workspace.

getOldIndex

public int getOldIndex()
Gets previous index of the object in the workspace before this event was notified.

Returns:
Old index of the object in the workspace.

getValues

public LyValueSet getValues()
Gets the set of values associated to this event.

Returns:
Set of values if any specified, may be null.

getEventInfo

public LyEventInfo getEventInfo()
Returns:
Returns the eventInfo.

setEventInfo

public void setEventInfo(LyEventInfo eventInfo)
Parameters:
eventInfo - The eventInfo to set.

isIncremented

public boolean isIncremented()
Returns:
The flag indicated if the counter has been incremented (true) or decremented (false).

setIncremented

public void setIncremented(boolean incremented)
Sets the flag indicated if the counter has been incremented or decremented.

Parameters:
incremented - the new value of the _incremented flag.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com