org.netbeans.spi.viewmodel/2 1.32.1

org.netbeans.spi.viewmodel
Interface CheckNodeModelFilter

All Superinterfaces:
Model, NodeModelFilter

public interface CheckNodeModelFilter
extends NodeModelFilter

A model filter for CheckNodeModel. Can be also used to add the check-boxes to an ordinary NodeModel.

Since:
1.17

Method Summary
 boolean isCheckable(NodeModel original, Object node)
          Tell the renderer to display the check-box.
 boolean isCheckEnabled(NodeModel original, Object node)
          Provide the enabled state of the check-box.
 Boolean isSelected(NodeModel original, Object node)
          Provide the selected state of the check-box.
 void setSelected(NodeModel original, Object node, Boolean selected)
          Called by the renderer when the check-box gets selected/unselected
 
Methods inherited from interface org.netbeans.spi.viewmodel.NodeModelFilter
addModelListener, getDisplayName, getIconBase, getShortDescription, removeModelListener
 

Method Detail

isCheckable

boolean isCheckable(NodeModel original,
                    Object node)
                    throws UnknownTypeException
Tell the renderer to display the check-box.

Parameters:
original - the original node model
node - the tree node object
Returns:
true if the check-box should be displayed, false otherwise.
Throws:
UnknownTypeException

isCheckEnabled

boolean isCheckEnabled(NodeModel original,
                       Object node)
                       throws UnknownTypeException
Provide the enabled state of the check-box.

Parameters:
original - the original node model
node - the tree node object
Returns:
true if the check-box should be enabled, false otherwise.
Throws:
UnknownTypeException

isSelected

Boolean isSelected(NodeModel original,
                   Object node)
                   throws UnknownTypeException
Provide the selected state of the check-box.

Parameters:
original - the original node model
node - the tree node object
Returns:
true if the check-box should be selected, false if it should be unselected and null if the state is unknown.
Throws:
UnknownTypeException

setSelected

void setSelected(NodeModel original,
                 Object node,
                 Boolean selected)
                 throws UnknownTypeException
Called by the renderer when the check-box gets selected/unselected

Parameters:
original - the original node model
node - the tree node object
selected - true if the check-box was selected, false if the check-box was unselected.
Throws:
UnknownTypeException

org.netbeans.spi.viewmodel/2 1.32.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.