FAbstractToggleNode
Keywords: com.fg.ftreenodes.FAbstractToggleNode class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fg.ftreenodes
Class FAbstractToggleNode

    java.lang.Object
      com.fg.ftree.FBasicNode
          com.fg.ftreenodes.FAbstractToggleNode

All Implemented Interfaces:
  FActionConstants, FNodeCellGUI, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

Direct Known Subclasses:
  FToggleNode

public abstract class FAbstractToggleNode
extends FBasicNode
implements FNodeCellGUI

FAbstractToggleNode class is an ancestor of multiple toggle-node classes, which can be displayed by the custom Swing tree component `FTree`. Class provides basic toggle-node functionality, which allows a user to enable/disable a node (and the whole tree branches) with a mouse click at the node toggle-control (check-box or radio button). Class implements `FNodeCellGUI` interface, thus providing `FTree` component with information needed for creatig/finding of the node GUI components.

Version:
  2.0
Author:
  Felix Golubov

Field Summary
`static int` | `TOGGLE_SELECTION_CHANGED`

Fields inherited from class com.fg.ftree.FBasicNode
`ALLOWS_CHILDREN, EDITABLE`

Fields inherited from interface com.fg.ftree.FActionConstants
`CHANGE_EXPANSION, DROP_SELECTION, EDIT_CELL, NO_ACTION, SELECT_NODE`

Constructor Summary
`FAbstractToggleNode(CommonSettings cs)`
`FAbstractToggleNode(CommonSettings cs, java.lang.String labelText)`

Method Summary
`int` | `cellClicked(FTree tree, javax.swing.JComponent c, int x, int y, java.util.List targetList)`
`javax.swing.JComponent` | `createCellControl(FTree tree, boolean isEditor)`
`boolean` | `getAllowsFlattening()`
`java.lang.Object` | `getAssociate()`
`java.lang.Object` | `getCellControlKey(FTree tree)`
`boolean` | `getChildrenValidity()`
`abstract java.lang.Object` | `getExtraClassOrId()`
`java.awt.Image` | `getFadedLabelImage()`
`java.awt.Color` | `getFolderBackground()`
`java.awt.Color` | `getFolderBarColor(FTree tree)`
`java.awt.Color` | `getFolderColor(FTree tree)`
`java.awt.Image` | `getLabelImage()`
`java.lang.String` | `getLabelText()`
`boolean` | `getNodeValidity()`
`abstract Params` | `getParameters()`
`javax.swing.tree.TreeNode` | `getRealChildAt(int index)`
`int` | `getRealChildCount()`
`int` | `getRowHeight(FTree tree)`
`FAbstractToggleNode` | `getSubstituteNode()`
`abstract java.lang.Object` | `getValue()`
`void` | `insert(javax.swing.tree.MutableTreeNode child, int index)`
`boolean` | `isFolderBarDecorated()`
`boolean` | `isNodeSelectionAllowed(FTree tree)`
`boolean` | `isPathSelected()`
`boolean` | `isRadioUnselectable()`
`boolean` | `isToggleEnabled()`
`boolean` | `isToggleRadio()`
`boolean` | `isToggleSelected()`
`boolean` | `isToggleVisible()`
`void` | `remove(javax.swing.tree.MutableTreeNode node)`
`void` | `setAllowsFlattening(boolean flattening)`
`void` | `setAssociate(java.lang.Object associate)`
`void` | `setFolderBarDecorated(boolean decorated)`
`void` | `setLabelText(java.lang.String labelText)`
`void` | `setNodeValidity(boolean nodeValidity)`
`void` | `setParameters(java.util.List params)`
`void` | `setRadioUnselectable(boolean radioUnselectable)`
`void` | `setToggleEnabled(boolean toggleEnabled)`
`void` | `setToggleRadio(boolean toggleRadio)`
`FAbstractToggleNode` | `setToggleSelected(boolean toggleSelected)`
`void` | `setToggleVisible(boolean toggleVisible)`
`abstract void` | `setValue(java.lang.Object value)`
`java.lang.String` | `toString()`
`void` | `updateCellControl(FTree tree, javax.swing.JComponent c, boolean isEditor, boolean selected)`
`void` | `updateNode(FTree tree, javax.swing.JComponent c, boolean directStopEditing)`

Methods inherited from class com.fg.ftree.FBasicNode
`add, children, getAllowsChildren, getChildAt, getChildCount, 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`

Field Detail

### TOGGLE_SELECTION_CHANGED

    public static final int TOGGLE_SELECTION_CHANGED

See Also:
  Constant Field Values

Constructor Detail

### FAbstractToggleNode

    public FAbstractToggleNode(CommonSettings cs)

### FAbstractToggleNode

    public FAbstractToggleNode(CommonSettings cs,
                               java.lang.String labelText)

Method Detail

### getExtraClassOrId

    public abstract java.lang.Object getExtraClassOrId()

### getParameters

    public abstract Params getParameters()

### getValue

    public abstract java.lang.Object getValue()

### setValue

    public abstract void setValue(java.lang.Object value)

### getRealChildCount

    public int getRealChildCount()

### getRealChildAt

    public javax.swing.tree.TreeNode getRealChildAt(int index)

### getSubstituteNode

    public FAbstractToggleNode getSubstituteNode()

### setParameters

    public void setParameters(java.util.List params)

### insert

    public void insert(javax.swing.tree.MutableTreeNode child,
                       int index)

  Specified by:
    `insert` in interface `javax.swing.tree.MutableTreeNode`
  Overrides:
    `insert` in class `FBasicNode`

### remove

    public void remove(javax.swing.tree.MutableTreeNode node)

  Specified by:
    `remove` in interface `javax.swing.tree.MutableTreeNode`
  Overrides:
    `remove` in class `FBasicNode`

### setAllowsFlattening

    public void setAllowsFlattening(boolean flattening)

### getAllowsFlattening

    public boolean getAllowsFlattening()

### setFolderBarDecorated

    public void setFolderBarDecorated(boolean decorated)

### isFolderBarDecorated

    public boolean isFolderBarDecorated()

### getFolderBarColor

    public java.awt.Color getFolderBarColor(FTree tree)

  Specified by:
    `getFolderBarColor` in interface `FNodeCellGUI`

### setToggleRadio

    public void setToggleRadio(boolean toggleRadio)

### isToggleRadio

    public boolean isToggleRadio()

### setToggleVisible

    public void setToggleVisible(boolean toggleVisible)

### isToggleVisible

    public boolean isToggleVisible()

### setToggleEnabled

    public void setToggleEnabled(boolean toggleEnabled)

### isToggleEnabled

    public boolean isToggleEnabled()

### setToggleSelected

    public FAbstractToggleNode setToggleSelected(boolean toggleSelected)

### isToggleSelected

    public boolean isToggleSelected()

### setRadioUnselectable

    public void setRadioUnselectable(boolean radioUnselectable)

### isRadioUnselectable

    public boolean isRadioUnselectable()

### isPathSelected

    public boolean isPathSelected()

### setNodeValidity

    public void setNodeValidity(boolean nodeValidity)

### getNodeValidity

    public boolean getNodeValidity()

### getChildrenValidity

    public boolean getChildrenValidity()

### getLabelImage

    public java.awt.Image getLabelImage()

### getFadedLabelImage

    public java.awt.Image getFadedLabelImage()

### setLabelText

    public void setLabelText(java.lang.String labelText)

### getLabelText

    public java.lang.String getLabelText()

### getFolderBackground

    public java.awt.Color getFolderBackground()

### getRowHeight

    public int getRowHeight(FTree tree)

  Specified by:
    `getRowHeight` in interface `FNodeCellGUI`

### getFolderColor

    public java.awt.Color getFolderColor(FTree tree)

  Specified by:
    `getFolderColor` in interface `FNodeCellGUI`

### getCellControlKey

    public java.lang.Object getCellControlKey(FTree tree)

  Specified by:
    `getCellControlKey` in interface `FNodeCellGUI`

### createCellControl

    public javax.swing.JComponent createCellControl(FTree tree,
                                                    boolean isEditor)

  Specified by:
    `createCellControl` in interface `FNodeCellGUI`

### updateCellControl

    public void updateCellControl(FTree tree,
                                  javax.swing.JComponent c,
                                  boolean isEditor,
                                  boolean selected)

  Specified by:
    `updateCellControl` in interface `FNodeCellGUI`

### updateNode

    public void updateNode(FTree tree,
                           javax.swing.JComponent c,
                           boolean directStopEditing)

  Specified by:
    `updateNode` in interface `FNodeCellGUI`

### isNodeSelectionAllowed

    public boolean isNodeSelectionAllowed(FTree tree)

  Specified by:
    `isNodeSelectionAllowed` in interface `FNodeCellGUI`

### cellClicked

    public int cellClicked(FTree tree,
                           javax.swing.JComponent c,
                           int x,
                           int y,
                           java.util.List targetList)

  Specified by:
    `cellClicked` in interface `FNodeCellGUI`

### getAssociate

    public java.lang.Object getAssociate()

### setAssociate

    public void setAssociate(java.lang.Object associate)

### toString

    public java.lang.String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD