com.fg.ftree
Class DefaultFTreeCellGUI

java.lang.Object
  extended bycom.fg.ftree.DefaultFTreeCellGUI
All Implemented Interfaces:
FActionConstants, FTreeCellGUI

public class DefaultFTreeCellGUI
extends java.lang.Object
implements FTreeCellGUI

DefaultFTreeCellGUI provides the following implementation of the FTreeCellGUI interface: within each method it checks if a passed node implements FNodeCellGUI interface and, when it does, calls respective FNodeCellGUI method. This approach allows to create multiple types of tree nodes with prebuilt functionality.

Version:
2.0
Author:
Felix Golubov
See Also:
FTreeCellGUI, FNodeCellGUI, FTree

Field Summary
 
Fields inherited from interface com.fg.ftree.FActionConstants
CHANGE_EXPANSION, DROP_SELECTION, EDIT_CELL, NO_ACTION, SELECT_NODE
 
Constructor Summary
DefaultFTreeCellGUI()
           
 
Method Summary
 int cellClicked(FTree tree, java.lang.Object node, javax.swing.JComponent c, int x, int y, java.util.List targetList)
           
 javax.swing.JComponent createCellControl(FTree tree, java.lang.Object node, boolean isEditor)
           
 java.lang.Object getCellControlKey(FTree tree, java.lang.Object node)
           
 java.awt.Color getFolderBarColor(FTree tree, java.lang.Object node)
           
 java.awt.Color getFolderColor(FTree tree, java.lang.Object node)
           
 int getRowHeight(FTree tree, java.lang.Object node)
           
 boolean isNodeSelectionAllowed(FTree tree, java.lang.Object node)
           
 void updateCellControl(FTree tree, java.lang.Object node, javax.swing.JComponent c, boolean isEditor, boolean selected)
           
 void updateNode(FTree tree, java.lang.Object node, javax.swing.JComponent c, boolean directStopEditing)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFTreeCellGUI

public DefaultFTreeCellGUI()
Method Detail

getRowHeight

public int getRowHeight(FTree tree,
                        java.lang.Object node)
Specified by:
getRowHeight in interface FTreeCellGUI

getFolderColor

public java.awt.Color getFolderColor(FTree tree,
                                     java.lang.Object node)
Specified by:
getFolderColor in interface FTreeCellGUI

getFolderBarColor

public java.awt.Color getFolderBarColor(FTree tree,
                                        java.lang.Object node)
Specified by:
getFolderBarColor in interface FTreeCellGUI

getCellControlKey

public java.lang.Object getCellControlKey(FTree tree,
                                          java.lang.Object node)
Specified by:
getCellControlKey in interface FTreeCellGUI

createCellControl

public javax.swing.JComponent createCellControl(FTree tree,
                                                java.lang.Object node,
                                                boolean isEditor)
Specified by:
createCellControl in interface FTreeCellGUI

updateCellControl

public void updateCellControl(FTree tree,
                              java.lang.Object node,
                              javax.swing.JComponent c,
                              boolean isEditor,
                              boolean selected)
Specified by:
updateCellControl in interface FTreeCellGUI

updateNode

public void updateNode(FTree tree,
                       java.lang.Object node,
                       javax.swing.JComponent c,
                       boolean directStopEditing)
Specified by:
updateNode in interface FTreeCellGUI

cellClicked

public int cellClicked(FTree tree,
                       java.lang.Object node,
                       javax.swing.JComponent c,
                       int x,
                       int y,
                       java.util.List targetList)
Specified by:
cellClicked in interface FTreeCellGUI

isNodeSelectionAllowed

public boolean isNodeSelectionAllowed(FTree tree,
                                      java.lang.Object node)
Specified by:
isNodeSelectionAllowed in interface FTreeCellGUI