JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.swing
Class JCTreeExplorer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JSplitPane
                          |
                          +--com.klg.jclass.swing.JCTreeExplorer
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class JCTreeExplorer
extends JSplitPane

A component that gives a visual representation of the hierarchical nature of its data, presenting a tree view in its left-hand pane and a table view in its right-hand pane. See The Java 2 API to compare this component to JTree and JTable.

See Also:
Serialized Form

Nested Class Summary
protected  class JCTreeExplorer.ClickListener
           
protected  class JCTreeExplorer.FirstColumnEditor
          Class that wraps the tree editor to use it to edit the first column of the table.
protected  class JCTreeExplorer.FirstColumnRenderer
          Class that wraps the tree renderer to use it to render the first column of the table.
protected  class JCTreeExplorer.SelectionListener
          Class that listens for selections on the tree component and changes the source of the TableModel.
protected  class JCTreeExplorer.TreeEditor
           
protected  class JCTreeExplorer.TreeIconRenderTable
          Inner class that extends JCSortableTable and adds a modification of the render/editors, which allows overiding of column 1 to store the icon render/editor functionality.
protected  class JCTreeExplorer.TreeIconRenderTree
          PENDING Inner class that extends JTree and adds modification of the JTree; this allows overides to the default render and editor to enable "plug-in" of a JCTreeIconRenderer to the JTree.
protected  class JCTreeExplorer.TreeRenderer
           
protected  class JCTreeExplorer.WhiteOutContainer
          Class that wraps a component and makes sure that it draws everything.
 
Nested classes inherited from class javax.swing.JSplitPane
JSplitPane.AccessibleJSplitPane
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  int cellHeight
           
protected  Icon closedIcon
           
protected  TableCellEditor firstColumnEditor
           
protected  TableCellRenderer firstColumnRenderer
           
protected  int iconGap
           
protected  com.klg.jclass.util.treetable.JCTreeIconRenderer iconRenderer
           
protected  int iconWidth
           
protected  Icon leafIcon
           
protected  Icon openIcon
           
protected  com.klg.jclass.util.swing.JCSortableTable table
           
protected  Color tableBackground
           
protected  com.klg.jclass.util.treetable.NodeChildrenTable tableModel
           
protected  JTree tree
           
protected  TreeModel treeModel
           
protected  com.klg.jclass.util.treetable.JCTreeTableModel treetableModel
           
 
Fields inherited from class javax.swing.JSplitPane
BOTTOM, CONTINUOUS_LAYOUT_PROPERTY, continuousLayout, DIVIDER, DIVIDER_LOCATION_PROPERTY, DIVIDER_SIZE_PROPERTY, dividerSize, HORIZONTAL_SPLIT, LAST_DIVIDER_LOCATION_PROPERTY, lastDividerLocation, LEFT, leftComponent, ONE_TOUCH_EXPANDABLE_PROPERTY, oneTouchExpandable, orientation, ORIENTATION_PROPERTY, RESIZE_WEIGHT_PROPERTY, RIGHT, rightComponent, TOP, VERTICAL_SPLIT
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JCTreeExplorer()
           
JCTreeExplorer(com.klg.jclass.util.treetable.JCTreeTableModel treetable_model)
           
JCTreeExplorer(com.klg.jclass.util.treetable.JCTreeTableModel treetable_model, Dimension intercellSpacing)
           
 
Method Summary
 String getAbout()
          Returns vendor information.
 com.klg.jclass.util.treetable.JCTreeTableModel getModel()
           
 Dimension getPreferredSize()
           
 TreePath getSelectionPath()
          Returns the TreePath of the first selected row inside the table view or, if no rows are selected, the selected node within the tree view.
 TreePath[] getSelectionPaths()
          Returns the TreePath's of the selected rows inside the table view.
 JTable getTable()
          Returns the JTable component used.
 JTree getTree()
          Returns the JTree component used.
 com.klg.jclass.util.treetable.JCTreeIconRenderer getTreeIconRenderer()
          Returns the icon renderer being used.
 void inferLookAndFeel()
           
protected  void inferLookAndFeelSetupControls()
           
protected  void inferLookAndFeelSetVars()
           
 void setAbout(String s)
          Provided for Beans property editors - has no effect.
 void setModel(com.klg.jclass.util.treetable.JCTreeTableModel treetable_model)
           
 void setTreeIconRenderer(com.klg.jclass.util.treetable.JCTreeIconRenderer renderer)
          Sets the icon renderer.
 void setUI(TableUI ui)
           
 
Methods inherited from class javax.swing.JSplitPane
addImpl, getAccessibleContext, getBottomComponent, getDividerLocation, getDividerSize, getLastDividerLocation, getLeftComponent, getMaximumDividerLocation, getMinimumDividerLocation, getOrientation, getResizeWeight, getRightComponent, getTopComponent, getUI, getUIClassID, isContinuousLayout, isOneTouchExpandable, isValidateRoot, paintChildren, paramString, remove, remove, removeAll, resetToPreferredSizes, setBottomComponent, setContinuousLayout, setDividerLocation, setDividerLocation, setDividerSize, setLastDividerLocation, setLeftComponent, setOneTouchExpandable, setOrientation, setResizeWeight, setRightComponent, setTopComponent, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, 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, paint, paintBorder, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, 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, processContainerEvent, processEvent, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

treetableModel

protected com.klg.jclass.util.treetable.JCTreeTableModel treetableModel

treeModel

protected TreeModel treeModel

tableModel

protected com.klg.jclass.util.treetable.NodeChildrenTable tableModel

tree

protected JTree tree

table

protected com.klg.jclass.util.swing.JCSortableTable table

firstColumnRenderer

protected TableCellRenderer firstColumnRenderer

firstColumnEditor

protected TableCellEditor firstColumnEditor

iconRenderer

protected com.klg.jclass.util.treetable.JCTreeIconRenderer iconRenderer

openIcon

protected Icon openIcon

closedIcon

protected Icon closedIcon

leafIcon

protected Icon leafIcon

iconGap

protected int iconGap

iconWidth

protected int iconWidth

cellHeight

protected int cellHeight

tableBackground

protected Color tableBackground
Constructor Detail

JCTreeExplorer

public JCTreeExplorer()

JCTreeExplorer

public JCTreeExplorer(com.klg.jclass.util.treetable.JCTreeTableModel treetable_model,
                      Dimension intercellSpacing)

JCTreeExplorer

public JCTreeExplorer(com.klg.jclass.util.treetable.JCTreeTableModel treetable_model)
Method Detail

getModel

public com.klg.jclass.util.treetable.JCTreeTableModel getModel()

setModel

public void setModel(com.klg.jclass.util.treetable.JCTreeTableModel treetable_model)

getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class JComponent

getSelectionPath

public TreePath getSelectionPath()
Returns the TreePath of the first selected row inside the table view or, if no rows are selected, the selected node within the tree view.

Returns:
TreePath of the first selected row inside the table view or, if no rows are selected, the selected node within the tree view

getSelectionPaths

public TreePath[] getSelectionPaths()
Returns the TreePath's of the selected rows inside the table view.

Returns:
the TreePath's of the selected rows

setAbout

public void setAbout(String s)
Provided for Beans property editors - has no effect.

Parameters:
s -

getAbout

public String getAbout()
Returns vendor information.

Returns:
vendor information

getTree

public JTree getTree()
Returns the JTree component used.

Returns:
JTree component used

getTable

public JTable getTable()
Returns the JTable component used.
Note: This is an instance of JCSortableTable, and you can access the sortable table functionality with an appropriate cast.

Returns:
JTable component used
See Also:
JCSortableTable

inferLookAndFeel

public void inferLookAndFeel()

inferLookAndFeelSetVars

protected void inferLookAndFeelSetVars()

inferLookAndFeelSetupControls

protected void inferLookAndFeelSetupControls()

setUI

public void setUI(TableUI ui)

setTreeIconRenderer

public void setTreeIconRenderer(com.klg.jclass.util.treetable.JCTreeIconRenderer renderer)
Sets the icon renderer. If null, no icon will be drawn.

Parameters:
renderer -

getTreeIconRenderer

public com.klg.jclass.util.treetable.JCTreeIconRenderer getTreeIconRenderer()
Returns the icon renderer being used. If null, no icons are being drawn.

Returns:
icon renderer being used

Copyright © 2004 Quest Software Inc..
All rights reserved.