|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.policy.AbstractPolicy com.dlsc.flexgantt.policy.treetable.DefaultNodeEditPolicy
public class DefaultNodeEditPolicy
The default implementation of the edit policy for tree table nodes. For a
general description of the purpose of this policy please refer to
INodeEditPolicy
.
Constructor Summary | |
---|---|
DefaultNodeEditPolicy()
|
Method Summary | |
---|---|
ICommand |
getChangeKeyCommand(java.lang.Object node,
ITreeTableModel model,
java.lang.Object key)
Returns a command object that will perform the modification of the key value of the given node. |
ICommand |
getChangeValueCommand(java.lang.Object node,
ITreeTableModel model,
java.lang.Object value,
int index)
Returns a command object that will perform the modification of the key value of the given node. |
ICommand |
getCreateNodeCommand(java.lang.Object node,
ITreeTableModel model,
java.lang.Object key,
java.lang.Object[] values)
Returns a command object that will perform the creation of a new tree / hierarchy node in the given tree table model. |
ICommand |
getDeleteNodeCommand(java.lang.Object node,
ITreeTableModel model)
Returns a command object that will perform the actual deletion of the given node. |
boolean |
isCreateEnabled(ITreeTableModel model)
Determines if the tree table supports the creation of new tree nodes by the user. |
boolean |
isDeletable(java.lang.Object node,
ITreeTableModel model)
Determines if the node can be deleted by the user. |
boolean |
isKeyEditable(java.lang.Object node,
ITreeTableModel model)
Determines if the key value of the given tree / hierarchy node can be edited by the user. |
boolean |
isSelectable(java.lang.Object node,
ITreeTableModel model)
Determines if the node can be selected by the user. |
boolean |
isValueEditable(java.lang.Object node,
ITreeTableModel model,
int modelIndex)
Determines if the column value with the given model index can be edited by the user. |
Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy |
---|
assertClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultNodeEditPolicy()
Method Detail |
---|
public boolean isKeyEditable(java.lang.Object node, ITreeTableModel model)
INodeEditPolicy
isKeyEditable
in interface INodeEditPolicy
node
- the node that is the target of the editing operationmodel
- the tree table model to which the node belongs
public boolean isValueEditable(java.lang.Object node, ITreeTableModel model, int modelIndex)
INodeEditPolicy
isValueEditable
in interface INodeEditPolicy
node
- the node that is the target of the editing operationmodel
- the tree table model to which the node belongsmodelIndex
- the model index under which the column value can be looked up
and stored
public boolean isDeletable(java.lang.Object node, ITreeTableModel model)
INodeEditPolicy
isDeletable
in interface INodeEditPolicy
node
- the node that will be deletedmodel
- the tree table model to which the node belongs
public boolean isSelectable(java.lang.Object node, ITreeTableModel model)
INodeEditPolicy
isSelectable
in interface INodeEditPolicy
node
- the node that will be selectedmodel
- the tree table model to which the node belongs
public boolean isCreateEnabled(ITreeTableModel model)
INodeEditPolicy
isCreateEnabled
in interface INodeEditPolicy
model
- the tree table model that will be modified if a new node gets
created
public ICommand getDeleteNodeCommand(java.lang.Object node, ITreeTableModel model)
INodeEditPolicy
getDeleteNodeCommand
in interface INodeEditPolicy
node
- the node that needs to be deletedmodel
- the model from which the node will be removed
INodeEditPolicy.isDeletable(Object, ITreeTableModel)
public ICommand getCreateNodeCommand(java.lang.Object node, ITreeTableModel model, java.lang.Object key, java.lang.Object[] values)
INodeEditPolicy
getCreateNodeCommand
in interface INodeEditPolicy
node
- the parent node to which the new node will be addedmodel
- the tree table model to which the node will be addedkey
- the initial key value of the new nodevalues
- the initial column values of the new node
public ICommand getChangeKeyCommand(java.lang.Object node, ITreeTableModel model, java.lang.Object key)
INodeEditPolicy
getChangeKeyCommand
in interface INodeEditPolicy
node
- the node that will be modifiedmodel
- the model to which the node belongskey
- the new value of the node's key
public ICommand getChangeValueCommand(java.lang.Object node, ITreeTableModel model, java.lang.Object value, int index)
INodeEditPolicy
getChangeValueCommand
in interface INodeEditPolicy
node
- the node that will be modifiedmodel
- the model to which the node belongsvalue
- the new column valueindex
- the model index of the column value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |