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.jgoodies.plaf.windows
Class ExtWindowsTreeUI

    java.lang.Object
      javax.swing.plaf.ComponentUI
          javax.swing.plaf.TreeUI
              javax.swing.plaf.basic.BasicTreeUI
                  com.sun.java.swing.plaf.windows.WindowsTreeUI
                      com.jgoodies.plaf.windows.ExtWindowsTreeUI

public final class ExtWindowsTreeUI
extends com.sun.java.swing.plaf.windows.WindowsTreeUI

The JGoodies Windows Look&Feel implementation of `TreeUI`. Corrects the position of the tree button icon.

It provides two line styles: angled dashed lines, or no lines at all. By default, lines are drawn.

You can change the line style by setting a client property. The property key and values are a subset of the values used by the Metal L&F tree. To hide lines use one of the following:

     JTree tree1 = new JTree();
     tree1.putClientProperty("JTree.lineStyle", "None");

     JTree tree2 = new JTree();
     tree1.putClientProperty(Options.TREE_LINE_STYLE_KEY,
                             Options.TREE_LINE_STYLE_NONE_VALUE);

Although lines are shown by default, you could code:

     JTree tree1 = new JTree();
     tree1.putClientProperty("JTree.lineStyle", "Angled");

     JTree tree2 = new JTree();
     tree1.putClientProperty(Options.TREE_LINE_STYLE_KEY,
                             Options.TREE_LINE_STYLE_ANGLED_VALUE);

Version:
  $Revision: 1.2 $
Author:
  Karsten Lentzsch

Nested Class Summary

Nested classes inherited from class com.sun.java.swing.plaf.windows.WindowsTreeUI
`com.sun.java.swing.plaf.windows.WindowsTreeUI.CollapsedIcon, com.sun.java.swing.plaf.windows.WindowsTreeUI.ExpandedIcon, com.sun.java.swing.plaf.windows.WindowsTreeUI.WindowsTreeCellRenderer`

Nested classes inherited from class javax.swing.plaf.basic.BasicTreeUI
`BasicTreeUI.CellEditorHandler, BasicTreeUI.ComponentHandler, BasicTreeUI.FocusHandler, BasicTreeUI.KeyHandler, BasicTreeUI.MouseHandler, BasicTreeUI.MouseInputHandler, BasicTreeUI.NodeDimensionsHandler, BasicTreeUI.PropertyChangeHandler, BasicTreeUI.SelectionModelPropertyChangeHandler, BasicTreeUI.TreeCancelEditingAction, BasicTreeUI.TreeExpansionHandler, BasicTreeUI.TreeHomeAction, BasicTreeUI.TreeIncrementAction, BasicTreeUI.TreeModelHandler, BasicTreeUI.TreePageAction, BasicTreeUI.TreeSelectionHandler, BasicTreeUI.TreeToggleAction, BasicTreeUI.TreeTraverseAction`

Field Summary

Fields inherited from class com.sun.java.swing.plaf.windows.WindowsTreeUI
`HALF_SIZE, SIZE`

Fields inherited from class javax.swing.plaf.basic.BasicTreeUI
`cellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon, largeModel, lastSelectedRow, leftChildIndent, nodeDimensions, preferredMinSize, preferredSize, rendererPane, rightChildIndent, stopEditingInCompleteEditing, totalChildIndent, tree, treeModel, treeSelectionModel, treeState, validCachedPreferredSize`

Constructor Summary
`ExtWindowsTreeUI()`

Method Summary
`static ComponentUI` | `createUI(JComponent b)`
`protected void` | `drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)`
`void` | `installUI(JComponent c)`
`protected void` | `paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)`
`protected void` | `paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)`
`void` | `uninstallUI(JComponent c)`

Methods inherited from class com.sun.java.swing.plaf.windows.WindowsTreeUI
`createDefaultCellRenderer, ensureRowsAreVisible, paintHorizontalPartOfLeg, paintVerticalPartOfLeg`

Methods inherited from class javax.swing.plaf.basic.BasicTreeUI
`cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createDefaultCellEditor, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawDashedHorizontalLine, drawDashedVerticalLine, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getEditingPath, getExpandedIcon, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installDefaults, installKeyboardActions, installListeners, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paint, paintExpandControl, paintRow, pathWasCollapsed, pathWasExpanded, prepareForUIInstall, prepareForUIUninstall, selectPathForEvent, setCellEditor, setCellRenderer, setCollapsedIcon, setEditable, setExpandedIcon, setHashColor, setLargeModel, setLeftChildIndent, setModel, setPreferredMinSize, setRightChildIndent, setRootVisible, setRowHeight, setSelectionModel, setShowsRootHandles, shouldPaintExpandControl, startEditing, startEditingAtPath, stopEditing, toggleExpandState, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateRenderer, updateSize`

Methods inherited from class javax.swing.plaf.ComponentUI
`contains, getAccessibleChild, getAccessibleChildrenCount, update`

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

Constructor Detail

### ExtWindowsTreeUI

    public ExtWindowsTreeUI()

Method Detail

### createUI

    public static ComponentUI createUI(JComponent b)

### installUI

    public void installUI(JComponent c)

### uninstallUI

    public void uninstallUI(JComponent c)

### paintVerticalLine

    protected void paintVerticalLine(Graphics g,
                                     JComponent c,
                                     int x,
                                     int top,
                                     int bottom)

### paintHorizontalLine

    protected void paintHorizontalLine(Graphics g,
                                       JComponent c,
                                       int y,
                                       int left,
                                       int right)

### drawCentered

    protected void drawCentered(Component c,
                                Graphics graphics,
                                Icon icon,
                                int x,
                                int y)

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

Copyright © 2001-2004 JGoodies Karsten Lentzsch. All Rights Reserved.