|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.spi.viewmodel.Models.CompoundModel
This model encapsulates all currently supported models.
Field Summary |
Fields inherited from interface org.netbeans.spi.viewmodel.TreeModel |
ROOT |
Method Summary | |
void |
addModelListener(ModelListener l)
Registers given listener. |
Action[] |
getActions(Object node)
Returns set of actions for given node. |
Object[] |
getChildren(Object parent,
int from,
int to)
Returns children for given parent on given indexes. |
int |
getChildrenCount(Object node)
Returns number of children for given node. |
ColumnModel[] |
getColumns()
Returns sorted array of ColumnModel s. |
String |
getDisplayName(Object node)
Returns display name for given node. |
String |
getHelpId()
Get a help ID for this model. |
String |
getIconBase(Object node)
Returns icon for given node. |
Object |
getRoot()
Returns the root node of the tree or null, if the tree is empty. |
String |
getShortDescription(Object node)
Returns tooltip for given node. |
Object |
getValueAt(Object node,
String columnID)
Returns value to be displayed in column columnID
and row identified by node . |
boolean |
isExpanded(Object node)
Defines default state (collapsed, expanded) of given node. |
boolean |
isLeaf(Object node)
Returns true if node is leaf. |
boolean |
isReadOnly(Object node,
String columnID)
Returns true if value displayed in column columnID
and row node is read only. |
void |
nodeCollapsed(Object node)
Called when given node is collapsed. |
void |
nodeExpanded(Object node)
Called when given node is expanded. |
void |
performDefaultAction(Object node)
Performs default action for given node. |
void |
removeModelListener(ModelListener l)
Unregisters given listener. |
void |
setValueAt(Object node,
String columnID,
Object value)
Changes a value displayed in column columnID
and row node . |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public String getHelpId()
null
.public Object getRoot()
public Object[] getChildren(Object parent, int from, int to) throws UnknownTypeException
getChildren
in interface TreeModel
parent
- a parent of returned nodesfrom
- a start indexto
- a end index
UnknownTypeException
- if this TreeModel implementation is not
able to resolve dchildren for given node typepublic int getChildrenCount(Object node) throws UnknownTypeException
getChildrenCount
in interface TreeModel
node
- the parent node
UnknownTypeException
- if this TreeModel implementation is not
able to resolve children for given node typepublic boolean isLeaf(Object node) throws UnknownTypeException
UnknownTypeException
- if this TreeModel implementation is not
able to resolve dchildren for given node typepublic String getDisplayName(Object node) throws UnknownTypeException
getDisplayName
in interface NodeModel
UnknownTypeException
- if this NodeModel implementation is not
able to resolve display name for given node typepublic String getShortDescription(Object node) throws UnknownTypeException
getShortDescription
in interface NodeModel
UnknownTypeException
- if this NodeModel implementation is not
able to resolve tooltip for given node typepublic String getIconBase(Object node) throws UnknownTypeException
getIconBase
in interface NodeModel
UnknownTypeException
- if this NodeModel implementation is not
able to resolve icon for given node typepublic void performDefaultAction(Object node) throws UnknownTypeException
performDefaultAction
in interface NodeActionsProvider
UnknownTypeException
- if this NodeActionsProvider implementation
is not able to resolve actions for given node typepublic Action[] getActions(Object node) throws UnknownTypeException
getActions
in interface NodeActionsProvider
UnknownTypeException
- if this NodeActionsProvider implementation
is not able to resolve actions for given node typepublic ColumnModel[] getColumns()
ColumnModel
s.
public Object getValueAt(Object node, String columnID) throws UnknownTypeException
TableModel
columnID
and row identified by node
. Column ID is defined in by
ColumnModel.getID()
, and rows are defined by values returned from
TreeModel.getChildren(java.lang.Object, int, int)
.
getValueAt
in interface TableModel
node
- a object returned from
TreeModel.getChildren(java.lang.Object, int, int)
for this rowcolumnID
- a id of column defined by ColumnModel.getID()
UnknownTypeException
- if there is no TableModel defined for given
parameter typepublic boolean isReadOnly(Object node, String columnID) throws UnknownTypeException
TableModel
columnID
and row node
is read only. Column ID is defined in by
ColumnModel.getID()
, and rows are defined by values returned from
TreeModel.getChildren(java.lang.Object, int, int)
.
isReadOnly
in interface TableModel
node
- a object returned from TreeModel.getChildren(java.lang.Object, int, int)
for this rowcolumnID
- a id of column defined by ColumnModel.getID()
UnknownTypeException
- if there is no TableModel defined for given
parameter typepublic void setValueAt(Object node, String columnID, Object value) throws UnknownTypeException
TableModel
columnID
and row node
. Column ID is defined in by
ColumnModel.getID()
, and rows are defined by values returned from
TreeModel.getChildren(java.lang.Object, int, int)
.
setValueAt
in interface TableModel
node
- a object returned from TreeModel.getChildren(java.lang.Object, int, int)
for this rowcolumnID
- a id of column defined by ColumnModel.getID()
value
- a new value of variable on given position
UnknownTypeException
- if there is no TableModel defined for given
parameter typepublic boolean isExpanded(Object node) throws UnknownTypeException
isExpanded
in interface TreeExpansionModel
node
- a node
UnknownTypeException
public void nodeExpanded(Object node)
nodeExpanded
in interface TreeExpansionModel
node
- a expanded nodepublic void nodeCollapsed(Object node)
nodeCollapsed
in interface TreeExpansionModel
node
- a collapsed nodepublic void addModelListener(ModelListener l)
addModelListener
in interface TreeModel
l
- the listener to addpublic void removeModelListener(ModelListener l)
removeModelListener
in interface TreeModel
l
- the listener to removepublic String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |