FTree
Keywords: com.fg.ftree.FTree 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.ftree
Class FTree

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      com.fg.ftree.FTree

All Implemented Interfaces:
  javax.accessibility.Accessible, FActionConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable

public class FTree
extends javax.swing.JPanel
implements javax.swing.Scrollable, FActionConstants

FTree is a Swing-based tree component, which allows displaying and edititing of various tree-structured data. The data to be displayed/edited with FTree has to be accessed through an object, which implements `FTreeModel` interface.The way tree nodes are displayed and edited are defined by an object which implements `FTreeCellGUI` interface.

Version:
  2.0
Author:
  Felix Golubov
See Also:
  `FTreeModel`, `FTreeCellGUI`, Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Field Summary

Fields inherited from class javax.swing.JComponent
`TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

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

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`FTree()`
`FTree(javax.swing.tree.TreeNode root)`

Method Summary
`void` | `addDialog(java.lang.Object id, javax.swing.JDialog dialog)`
`void` | `addFTreeActionListener(FTreeActionListener listener)`
`void` | `addFTreeEditorListener(FTreeEditorListener listener)`
`void` | `addFTreeExpansBarListener(FTreeExpansBarListener listener)`
`void` | `addFTreeExpansionListener(FTreeExpansionListener listener)`
`void` | `addFTreeSelectionListener(FTreeSelectionListener listener)`
`void` | `addNotify()`
`static void` | `cancelCellEditing(javax.swing.JComponent editor)`
`boolean` | `cancelEditing()`
`static void` | `cellEditorValueChanged(javax.swing.JComponent editor, java.lang.Object event)`
`void` | `doLayout()`
`void` | `fireActionEvent(java.lang.Object node, int action)`
`void` | `fireExpansBarEvent(java.lang.Object node, boolean entered)`
`void` | `fireExpansionEvent(boolean afterExpansion, java.lang.Object node)`
`void` | `fireSelectionEvent(java.lang.Object node, boolean selected)`
`int` | `getCellsLeftInset()`
`javax.swing.JDialog` | `getDialog(java.lang.Object id)`
`java.lang.Object` | `getEditingNode()`
`java.lang.Object[]` | `getEditingPath()`
`int` | `getGapBetweenHorizontalBorders()`
`int` | `getGapBetweenVerticalBorders()`
`int` | `getHorizontalBordersWidth()`
`java.awt.Insets` | `getInsets()`
`java.lang.Object` | `getNodeAt(int x, int y)`
`java.awt.Dimension` | `getPreferredScrollableViewportSize()`
`java.awt.Dimension` | `getPreferredSize()`
`java.lang.Object` | `getRoot()`
`int` | `getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)`
`boolean` | `getScrollableTracksViewportHeight()`
`boolean` | `getScrollableTracksViewportWidth()`
`int` | `getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)`
`java.lang.Object` | `getSelectedNode()`
`java.lang.Object[]` | `getSelectedPath()`
`FTreeCellGUI` | `getTreeCellGUI()`
`FTreeModel` | `getTreeModel()`
`int` | `getVerticalBordersWidth()`
`boolean` | `isNodeExpanded(java.lang.Object node)`
`boolean` | `isReducedView()`
`void` | `makeVisible(java.lang.Object[] path)`
`void` | `paintComponent(java.awt.Graphics g)`
`void` | `removeAllDialogs()`
`void` | `removeDialog(java.lang.Object id)`
`void` | `removeFTreeActionListener(FTreeActionListener listener)`
`void` | `removeFTreeEditorListener(FTreeEditorListener listener)`
`void` | `removeFTreeExpansBarListener(FTreeExpansBarListener listener)`
`void` | `removeFTreeExpansionListener(FTreeExpansionListener listener)`
`void` | `removeFTreeSelectionListener(FTreeSelectionListener listener)`
`void` | `setBackground(java.awt.Color c)`
`void` | `setBorder(javax.swing.border.Border border)`
`void` | `setCellsLeftInset(int left)`
`void` | `setGapBetweenHorizontalBorders(int gap)`
`void` | `setGapBetweenVerticalBorders(int gap)`
`void` | `setHorizontalBordersWidth(int w)`
`void` | `setInsets(java.awt.Insets insets)`
`void` | `setNodeExpanded(java.lang.Object node, boolean expanded)`
`void` | `setPreferredScrollableViewportSize(java.awt.Dimension size)`
`void` | `setReducedView(boolean reduced)`
`void` | `setRoot(javax.swing.tree.TreeNode root)`
`void` | `setSelectedPath(java.lang.Object[] path)`
`void` | `setTreeCellGUI(FTreeCellGUI cellGUI)`
`void` | `setTreeModel(FTreeModel treeModel)`
`void` | `setVerticalBordersWidth(int w)`
`static void` | `stopCellEditing(javax.swing.JComponent editor)`
`boolean` | `stopEditing()`
`void` | `update(java.awt.Graphics g)`
`void` | `updateUI()`

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, setUI`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FTree

    public FTree(javax.swing.tree.TreeNode root)

### FTree

    public FTree()

Method Detail

### setVerticalBordersWidth

    public void setVerticalBordersWidth(int w)

### getVerticalBordersWidth

    public int getVerticalBordersWidth()

### setHorizontalBordersWidth

    public void setHorizontalBordersWidth(int w)

### getHorizontalBordersWidth

    public int getHorizontalBordersWidth()

### setGapBetweenHorizontalBorders

    public void setGapBetweenHorizontalBorders(int gap)

### getGapBetweenHorizontalBorders

    public int getGapBetweenHorizontalBorders()

### setGapBetweenVerticalBorders

    public void setGapBetweenVerticalBorders(int gap)

### getGapBetweenVerticalBorders

    public int getGapBetweenVerticalBorders()

### isReducedView

    public boolean isReducedView()

### setReducedView

    public void setReducedView(boolean reduced)

### setCellsLeftInset

    public void setCellsLeftInset(int left)

### getCellsLeftInset

    public int getCellsLeftInset()

### setTreeModel

    public void setTreeModel(FTreeModel treeModel)

### getTreeModel

    public FTreeModel getTreeModel()

### setTreeCellGUI

    public void setTreeCellGUI(FTreeCellGUI cellGUI)

### getTreeCellGUI

    public FTreeCellGUI getTreeCellGUI()

### setRoot

    public void setRoot(javax.swing.tree.TreeNode root)

### getRoot

    public java.lang.Object getRoot()

### setBackground

    public void setBackground(java.awt.Color c)

### setPreferredScrollableViewportSize

    public void setPreferredScrollableViewportSize(java.awt.Dimension size)

### setInsets

    public void setInsets(java.awt.Insets insets)

### getInsets

    public java.awt.Insets getInsets()

### setBorder

    public void setBorder(javax.swing.border.Border border)

### addDialog

    public void addDialog(java.lang.Object id,
                          javax.swing.JDialog dialog)

### getDialog

    public javax.swing.JDialog getDialog(java.lang.Object id)

### removeDialog

    public void removeDialog(java.lang.Object id)

### removeAllDialogs

    public void removeAllDialogs()

### addFTreeSelectionListener

    public void addFTreeSelectionListener(FTreeSelectionListener listener)

### removeFTreeSelectionListener

    public void removeFTreeSelectionListener(FTreeSelectionListener listener)

### addFTreeExpansionListener

    public void addFTreeExpansionListener(FTreeExpansionListener listener)

### removeFTreeExpansionListener

    public void removeFTreeExpansionListener(FTreeExpansionListener listener)

### addFTreeExpansBarListener

    public void addFTreeExpansBarListener(FTreeExpansBarListener listener)

### removeFTreeExpansBarListener

    public void removeFTreeExpansBarListener(FTreeExpansBarListener listener)

### addFTreeActionListener

    public void addFTreeActionListener(FTreeActionListener listener)

### removeFTreeActionListener

    public void removeFTreeActionListener(FTreeActionListener listener)

### addFTreeEditorListener

    public void addFTreeEditorListener(FTreeEditorListener listener)

### removeFTreeEditorListener

    public void removeFTreeEditorListener(FTreeEditorListener listener)

### updateUI

    public void updateUI()

### addNotify

    public void addNotify()

### makeVisible

    public void makeVisible(java.lang.Object[] path)

### getSelectedNode

    public java.lang.Object getSelectedNode()

### setSelectedPath

    public void setSelectedPath(java.lang.Object[] path)

### getSelectedPath

    public java.lang.Object[] getSelectedPath()

### getEditingNode

    public java.lang.Object getEditingNode()

### getEditingPath

    public java.lang.Object[] getEditingPath()

### isNodeExpanded

    public boolean isNodeExpanded(java.lang.Object node)

### setNodeExpanded

    public void setNodeExpanded(java.lang.Object node,
                                boolean expanded)

### paintComponent

    public void paintComponent(java.awt.Graphics g)

### doLayout

    public void doLayout()

### stopEditing

    public boolean stopEditing()

### cancelEditing

    public boolean cancelEditing()

### stopCellEditing

    public static void stopCellEditing(javax.swing.JComponent editor)

### cancelCellEditing

    public static void cancelCellEditing(javax.swing.JComponent editor)

### getNodeAt

    public java.lang.Object getNodeAt(int x,
                                      int y)

### getPreferredSize

    public java.awt.Dimension getPreferredSize()

### update

    public void update(java.awt.Graphics g)

### getPreferredScrollableViewportSize

    public java.awt.Dimension getPreferredScrollableViewportSize()

  Specified by:
    `getPreferredScrollableViewportSize` in interface `javax.swing.Scrollable`

### getScrollableTracksViewportWidth

    public boolean getScrollableTracksViewportWidth()

  Specified by:
    `getScrollableTracksViewportWidth` in interface `javax.swing.Scrollable`

### getScrollableTracksViewportHeight

    public boolean getScrollableTracksViewportHeight()

  Specified by:
    `getScrollableTracksViewportHeight` in interface `javax.swing.Scrollable`

### getScrollableUnitIncrement

    public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
                                          int orientation,
                                          int direction)

  Specified by:
    `getScrollableUnitIncrement` in interface `javax.swing.Scrollable`

### getScrollableBlockIncrement

    public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
                                           int orientation,
                                           int direction)

  Specified by:
    `getScrollableBlockIncrement` in interface `javax.swing.Scrollable`

### fireSelectionEvent

    public void fireSelectionEvent(java.lang.Object node,
                                   boolean selected)

### fireExpansBarEvent

    public void fireExpansBarEvent(java.lang.Object node,
                                   boolean entered)

### fireExpansionEvent

    public void fireExpansionEvent(boolean afterExpansion,
                                   java.lang.Object node)
                            throws FCancelException

  Throws:
    `FCancelException`

### fireActionEvent

    public void fireActionEvent(java.lang.Object node,
                                int action)

### cellEditorValueChanged

    public static void cellEditorValueChanged(javax.swing.JComponent editor,
                                              java.lang.Object event)

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