javax.swing.JTree .
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private static class | |
| private class | SynthTreeUI.
A subclass of |
| Modifier and Type | Field and Description |
|---|---|
| private SynthStyle | |
| private Icon | |
| private boolean | |
| private boolean | |
| private Icon | |
| private Object | |
| private int | |
| private SynthContext | |
| private SynthStyle | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| protected TreeCellEditor | createDefaultCellEditor()
Overrides javax. Creates a default cell editor. |
| protected TreeCellRenderer | createDefaultCellRenderer()
Overrides javax. Returns the default cell renderer that is used to do the stamping of each node. |
| public static ComponentUI | Returns: the UI objectcomponent to create UI object for x)Hides javax. Creates a new UI object for the given component. |
| protected void | drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
Overrides javax. Draws the |
| private int | |
| public Icon | getCollapsedIcon()
Overrides javax. Returns the collapsed icon. |
| private int | |
| public SynthContext | getContext(JComponent c)
Implements javax. Returns the Context for the specified component. |
| private SynthContext | |
| private SynthContext | |
| private SynthContext | |
| public Icon | getExpandedIcon()
Overrides javax. Returns the expanded icon. |
| protected int | getRowX(int row, int depth)
Overrides javax. Returns the location, along the x-axis, to render a particular row at. |
| protected void | installDefaults()
Overrides javax. Installs default properties. |
| protected void | installListeners()
Overrides javax. Registers listeners. |
| public void | paint(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Paints the specified component according to the Look and Feel. |
| protected void | paint(SynthContext
context for the component being painted context, Graphics the g)Graphics object used for paintingPaints the specified component. |
| public void | paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Implements javax. Paints the border. |
| protected void | paintDropLine(Graphics g)
Overrides javax. Paints the drop line. |
| protected void | paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Overrides javax. Paints the expand (toggle) part of a row. |
| protected void | paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
Overrides javax. Paints a horizontal line. |
| protected void | paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Overrides javax. Paints the horizontal part of the leg. |
| private void | paintRow(TreeCellRenderer renderer, DefaultTreeCellRenderer dtcr, SynthContext treeContext, SynthContext cellContext, Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, Rectangle rowBounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
|
| protected void | paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
Overrides javax. Paints a vertical line. |
| protected void | paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
Overrides javax. Paints the vertical part of the leg. |
| public void | propertyChange(PropertyChangeEvent event)
Implements java. This method gets called when a bound property is changed. |
| private void | |
| protected void | uninstallDefaults()
Overrides javax. Uninstalls default properties. |
| protected void | uninstallListeners()
Overrides javax. Unregisters listeners. |
| public void | update(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Notifies this UI delegate to repaint the specified component. |
| private void |
| cellStyle | back to summary |
|---|---|
| private SynthStyle cellStyle | |
| collapsedIconWrapper | back to summary |
|---|---|
| private Icon collapsedIconWrapper | |
| drawHorizontalLines | back to summary |
|---|---|
| private boolean drawHorizontalLines | |
| drawVerticalLines | back to summary |
|---|---|
| private boolean drawVerticalLines | |
| expandedIconWrapper | back to summary |
|---|---|
| private Icon expandedIconWrapper | |
| linesStyle | back to summary |
|---|---|
| private Object linesStyle | |
| padding | back to summary |
|---|---|
| private int padding | |
| paintContext | back to summary |
|---|---|
| private SynthContext paintContext | |
| style | back to summary |
|---|---|
| private SynthStyle style | |
| useTreeColors | back to summary |
|---|---|
| private boolean useTreeColors | |
| SynthTreeUI | back to summary |
|---|---|
| public SynthTreeUI() Constructs a | |
| configureRenderer | back to summary |
|---|---|
| private void configureRenderer(SynthContext context) | |
| createDefaultCellEditor | back to summary |
|---|---|
| protected TreeCellEditor createDefaultCellEditor() Overrides javax. Doc from javax. Creates a default cell editor.
| |
| createDefaultCellRenderer | back to summary |
|---|---|
| protected TreeCellRenderer createDefaultCellRenderer() Overrides javax. Doc from javax. Returns the default cell renderer that is used to do the stamping of each node.
| |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent x) Hides javax. Creates a new UI object for the given component.
| |
| drawCentered | back to summary |
|---|---|
| protected void drawCentered(Component c, Graphics graphics, Icon icon, int x, int y) Overrides javax. Doc from javax. Draws the
| |
| findCenteredX | back to summary |
|---|---|
| private int findCenteredX(int x, int iconWidth) | |
| getCollapsedIcon | back to summary |
|---|---|
| public Icon getCollapsedIcon() Overrides javax. Doc from javax. Returns the collapsed icon.
| |
| getComponentState | back to summary |
|---|---|
| private int getComponentState(JComponent c, Region region) | |
| getContext | back to summary |
|---|---|
| public SynthContext getContext(JComponent c) Implements javax. Doc from javax. Returns the Context for the specified component.
| |
| getContext | back to summary |
|---|---|
| private SynthContext getContext(JComponent c, int state) | |
| getContext | back to summary |
|---|---|
| private SynthContext getContext(JComponent c, Region region) | |
| getContext | back to summary |
|---|---|
| private SynthContext getContext(JComponent c, Region region, int state) | |
| getExpandedIcon | back to summary |
|---|---|
| public Icon getExpandedIcon() Overrides javax. Doc from javax. Returns the expanded icon.
| |
| getRowX | back to summary |
|---|---|
| protected int getRowX(int row, int depth) Overrides javax. Doc from javax. Returns the location, along the x-axis, to render a particular row at. The return value does not include any Insets specified on the JTree. This does not check for the validity of the row or depth, it is assumed to be correct and will not throw an Exception if the row or depth doesn't match that of the tree.
| |
| installDefaults | back to summary |
|---|---|
| protected void installDefaults() Overrides javax. Doc from javax. Installs default properties.
| |
| installListeners | back to summary |
|---|---|
| protected void installListeners() Overrides javax. Doc from javax. Registers listeners.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, JComponent c) Overrides javax. Paints the specified component according to the Look and Feel. This method is not used by Synth Look and Feel.
Painting is handled by the
| |
| paint | back to summary |
|---|---|
| protected void paint(SynthContext context, Graphics g) Paints the specified component.
| |
| paintBorder | back to summary |
|---|---|
| public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) Implements javax. Doc from javax. Paints the border.
| |
| paintDropLine | back to summary |
|---|---|
| protected void paintDropLine(Graphics g) Overrides javax. Doc from javax. Paints the drop line.
| |
| paintExpandControl | back to summary |
|---|---|
| protected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Overrides javax. Doc from javax. Paints the expand (toggle) part of a row. The receiver should
NOT modify
| |
| paintHorizontalLine | back to summary |
|---|---|
| protected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right) Overrides javax. Doc from javax. Paints a horizontal line.
| |
| paintHorizontalPartOfLeg | back to summary |
|---|---|
| protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Overrides javax. Doc from javax. Paints the horizontal part of the leg. The receiver should
NOT modify Note
| |
| paintRow | back to summary |
|---|---|
| private void paintRow(TreeCellRenderer renderer, DefaultTreeCellRenderer dtcr, SynthContext treeContext, SynthContext cellContext, Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, Rectangle rowBounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) | |
| paintVerticalLine | back to summary |
|---|---|
| protected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom) Overrides javax. Doc from javax. Paints a vertical line.
| |
| paintVerticalPartOfLeg | back to summary |
|---|---|
| protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) Overrides javax. Doc from javax. Paints the vertical part of the leg. The receiver should
NOT modify
| |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent event) Implements java. Doc from java. This method gets called when a bound property is changed.
| |
| repaintDropLocation | back to summary |
|---|---|
| private void repaintDropLocation(JTree. | |
| uninstallDefaults | back to summary |
|---|---|
| protected void uninstallDefaults() Overrides javax. Doc from javax. Uninstalls default properties.
| |
| uninstallListeners | back to summary |
|---|---|
| protected void uninstallListeners() Overrides javax. Doc from javax. Unregisters listeners.
| |
| update | back to summary |
|---|---|
| public void update(Graphics g, JComponent c) Overrides javax. Notifies this UI delegate to repaint the specified component.
This method paints the component background, then calls
the In general, this method does not need to be overridden by subclasses.
All Look and Feel rendering code should reside in the
| |
| updateStyle | back to summary |
|---|---|
| private void updateStyle(JTree tree) | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | getIconHeight(SynthContext context)
Implements javax. Returns the icon's height for the given synth context. |
| public int | getIconWidth(SynthContext context)
Implements javax. Returns the icon's width for the given synth context. |
| public void | paintIcon(SynthContext context, Graphics g, int x, int y, int w, int h)
Implements javax. Paints the icon at the specified location for the given synth context. |
| iconType | back to summary |
|---|---|
| pack-priv Icon iconType | |
| IconWrapper | back to summary |
|---|---|
| public IconWrapper(Icon type) | |
| getIconHeight | back to summary |
|---|---|
| public int getIconHeight(SynthContext context) Implements javax. Doc from javax. Returns the icon's height for the given synth context. | |
| getIconWidth | back to summary |
|---|---|
| public int getIconWidth(SynthContext context) Implements javax. Doc from javax. Returns the icon's width for the given synth context. | |
| paintIcon | back to summary |
|---|---|
| public void paintIcon(SynthContext context, Graphics g, int x, int y, int w, int h) Implements javax. Doc from javax. Paints the icon at the specified location for the given synth context. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected TreeCellEditor | createTreeCellEditor()
Overrides javax. This is invoked if a |
| SynthTreeCellEditor | back to summary |
|---|---|
| public SynthTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer) | |
| createTreeCellEditor | back to summary |
|---|---|
| protected TreeCellEditor createTreeCellEditor() Overrides javax. Doc from javax. This is invoked if a
| |
DefaultTreeCellRenderer that implements
UIResource.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Component | getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
Overrides javax. Implements javax. Configures the renderer based on the passed in components. |
| public void |
| SynthTreeCellRenderer | back to summary |
|---|---|
| pack-priv SynthTreeCellRenderer() | |
| getName | back to summary |
|---|---|
| public String getName() Overrides java. Doc from java. Gets the name of the component.
| |
| getTreeCellRendererComponent | back to summary |
|---|---|
| public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) Overrides javax. Implements javax. Doc from javax. Configures the renderer based on the passed in components.
The value is set from messaging the tree with
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g) Overrides javax. Doc from javax. Paints the value. The background is filled based on selected.
| |