APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.java.swing.plaf.motif

public Class MotifTreeUI

extends BasicTreeUI
Class Inheritance
Imports
java.awt.Color, .Component, .Graphics, java.io.Serializable, javax.swing.Icon, .JComponent, .UIManager, javax.swing.plaf.ComponentUI, javax.swing.plaf.basic.BasicTreeUI, javax.swing.tree.TreeCellRenderer

Motif rendition of the tree component.
Author
Jeff Dinkins

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
MotifTreeUI.MotifCollapsedIcon

The plus sign button icon.

public static class
MotifTreeUI.MotifExpandedIcon

The minus sign button icon.

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
Inherited from javax.swing.plaf.basic.BasicTreeUI:
cellEditorcollapsedIconcreatedCellEditorcreatedRenderercurrentCellRendererdepthOffsetdrawingCacheeditingComponenteditingPatheditingRoweditorHasDifferentSizeexpandedIconlargeModellastSelectedRowleftChildIndentnodeDimensionspreferredMinSizepreferredSizerendererPanerightChildIndentstopEditingInCompleteEditingtotalChildIndenttreetreeModeltreeSelectionModeltreeStatevalidCachedPreferredSize

Constructor Summary

AccessConstructor and Description
public
MotifTreeUI()

creates a UI object to represent a Motif Tree widget

Method Summary

Modifier and TypeMethod and Description
public TreeCellRenderer
createDefaultCellRenderer()

Overrides javax.swing.plaf.basic.BasicTreeUI.createDefaultCellRenderer.

Returns the default cell renderer that is used to do the stamping of each node.

public static ComponentUI
createUI(JComponent x)

Hides javax.swing.plaf.basic.BasicTreeUI.createUI.

Constructs a new instance of BasicTreeUI.

public void
installUI(JComponent c)

Overrides javax.swing.plaf.basic.BasicTreeUI.installUI.

Configures the specified component appropriately for the look and feel.

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

Overrides javax.swing.plaf.basic.BasicTreeUI.paintHorizontalLine.

Paints a horizontal line.

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

Overrides javax.swing.plaf.basic.BasicTreeUI.paintVerticalLine.

Paints a vertical line.

Inherited from javax.swing.plaf.basic.BasicTreeUI:
cancelEditingcheckForClickInExpandControlcompleteEditingcompleteEditingcompleteUIInstallcompleteUIUninstallconfigureLayoutCachecreateCellEditorListenercreateCellRendererPanecreateComponentListenercreateDefaultCellEditorcreateFocusListenercreateKeyListenercreateLayoutCachecreateMouseListenercreateNodeDimensionscreatePropertyChangeListenercreateSelectionModelPropertyChangeListenercreateTreeExpansionListenercreateTreeModelListenercreateTreeSelectionListenerdrawCentereddrawDashedHorizontalLinedrawDashedVerticalLineensureRowsAreVisiblegetBaselinegetBaselineResizeBehaviorgetCellEditorgetCellRenderergetClosestPathForLocationgetCollapsedIcongetDropLineRectgetEditingPathgetExpandedIcongetHashColorgetHorizontalLegBuffergetLastChildPathgetLeadSelectionRowgetLeftChildIndentgetMaximumSizegetMinimumSizegetModelgetPathBoundsgetPathForRowgetPreferredMinSizegetPreferredSizegetPreferredSizegetRightChildIndentgetRowCountgetRowForPathgetRowHeightgetRowXgetSelectionModelgetShowsRootHandlesgetVerticalLegBufferhandleExpandControlClickinstallComponentsinstallDefaultsinstallKeyboardActionsinstallListenersisDropLineisEditableisEditingisLargeModelisLeafisLocationInExpandControlisMultiSelectEventisRootVisibleisToggleEventisToggleSelectionEventpaintpaintDropLinepaintExpandControlpaintHorizontalPartOfLegpaintRowpaintVerticalPartOfLegpathWasCollapsedpathWasExpandedprepareForUIInstallprepareForUIUninstallselectPathForEventsetCellEditorsetCellRenderersetCollapsedIconsetEditablesetExpandedIconsetHashColorsetLargeModelsetLeftChildIndentsetModelsetPreferredMinSizesetRightChildIndentsetRootVisiblesetRowHeightsetSelectionModelsetShowsRootHandlesshouldPaintExpandControlstartEditingstartEditingAtPathstopEditingtoggleExpandStateuninstallComponentsuninstallDefaultsuninstallKeyboardActionsuninstallListenersuninstallUIupdateCachedPreferredSizeupdateCellEditorupdateDepthOffsetupdateExpandedDescendantsupdateLayoutCacheExpandedNodesupdateLeadSelectionRowupdateRendererupdateSize

Field Detail

HALF_SIZEback to summary
pack-priv static final int HALF_SIZE
SIZEback to summary
pack-priv static final int SIZE

Constructor Detail

MotifTreeUIback to summary
public MotifTreeUI()

creates a UI object to represent a Motif Tree widget

Method Detail

createDefaultCellRendererback to summary
public TreeCellRenderer createDefaultCellRenderer()

Overrides javax.swing.plaf.basic.BasicTreeUI.createDefaultCellRenderer.

Returns the default cell renderer that is used to do the stamping of each node.

Annotations
@Override
createUIback to summary
public static ComponentUI createUI(JComponent x)

Hides javax.swing.plaf.basic.BasicTreeUI.createUI.

Doc from javax.swing.plaf.basic.BasicTreeUI.createUI.

Constructs a new instance of BasicTreeUI.

installUIback to summary
public void installUI(JComponent c)

Overrides javax.swing.plaf.basic.BasicTreeUI.installUI.

Doc from javax.swing.plaf.ComponentUI.installUI.

Configures the specified component appropriately for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:

  1. Install default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.
Annotations
@Override
paintHorizontalLineback to summary
protected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)

Overrides javax.swing.plaf.basic.BasicTreeUI.paintHorizontalLine.

Doc from javax.swing.plaf.basic.BasicTreeUI.paintHorizontalLine.

Paints a horizontal line.

Annotations
@Override
paintVerticalLineback to summary
protected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)

Overrides javax.swing.plaf.basic.BasicTreeUI.paintVerticalLine.

Doc from javax.swing.plaf.basic.BasicTreeUI.paintVerticalLine.

Paints a vertical line.

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

public Class MotifTreeUI.MotifCollapsedIcon

extends MotifExpandedIcon
Class Inheritance
Annotations
@SuppressWarnings:serial

The plus sign button icon.

Field Summary

Inherited from com.sun.java.swing.plaf.motif.MotifTreeUI.MotifExpandedIcon:
bgfghighlightshadow

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Icon
public void
paintIcon(Component c, Graphics g, int x, int y)

Overrides com.sun.java.swing.plaf.motif.MotifTreeUI.MotifExpandedIcon.paintIcon.

Implements javax.swing.Icon.paintIcon.

Draw the icon at the specified location.

Inherited from com.sun.java.swing.plaf.motif.MotifTreeUI.MotifExpandedIcon:
createExpandedIcongetIconHeightgetIconWidth

Constructor Detail

MotifCollapsedIconback to summary
public MotifCollapsedIcon()

Method Detail

createCollapsedIconback to summary
public static Icon createCollapsedIcon()
paintIconback to summary
public void paintIcon(Component c, Graphics g, int x, int y)

Overrides com.sun.java.swing.plaf.motif.MotifTreeUI.MotifExpandedIcon.paintIcon.

Implements javax.swing.Icon.paintIcon.

Doc from javax.swing.Icon.paintIcon.

Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

public Class MotifTreeUI.MotifExpandedIcon

extends Object
implements Icon, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.swing.Icon
Known Direct Subclasses
com.sun.java.swing.plaf.motif.MotifTreeUI.MotifCollapsedIcon
Annotations
@SuppressWarnings:serial

The minus sign button icon.

Field Summary

Modifier and TypeField and Description
pack-priv static Color
pack-priv static Color
pack-priv static Color
pack-priv static Color

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Icon
public int
getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Returns the icon's height.

public int
getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Returns the icon's width.

public void
paintIcon(Component c, Graphics g, int x, int y)

Implements javax.swing.Icon.paintIcon.

Draw the icon at the specified location.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bgback to summary
pack-priv static Color bg
fgback to summary
pack-priv static Color fg
highlightback to summary
pack-priv static Color highlight
shadowback to summary
pack-priv static Color shadow

Constructor Detail

MotifExpandedIconback to summary
public MotifExpandedIcon()

Method Detail

createExpandedIconback to summary
public static Icon createExpandedIcon()
getIconHeightback to summary
public int getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Doc from javax.swing.Icon.getIconHeight.

Returns the icon's height.

Annotations
@Override
getIconWidthback to summary
public int getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Doc from javax.swing.Icon.getIconWidth.

Returns the icon's width.

Annotations
@Override
paintIconback to summary
public void paintIcon(Component c, Graphics g, int x, int y)

Implements javax.swing.Icon.paintIcon.

Doc from javax.swing.Icon.paintIcon.

Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

Annotations
@Override