public abstract class IlvAbstractJTreeRenderPolicy extends Object implements IlvJTreeRenderPolicy
IlvAbstractJTreeRenderPolicy
is the superclass of all
rendering policy implementations that can be used with an
IlvJTree
.Modifier and Type | Field and Description |
---|---|
protected IlvJTree |
tree
The tree for which this is the rendering policy.
|
Constructor and Description |
---|
IlvAbstractJTreeRenderPolicy()
Construct a new cell rendering and editing policy.
|
Modifier and Type | Method and Description |
---|---|
TreeCellEditor |
getEditor()
Return this policy's
TreeCellEditor . |
IlvJTree |
getTree()
Return the tree for which this policy is rendering, or
null if this policy has not been associated with a
tree. |
boolean |
isEditable(IlvHierarchyNode row)
Return whether the specified row is editable.
|
void |
rowUpdated(IlvHierarchyNode row)
Invoke this method to notify the tree that the representation of the
specified
row has changed. |
void |
setGanttConfiguration(IlvGanttConfiguration ganttConfig)
This method is invoked whenever this rendering policy is added to or
removed from the Gantt configuration.
|
void |
setTree(IlvJTree tree)
This method is invoked whenever this rendering policy is added to or
removed from its
IlvJTree . |
void |
setValue(IlvHierarchyNode row,
Object value)
Set the value of the data model at the specified row.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRenderer, getValueAsText
protected IlvJTree tree
public IlvAbstractJTreeRenderPolicy()
public IlvJTree getTree()
null
if this policy has not been associated with a
tree.public void setTree(IlvJTree tree)
IlvJTree
.
Warning: This method is considered to be part of an
IlvJTreeRenderPolicy
's internal implementation and is
not a public API. Only the IlvJTree
should invoke this
method.
setTree
in interface IlvJTreeRenderPolicy
tree
- the tree that this render policy is being assigned to, or
null
if this policy is being unassigned from
its treepublic void setGanttConfiguration(IlvGanttConfiguration ganttConfig)
This default implementation does nothing. Subclasses should override this method as needed.
Warning: This method is considered to be part of an
IlvJTreeRenderPolicy's
's internal implementation and
is not a public API. Only the IlvJTree
should invoke
this method.
setGanttConfiguration
in interface IlvJTreeRenderPolicy
ganttConfig
- the Gantt configuration that this rendering policy
is being added to, or null
if this policy is
being removed from its Gantt configurationpublic TreeCellEditor getEditor()
TreeCellEditor
. This default
implementation returns null
, indicating that the tree
is not be editable. Subclasses should override this method as needed.getEditor
in interface IlvJTreeRenderPolicy
public boolean isEditable(IlvHierarchyNode row)
row
will match the row organization of the
Gantt configuration of which the tree is a member. In other words, if
the Gantt configuration's row type is ACTIVITY_ROWS
,
then row
will be an IlvActivity
.
Otherwise, the Gantt configuration's row type is
RESOURCE_ROWS
and row
will be an
IlvResource
.
This default implementation always returns false
.
Subclasses should override this method as needed.
isEditable
in interface IlvJTreeRenderPolicy
row
- the rowpublic void setValue(IlvHierarchyNode row, Object value)
row
will match the row organization of the
Gantt configuration of which the tree is a member. In other words, if
the Gantt configuration's row type is ACTIVITY_ROWS
,
then row
will be an IlvActivity
.
Otherwise, the Gantt configuration's row type is
RESOURCE_ROWS
and row
will be an
IlvResource
.
This default implementation does nothing, so subclasses do not have to implement this method if the tree is not editable. If a rendering policy subclass allows the tree to be edited, it should override this method to properly store the edited row value back into the Gantt data model.
setValue
in interface IlvJTreeRenderPolicy
row
- the rowvalue
- the new valuepublic void rowUpdated(IlvHierarchyNode row)
row
has changed. The tree will then repaint
the row.row
- the row whose visual representation has changed© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.