com.fg.ftreenodes
Class FToggleSwitchNode
java.lang.Object
com.fg.ftree.FBasicNode
com.fg.ftreenodes.FAbstractToggleNode
com.fg.ftreenodes.FToggleNode
com.fg.ftreenodes.FToggleDataNode
com.fg.ftreenodes.FToggleSwitchNode
- All Implemented Interfaces:
- FActionConstants, FNodeCellGUI, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
- public class FToggleSwitchNode
- extends FToggleDataNode
FToggleSwitchNode represents a particular kind of toggle-node
which was developed as a substitution for the radio-group of
toggle nodes. The FToggleSwitchNode GUI component
FToggleSwitchControl allows
selection of child nodes from a drop-down list, populated
with child nodes labels. The FToggleSwitchNode class overrides
getChildCount(), getChildAt(int),
getExtraClassOrId(), getValue(),
setValue(Object) and some other methods in the way that
each of these methods calls respective method of the
currently selected child node. Thus FToggleSwitchNode shows
not its own children but childern of the currently selected
child node, shows not its own value, but value of the selected
child node, etc. There are following restrictions for the
FToggleSwitchNode usage: Although toggle controls of the
child nodes are not visible, they have to be set to radio-buttons.
(See FAbstractToggleNode.setToggleRadio(boolean)).
Besides, no one of the FToggleSwitchNode child nodes can be of the
FToggleSwitchNode type itself. To make child selection possible,
all the FToggleSwitchNode child nodes have to have different
(and meaningful) labels.
- Version:
- 2.0
- Author:
- Felix Golubov
- See Also:
FToggleSwitchControl,
FTree
| Methods inherited from class com.fg.ftreenodes.FAbstractToggleNode |
cellClicked, getAllowsFlattening, getChildrenValidity, getFolderColor, getLabelText, getNodeValidity, getRealChildAt, getRealChildCount, getRowHeight, insert, isFolderBarDecorated, isNodeSelectionAllowed, isPathSelected, isRadioUnselectable, isToggleEnabled, isToggleRadio, isToggleSelected, isToggleVisible, remove, setAllowsFlattening, setFolderBarDecorated, setLabelText, setNodeValidity, setParameters, setRadioUnselectable, setToggleEnabled, setToggleRadio, setToggleSelected, setToggleVisible, toString, updateNode |
| Methods inherited from class com.fg.ftree.FBasicNode |
add, children, getFlag, getIndex, getParent, getPath, isEditable, isLeaf, moveContentTo, remove, removeFromParent, setAllowsChildren, setBranchEditable, setEditable, setFlag, setParent, setUserObject |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FToggleSwitchNode
public FToggleSwitchNode(java.lang.String labelText)
getSubstituteNode
public FAbstractToggleNode getSubstituteNode()
- Overrides:
getSubstituteNode in class FAbstractToggleNode
getChildCount
public int getChildCount()
- Specified by:
getChildCount in interface javax.swing.tree.TreeNode- Overrides:
getChildCount in class FBasicNode
getChildAt
public javax.swing.tree.TreeNode getChildAt(int index)
- Specified by:
getChildAt in interface javax.swing.tree.TreeNode- Overrides:
getChildAt in class FBasicNode
getCellControlKey
public java.lang.Object getCellControlKey(FTree tree)
- Specified by:
getCellControlKey in interface FNodeCellGUI- Overrides:
getCellControlKey in class FAbstractToggleNode
createCellControl
public javax.swing.JComponent createCellControl(FTree tree,
boolean isEditor)
- Specified by:
createCellControl in interface FNodeCellGUI- Overrides:
createCellControl in class FAbstractToggleNode
updateCellControl
public void updateCellControl(FTree tree,
javax.swing.JComponent c,
boolean isEditor,
boolean selected)
- Specified by:
updateCellControl in interface FNodeCellGUI- Overrides:
updateCellControl in class FAbstractToggleNode
getExtraClassOrId
public java.lang.Object getExtraClassOrId()
- Overrides:
getExtraClassOrId in class FToggleNode
getParameters
public Params getParameters()
- Overrides:
getParameters in class FToggleNode
getValue
public java.lang.Object getValue()
- Overrides:
getValue in class FToggleDataNode
setValue
public void setValue(java.lang.Object value)
- Overrides:
setValue in class FToggleDataNode
getFolderBackground
public java.awt.Color getFolderBackground()
- Overrides:
getFolderBackground in class FAbstractToggleNode
getFolderBarColor
public java.awt.Color getFolderBarColor(FTree tree)
- Specified by:
getFolderBarColor in interface FNodeCellGUI- Overrides:
getFolderBarColor in class FAbstractToggleNode
getLabelImage
public java.awt.Image getLabelImage()
- Overrides:
getLabelImage in class FAbstractToggleNode
getFadedLabelImage
public java.awt.Image getFadedLabelImage()
- Overrides:
getFadedLabelImage in class FAbstractToggleNode
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode- Overrides:
getAllowsChildren in class FBasicNode
switchBranch
public void switchBranch(FTree tree,
int index)