public class IlvTableResource extends IlvAbstractResource implements IlvUserPropertyHolder
IlvAbstractResource
implementation that
works with an IlvTableGanttModel
.IlvTableGanttModel.configureHierarchyChart(IlvHierarchyChart)
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
ID_PROPERTY
Identifies the ID property of the resource.
|
static String |
NAME_PROPERTY
Identifies the name property of the resource.
|
static String |
PARENT_ID_PROPERTY
Identifies the ID of the parent resource.
|
static String |
QUANTITY_PROPERTY
Identifies the quantity property of the resource.
|
Constructor and Description |
---|
IlvTableResource(String id,
String name)
Creates a new
IlvTableResource from the specified ID, and
name. |
IlvTableResource(String id,
String name,
float quantity)
Creates a new
IlvTableResource from the specified ID, name,
and quantity. |
Modifier and Type | Method and Description |
---|---|
String |
getID()
Returns the ID string of the resource.
|
String |
getName()
Returns the name of the resource.
|
Object |
getProperty(String property)
Returns the value of a user-defined property, or
null if the
property does not exist. |
float |
getQuantity()
Returns the quantity of this resource.
|
boolean |
isUserProperty(String name)
Returns
true if the property is a user-defined property. |
Iterator<String> |
propertyNameIterator()
Returns an iterator over all the property names of the object.
|
void |
setID(String id)
Sets the ID string of the resource.
|
void |
setName(String name)
Sets the name of the resource.
|
Object |
setProperty(String property,
Object value)
Stores a user-defined property in the property table of this resource.
|
void |
setQuantity(float quantity)
Sets the quantity of this resource.
|
fireEvent, fireIDAboutToChange, fireIDChanged, fireNameAboutToChange, fireNameChanged, fireQuantityAboutToChange, fireQuantityChanged, getChildEventFilter, getGanttModel, paramString, processChildEvent, setGanttModelImpl, toString
public static final String ID_PROPERTY
id
.public static final String NAME_PROPERTY
name
.public static final String QUANTITY_PROPERTY
quantity
.public static final String PARENT_ID_PROPERTY
public IlvTableResource(String id, String name, float quantity)
IlvTableResource
from the specified ID, name,
and quantity.id
- The resource ID.name
- The descriptive resource name.quantity
- The quantity of the resource.public String getID()
getID
in interface IlvResource
public void setID(String id)
IlvTableResource
the ID must be set at
construction or initialization time or get from the database.setID
in interface IlvResource
id
- The ID string of the resource.IllegalStateException
- if the resource is added to a modelpublic String getName()
getName
in interface IlvResource
public void setName(String name)
setName
in interface IlvResource
name
- A descriptive name for this resource.public float getQuantity()
getQuantity
in interface IlvResource
public void setQuantity(float quantity)
setQuantity
in interface IlvResource
quantity
- The amount of this resource.public Object getProperty(String property)
null
if the
property does not exist.getProperty
in interface IlvUserPropertyHolder
property
- The name of the property.null
if the property
does not exist.setProperty(java.lang.String, java.lang.Object)
,
propertyNameIterator()
public Object setProperty(String property, Object value)
setProperty
in interface IlvUserPropertyHolder
property
- The name of the property.value
- The value of the property. If the value is
null
then the property is removed.getProperty(java.lang.String)
,
propertyNameIterator()
public Iterator<String> propertyNameIterator()
propertyNameIterator
in interface IlvUserPropertyHolder
public boolean isUserProperty(String name)
true
if the property is a user-defined property.isUserProperty
in interface IlvUserPropertyHolder
name
- The name of the property.true
if the property is a user-defined property,
false
otherwise.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.