ilog.views.event
Class ManagerContentChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ilog.views.event.ManagerEvent
          extended by ilog.views.event.ManagerContentChangedEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ObjectBBoxChangedEvent, ObjectInsertedEvent, ObjectLayerChangedEvent, ObjectRemovedEvent, ObjectVisibilityChangedEvent

public class ManagerContentChangedEvent
extends ManagerEvent

An ManagerContentChangedEvent event is the base class for events fired by the manager when its contents change. The manager sends such an event when an object is added or removed, or when the bounding box, the layer, or the visibility of an object changes. The manager fires subclasses of this event depending on the type of event.

In some situations, it is not efficient to perform an action after each modification in the manager. This is why this event has a method (isAdjusting ) that indicates that the manager is doing a series of modifications. Reading a file, for example, means a series of ObjectInsertedEvent events. The end of a series is notified by a new event of type ADJUSTMENT_END.

See Also:
ManagerContentChangedListener, Serialized Form

Field Summary
static int ADJUSTMENT_END
          The type of the event when a series of modification is finished.
static int OBJECT_ADDED
          The type of the event when an object is added to a manager.
static int OBJECT_BBOX_CHANGED
          The type of the event when the bounding rectangle of an object has changed.
static int OBJECT_LAYER_CHANGED
          The type of the event when the layer of an object has changed.
static int OBJECT_REMOVED
          The type of the event when an object is removed from a manager.
static int OBJECT_VISIBILITY_CHANGED
          The type of the event when the visibility of an object has changed.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ManagerContentChangedEvent(IlvManager manager)
          Creates the event.
 
Method Summary
 int getType()
          Returns the type of the manager-contents modification.
 boolean isAdjusting()
          Returns true if this event is part of a series of modifications.
 void setAdjusting(boolean set)
          Changes the adjustment flag of the event.
 void setType(int type)
          Changes the type of the event.
 
Methods inherited from class ilog.views.event.ManagerEvent
getManager
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OBJECT_ADDED

public static final int OBJECT_ADDED
The type of the event when an object is added to a manager. In this case the class of event is ObjectInsertedEvent

See Also:
Constant Field Values

OBJECT_REMOVED

public static final int OBJECT_REMOVED
The type of the event when an object is removed from a manager. In this case the class of event is ObjectRemovedEvent.

See Also:
Constant Field Values

OBJECT_BBOX_CHANGED

public static final int OBJECT_BBOX_CHANGED
The type of the event when the bounding rectangle of an object has changed. In this case the class of event is ObjectBBoxChangedEvent.

See Also:
Constant Field Values

OBJECT_VISIBILITY_CHANGED

public static final int OBJECT_VISIBILITY_CHANGED
The type of the event when the visibility of an object has changed. In this case the class of event is ObjectVisibilityChangedEvent.

See Also:
Constant Field Values

OBJECT_LAYER_CHANGED

public static final int OBJECT_LAYER_CHANGED
The type of the event when the layer of an object has changed. In this case the class of the event is ObjectLayerChangedEvent.

See Also:
Constant Field Values

ADJUSTMENT_END

public static final int ADJUSTMENT_END
The type of the event when a series of modification is finished. For this type of event, the method isAdjusting returns false.

See Also:
isAdjusting(), Constant Field Values
Constructor Detail

ManagerContentChangedEvent

public ManagerContentChangedEvent(IlvManager manager)
Creates the event.

Parameters:
manager - The manager source of the event.
Method Detail

getType

public final int getType()
Returns the type of the manager-contents modification.

See Also:
OBJECT_ADDED, OBJECT_REMOVED, OBJECT_VISIBILITY_CHANGED, OBJECT_BBOX_CHANGED, OBJECT_LAYER_CHANGED, ADJUSTMENT_END

isAdjusting

public final boolean isAdjusting()
Returns true if this event is part of a series of modifications. Note that if the type of the object is ADJUSTMENT_END, this method always returns false. The method will return true if the event is fired by the manager while the manager is in adjustment mode. If the method returns true, another event of type ADJUSTMENT_END will be fired by the manager. For this reason, if you only want to perform an action for each modification of the manager, but not on every individual object addition or removal, you can carry out your action when this method returns false.

See Also:
IlvManager.setContentsAdjusting(boolean)

setType

public final void setType(int type)
Changes the type of the event. You should not call this method.


setAdjusting

public final void setAdjusting(boolean set)
Changes the adjustment flag of the event. You should not call this method.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.