ilog.views.gantt.model.general
Class IlvGeneralActivity

java.lang.Object
  extended by ilog.views.gantt.model.IlvAbstractActivity
      extended by ilog.views.gantt.model.IlvSimpleActivity
          extended by ilog.views.gantt.model.general.IlvGeneralActivity
All Implemented Interfaces:
IlvActivity, IlvHierarchyNode, IlvUserPropertyHolder, Serializable

public class IlvGeneralActivity
extends IlvSimpleActivity
implements IlvUserPropertyHolder

IlvGeneralActivity is an extension of IlvSimpleActivity that adds support for user-defined properties. IlvGeneralActivity fires an ActivityUserPropertyEvent both before and after a user-defined property is modified. Immediately before a property is modified, IlvGeneralActivity fires an aboutToChange ActivityUserPropertyEvent to all listeners registered with the Gantt data model. This gives the listeners an opportunity to constrain or veto the proposed property change. If the property change is not vetoed, then the change is applied and IlvGeneralActivity fires a changed ActivityUserPropertyEvent to all listeners registered with the Gantt data model.

IlvGeneralActivity predefines 6 properties that are inherited from its IlvSimpleActivity superclass. These predefined properties can be accessed through the getProperty(java.lang.String) and setProperty(java.lang.String, java.lang.Object) methods in the same manner as user-defined properties. However, the predefined properties fire specific event types. They do not fire ActivityUserPropertyEvents as described above for user-defined properties. The predefined events are shown in the following table:

Property Value Type Equivalent getXXX Method Equivalent setXXX Method Event Type
id String getID setID ActivityIDEvent
name String getName setName ActivityNameEvent
startTime Date getStartTime setStartTime ActivityTimeIntervalEvent
endTime Date getEndTime setEndTime ActivityTimeIntervalEvent
duration IlvDuration getDuration setDuration ActivityTimeIntervalEvent
timeInterval IlvTimeInterval getTimeInterval setTimeInterval ActivityTimeIntervalEvent

Since:
JViews 5.5
See Also:
Serialized Form

Nested Class Summary
static class IlvGeneralActivity.Factory
          IlvGeneralActivity.Factory is a factory that creates instances of IlvGeneralActivity.
 
Field Summary
static String DURATION_PROPERTY
          Identifies the activity's duration property.
static String END_TIME_PROPERTY
          Identifies the activity's end time property.
static String ID_PROPERTY
          Identifies the activity's ID property.
static String NAME_PROPERTY
          Identifies the activity's name property.
static String START_TIME_PROPERTY
          Identifies the activity's start time property.
static String TIME_INTERVAL_PROPERTY
          Identifies the activity's time interval property.
 
Constructor Summary
IlvGeneralActivity(String id, String name, Date start, Date end)
          Creates a new IlvGeneralActivity from the specified ID, name, and time interval.
IlvGeneralActivity(String id, String name, Date start, IlvDuration duration)
          Creates a new IlvGeneralActivity from the specified ID, name, start time, and duration.
IlvGeneralActivity(String id, String name, IlvTimeInterval interval)
          Creates a new IlvGeneralActivity from the specified ID, name, and time interval.
 
Method Summary
 Object getProperty(String property)
          Returns the value of a user-defined property or null if the property does not exist.
 Collection getPropertyNames()
          Returns a collection that contains the names of all the properties of this activity.
 boolean isUserProperty(String name)
          Returns true if the property is a user-defined property.
protected  String paramString()
          Returns a parameter string that represents the state of this activity.
 Iterator propertyNameIterator()
          Returns an iterator over all the property names of this activity.
 Object setProperty(String property, Object value)
          Stores a user-defined property in this activity's property table.
 
Methods inherited from class ilog.views.gantt.model.IlvSimpleActivity
computeTimeIntervalFromChildren, getAutoCalcTimeIntervalFromChildren, getChildEventFilter, getID, getName, getTimeInterval, processChildEvent, setAutoCalcTimeIntervalFromChildren, setGanttModelImpl, setID, setName, setTimeInterval
 
Methods inherited from class ilog.views.gantt.model.IlvAbstractActivity
fireEvent, fireIDAboutToChange, fireIDChanged, fireNameAboutToChange, fireNameChanged, fireTimeIntervalAboutToChange, fireTimeIntervalChanged, getDuration, getEndTime, getGanttModel, getStartTime, setDuration, setEndTime, setStartTime, setTimeInterval, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_PROPERTY

public static final String ID_PROPERTY
Identifies the activity's ID property. The value is "id".

See Also:
Constant Field Values

NAME_PROPERTY

public static final String NAME_PROPERTY
Identifies the activity's name property. The value is "name".

See Also:
Constant Field Values

START_TIME_PROPERTY

public static final String START_TIME_PROPERTY
Identifies the activity's start time property. The value is "startTime".

See Also:
Constant Field Values

END_TIME_PROPERTY

public static final String END_TIME_PROPERTY
Identifies the activity's end time property. The value is "endTime".

See Also:
Constant Field Values

DURATION_PROPERTY

public static final String DURATION_PROPERTY
Identifies the activity's duration property. The value is "duration".

See Also:
Constant Field Values

TIME_INTERVAL_PROPERTY

public static final String TIME_INTERVAL_PROPERTY
Identifies the activity's time interval property. The value is "timeInterval".

See Also:
Constant Field Values
Constructor Detail

IlvGeneralActivity

public IlvGeneralActivity(String id,
                          String name,
                          IlvTimeInterval interval)
Creates a new IlvGeneralActivity from the specified ID, name, and time interval.

Parameters:
id - The activity ID.
name - The descriptive activity name.
interval - The start and end time of the activity.

IlvGeneralActivity

public IlvGeneralActivity(String id,
                          String name,
                          Date start,
                          Date end)
Creates a new IlvGeneralActivity from the specified ID, name, and time interval.

Parameters:
id - The activity ID.
name - The descriptive activity name.
start - The activity start time.
end - The activity end time.

IlvGeneralActivity

public IlvGeneralActivity(String id,
                          String name,
                          Date start,
                          IlvDuration duration)
Creates a new IlvGeneralActivity from the specified ID, name, start time, and duration.

Parameters:
id - The activity ID.
name - The descriptive activity name.
start - The activity start time.
duration - The activity duration.
Method Detail

getProperty

public Object getProperty(String property)
Returns the value of a user-defined property or null if the property does not exist.

Specified by:
getProperty in interface IlvUserPropertyHolder
Parameters:
property - The name of the property.
Returns:
The value of the property or null if the property does not exist.
See Also:
setProperty(java.lang.String, java.lang.Object), getPropertyNames()

setProperty

public Object setProperty(String property,
                          Object value)
Stores a user-defined property in this activity's property table.

Specified by:
setProperty in interface IlvUserPropertyHolder
Parameters:
property - The name of the property.
value - The value of the property. If the value is null then the property is removed.
Returns:
The value of the property set or the old value of the property if the value is being removed.
See Also:
getProperty(java.lang.String), getPropertyNames()

propertyNameIterator

public Iterator propertyNameIterator()
Returns an iterator over all the property names of this activity.

Specified by:
propertyNameIterator in interface IlvUserPropertyHolder
Returns:
The iterator.
Since:
JViews 6.0

getPropertyNames

public Collection getPropertyNames()
Returns a collection that contains the names of all the properties of this activity.


isUserProperty

public boolean isUserProperty(String name)
Returns true if the property is a user-defined property.

Specified by:
isUserProperty in interface IlvUserPropertyHolder
Parameters:
name - The name of the property.

paramString

protected String paramString()
Returns a parameter string that represents the state of this activity.

Overrides:
paramString in class IlvAbstractActivity
Returns:
A string representing the status of the activity.


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