org.netbeans.spi.viewmodel/2 1.32.1

org.netbeans.spi.viewmodel
Interface CheckNodeModel

All Superinterfaces:
Model, NodeModel
All Known Implementing Classes:
Models.CompoundModel

public interface CheckNodeModel
extends NodeModel

The extension of NodeModel that can display check-boxes next to the node display name. Instead of a special column with check-boxes, this extension can be used. It will make the UI cleaner and more usable.

Since:
1.17

Method Summary
 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 isSelected(Object node)
          Provide the selected state of the check-box.
 void setSelected(Object node, Boolean selected)
          Called by the renderer when the check-box gets selected/unselected
 
Methods inherited from interface org.netbeans.spi.viewmodel.NodeModel
addModelListener, getDisplayName, getIconBase, getShortDescription, removeModelListener
 

Method Detail

isCheckable

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

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

isCheckEnabled

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

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

isSelected

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

Parameters:
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(Object node,
                 Boolean selected)
                 throws UnknownTypeException
Called by the renderer when the check-box gets selected/unselected

Parameters:
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.