|
org.netbeans.spi.viewmodel/2 1.26.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.viewmodel.Models.CompoundModel
public static final class Models.CompoundModel
This model encapsulates all currently supported models.
Models.createCompoundModel(java.util.List)| Field Summary |
|---|
| Fields inherited from interface org.netbeans.spi.viewmodel.TreeModel |
|---|
ROOT |
| Method Summary | |
|---|---|
void |
addModelListener(ModelListener l)
Registers given listener. |
Executor |
asynchronous(AsynchronousModelFilter.CALL asynchCall,
Object node)
|
boolean |
canCopy(Object node)
Test whether this node permits copying. |
boolean |
canCut(Object node)
Test whether this node permits cutting. |
boolean |
canEditCell(Object node,
String columnID)
Test whether this renderer can edit the given cell. |
boolean |
canRename(Object node)
Test whether this node permits renaming. |
boolean |
canRenderCell(Object node,
String columnID)
Test whether this renderer can render the given cell. |
boolean |
canReorder(Object parent)
Provide if this model implementation can reorder children nodes. |
Transferable |
clipboardCopy(Object node)
Called when a node is to be copied to the clipboard. |
Transferable |
clipboardCut(Object node)
Called when a node is to be cut to the clipboard. |
Transferable |
drag(Object node)
Initiate a drag operation. |
Action[] |
getActions(Object node)
Returns set of actions for given node. |
int |
getAllowedDragActions()
Action constants from DnDConstants. |
int |
getAllowedDropActions(Transferable t)
Action constants from DnDConstants. |
TableCellEditor |
getCellEditor(Object node,
String columnID)
Get the editor of the given cell |
TableCellRenderer |
getCellRenderer(Object node,
String columnID)
Get the renderer of the given cell |
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 ColumnModels. |
String |
getDisplayName(Object node)
Returns display name for given node. |
PasteType |
getDropType(Object node,
Transferable t,
int action,
int index)
Determines if there is a paste operation that can be performed on provided transferable when drop is done. |
String |
getHelpId()
Get a help ID for this model. |
String |
getIconBase(Object node)
Returns icon for given node. |
String |
getIconBaseWithExtension(Object node)
Returns icon resource with extension for given node. |
PasteType[] |
getPasteTypes(Object node,
Transferable t)
Determine which paste operations are allowed when a given transferable is in the clipboard. |
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 |
isCheckable(Object node)
Tell the renderer to display the check-box. |
boolean |
isCheckEnabled(Object node)
Provide the enabled state of the check-box. |
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. |
Boolean |
isSelected(Object node)
Provide the selected state of the check-box. |
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 |
reorder(Object parent,
int[] perm)
Reorder children nodes with a given permutation. |
void |
setName(Object node,
String name)
Sets a new name for given node. |
void |
setSelected(Object node,
Boolean selected)
Called by the renderer when the check-box gets selected/unselected |
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()
getRoot in interface TreeModel
public Object[] getChildren(Object parent,
int from,
int to)
throws UnknownTypeException
getChildren in interface TreeModelparent - 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 typeTreeModel.getChildrenCount(java.lang.Object)
public int getChildrenCount(Object node)
throws UnknownTypeException
getChildrenCount in interface TreeModelnode - the parent node
UnknownTypeException - if this TreeModel implementation is not
able to resolve children for given node typeTreeModel.getChildren(java.lang.Object, int, int)
public boolean isLeaf(Object node)
throws UnknownTypeException
isLeaf in interface TreeModelUnknownTypeException - if this TreeModel implementation is not
able to resolve dchildren for given node type
public boolean canReorder(Object parent)
throws UnknownTypeException
ReorderableTreeModel
canReorder in interface ReorderableTreeModelparent - The parent node of children that are test for reorder
true if this model can handle reordering of children,
false otherwise
UnknownTypeException - if this model implementation is not
able to decide the reorder capability for given node type
public void reorder(Object parent,
int[] perm)
throws UnknownTypeException
ReorderableTreeModel
reorder in interface ReorderableTreeModelparent - The parent node of children that are being reorderedperm - permutation with the length of current child nodes. The permutation
lists the new positions of the original nodes, that is, for nodes
[A,B,C,D] and permutation [0,3,1,2], the final
order would be [A,C,D,B].
UnknownTypeException - if this model implementation is not
able to perform the reorder for given node type
public String getDisplayName(Object node)
throws UnknownTypeException
getDisplayName in interface NodeModelUnknownTypeException - if this NodeModel implementation is not
able to resolve display name for given node type
public String getShortDescription(Object node)
throws UnknownTypeException
getShortDescription in interface NodeModelUnknownTypeException - if this NodeModel implementation is not
able to resolve tooltip for given node type
public String getIconBase(Object node)
throws UnknownTypeException
getIconBase in interface NodeModelUnknownTypeException - if this NodeModel implementation is not
able to resolve icon for given node type
public void performDefaultAction(Object node)
throws UnknownTypeException
performDefaultAction in interface NodeActionsProviderUnknownTypeException - if this NodeActionsProvider implementation
is not able to resolve actions for given node type
public Action[] getActions(Object node)
throws UnknownTypeException
getActions in interface NodeActionsProviderUnknownTypeException - if this NodeActionsProvider implementation
is not able to resolve actions for given node typepublic ColumnModel[] getColumns()
ColumnModels.
public Object getValueAt(Object node,
String columnID)
throws UnknownTypeException
TableModelcolumnID
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 TableModelnode - 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 type
public boolean isReadOnly(Object node,
String columnID)
throws UnknownTypeException
TableModelcolumnID
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 TableModelnode - 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 type
public void setValueAt(Object node,
String columnID,
Object value)
throws UnknownTypeException
TableModelcolumnID
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 TableModelnode - 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 type
public boolean isExpanded(Object node)
throws UnknownTypeException
isExpanded in interface TreeExpansionModelnode - a node
UnknownTypeExceptionpublic void nodeExpanded(Object node)
nodeExpanded in interface TreeExpansionModelnode - a expanded nodepublic void nodeCollapsed(Object node)
nodeCollapsed in interface TreeExpansionModelnode - a collapsed nodepublic void addModelListener(ModelListener l)
addModelListener in interface NodeModeladdModelListener in interface TableModeladdModelListener in interface TableRendererModeladdModelListener in interface TreeModell - the listener to addpublic void removeModelListener(ModelListener l)
removeModelListener in interface NodeModelremoveModelListener in interface TableModelremoveModelListener in interface TableRendererModelremoveModelListener in interface TreeModell - the listener to removepublic String toString()
toString in class Object
public boolean canRename(Object node)
throws UnknownTypeException
ExtendedNodeModel
canRename in interface ExtendedNodeModeltrue if so
UnknownTypeException
public boolean canCopy(Object node)
throws UnknownTypeException
ExtendedNodeModel
canCopy in interface ExtendedNodeModeltrue if so
UnknownTypeException
public boolean canCut(Object node)
throws UnknownTypeException
ExtendedNodeModel
canCut in interface ExtendedNodeModeltrue if so
UnknownTypeException
public Transferable clipboardCopy(Object node)
throws IOException,
UnknownTypeException
ExtendedNodeModel
clipboardCopy in interface ExtendedNodeModelnode - The node object
IOException - when the copy cannot be performed
UnknownTypeException
public Transferable clipboardCut(Object node)
throws IOException,
UnknownTypeException
ExtendedNodeModel
clipboardCut in interface ExtendedNodeModelnode - The node object
IOException - when the cut cannot be performed
UnknownTypeExceptionpublic int getAllowedDragActions()
DnDNodeModelDnDConstants.
No actions are allowed by default.
getAllowedDragActions in interface DnDNodeModelpublic int getAllowedDropActions(Transferable t)
DnDNodeModelDnDConstants.
No actions are allowed by default.
getAllowedDropActions in interface DnDNodeModelt - The transferable for which the allowed drop actions are requested,
or null to get actions for the creation of DropTarget for the view.
public Transferable drag(Object node)
throws IOException,
UnknownTypeException
DnDNodeModel
drag in interface DnDNodeModelnode - The node to drag
IOException - when the drag cannot be performed
UnknownTypeException - if this model implementation is not
able to perform drag for given node type
public PasteType[] getPasteTypes(Object node,
Transferable t)
throws UnknownTypeException
ExtendedNodeModel
getPasteTypes in interface ExtendedNodeModelnode - The node objectt - the transferable in the clipboard
UnknownTypeException
public PasteType getDropType(Object node,
Transferable t,
int action,
int index)
throws UnknownTypeException
DnDNodeModel
getDropType in interface DnDNodeModelnode - The node where to dropt - the transferable to dropaction - the Drag and Drop action from DnDConstantsindex - index between children the drop occured at or -1 if not specified
UnknownTypeException - if this model implementation is not
able to perform drop for given node type
public void setName(Object node,
String name)
throws UnknownTypeException
ExtendedNodeModel
setName in interface ExtendedNodeModelnode - The object to set the new name to.name - The new name for the given node
UnknownTypeException
public String getIconBaseWithExtension(Object node)
throws UnknownTypeException
ExtendedNodeModelorg.netbeans.spi.viewmodel.NodeModel.getIconBase
getIconBaseWithExtension in interface ExtendedNodeModelnode - The node object
UnknownTypeException - if this NodeModel implementation is not
able to resolve icon for given node type
public boolean isCheckable(Object node)
throws UnknownTypeException
CheckNodeModel
isCheckable in interface CheckNodeModelnode - the tree node object
true if the check-box should be displayed, false otherwise.
UnknownTypeException
public boolean isCheckEnabled(Object node)
throws UnknownTypeException
CheckNodeModel
isCheckEnabled in interface CheckNodeModelnode - the tree node object
true if the check-box should be enabled, false otherwise.
UnknownTypeException
public Boolean isSelected(Object node)
throws UnknownTypeException
CheckNodeModel
isSelected in interface CheckNodeModelnode - the tree node object
true if the check-box should be selected,
false if it should be unselected and
null if the state is unknown.
UnknownTypeException
public void setSelected(Object node,
Boolean selected)
throws UnknownTypeException
CheckNodeModel
setSelected in interface CheckNodeModelnode - the tree node objectselected - true if the check-box was selected,
false if the check-box was unselected.
UnknownTypeException
public Executor asynchronous(AsynchronousModelFilter.CALL asynchCall,
Object node)
throws UnknownTypeException
UnknownTypeException
public boolean canRenderCell(Object node,
String columnID)
throws UnknownTypeException
TableRendererModel
canRenderCell in interface TableRendererModelnode - Tree node representing the rowcolumnID - The column name
true if the implementation can render the given cell, false otherwise
UnknownTypeException - If the implementation can not decide whether to render the given cell.
public TableCellRenderer getCellRenderer(Object node,
String columnID)
throws UnknownTypeException
TableRendererModel
getCellRenderer in interface TableRendererModelnode - Tree node representing the rowcolumnID - The column name
UnknownTypeException - If the implementation can not render the given cell.
public boolean canEditCell(Object node,
String columnID)
throws UnknownTypeException
TableRendererModel
canEditCell in interface TableRendererModelnode - Tree node representing the rowcolumnID - The column name
true if the implementation can edit the given cell, false otherwise
UnknownTypeException - If the implementation can not decide whether to edit the given cell.
public TableCellEditor getCellEditor(Object node,
String columnID)
throws UnknownTypeException
TableRendererModel
getCellEditor in interface TableRendererModelnode - Tree node representing the rowcolumnID - The column name
UnknownTypeException - If the implementation can not edit the given cell.
|
org.netbeans.spi.viewmodel/2 1.26.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||