APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf.synth

public Class SynthToolBarUI

extends BasicToolBarUI
implements PropertyChangeListener, SynthUI
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.synth.SynthUI, javax.swing.plaf.synth.SynthConstants, java.beans.PropertyChangeListener, java.util.EventListener
Imports
java.awt.Component, .Container, .Dimension, .Graphics, .Insets, .LayoutManager, .Rectangle, java.beans.PropertyChangeEvent, .PropertyChangeListener, javax.swing.Box, .Icon, .JComponent, .JSeparator, .JToolBar, javax.swing.plaf.ComponentUI, javax.swing.plaf.basic.BasicToolBarUI

Provides the Synth L&F UI delegate for javax.swing.JToolBar.
Since
1.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private Rectangle
private SynthStyle
private SynthStyle
private Icon
private SynthStyle
Inherited from javax.swing.plaf.basic.BasicToolBarUI:
constraintBeforeFloatingdockingBorderColordockingColordockingListenerdownKeydragWindowfloatingBorderColorfloatingColorfocusedCompIndexleftKeypropertyListenerrightKeytoolBartoolBarContListenertoolBarFocusListenerupKey

Constructor Summary

AccessConstructor and Description
public
SynthToolBarUI()

Constructs a SynthToolBarUI.

Method Summary

Modifier and TypeMethod and Description
protected LayoutManager

Returns:

a LayoutManager instance
createLayout
()

Creates a LayoutManager to use with the toolbar.

public static ComponentUI

Returns:

the UI object
createUI
(JComponent
component to create UI object for
c
)

Hides javax.swing.plaf.basic.BasicToolBarUI.createUI.

Creates a new UI object for the given component.

private int
public SynthContext
getContext(JComponent c)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.

private SynthContext
getContext(JComponent c, int state)

private SynthContext
private SynthContext
getContext(JComponent c, Region region, SynthStyle style, int state)

protected void
protected void
protected void
public void
paint(Graphics
the Graphics object used for painting
g
,
JComponent
the component being painted
c
)

Overrides javax.swing.plaf.ComponentUI.paint.

Paints the specified component according to the Look and Feel.

protected void
paint(SynthContext
context for the component being painted
context
,
Graphics
the Graphics object used for painting
g
)

Paints the toolbar.

public void
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.

protected void
paintContent(SynthContext
context for the component being painted
context
,
Graphics
Graphics object used for painting
g
,
Rectangle
bounding box for the toolbar
bounds
)

Paints the toolbar content.

protected void
paintDragWindow(Graphics g)

Overrides javax.swing.plaf.basic.BasicToolBarUI.paintDragWindow.

Paints the contents of the window used for dragging.

public void
propertyChange(PropertyChangeEvent e)

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

protected void
setBorderToNonRollover(Component c)

Overrides javax.swing.plaf.basic.BasicToolBarUI.setBorderToNonRollover.

This implementation does nothing, because the rollover property of the JToolBar class is not used in the Synth Look and Feel.

protected void
setBorderToNormal(Component c)

Overrides javax.swing.plaf.basic.BasicToolBarUI.setBorderToNormal.

This implementation does nothing, because the rollover property of the JToolBar class is not used in the Synth Look and Feel.

protected void
setBorderToRollover(Component c)

Overrides javax.swing.plaf.basic.BasicToolBarUI.setBorderToRollover.

This implementation does nothing, because the rollover property of the JToolBar class is not used in the Synth Look and Feel.

protected void
protected void
protected void
public void
update(Graphics
the Graphics object used for painting
g
,
JComponent
the component being painted
c
)

Overrides javax.swing.plaf.ComponentUI.update.

Notifies this UI delegate to repaint the specified component.

private void
Inherited from javax.swing.plaf.basic.BasicToolBarUI:
canDockcreateDockingListenercreateDragWindowcreateFloatingFramecreateFloatingWindowcreateFrameListenercreateNonRolloverBordercreatePropertyListenercreateRolloverBordercreateToolBarContListenercreateToolBarFocusListenerdragTofloatAtgetDockingColorgetFloatingColorgetNonRolloverBordergetRolloverBorderinstallKeyboardActionsinstallNonRolloverBordersinstallNormalBordersinstallRolloverBordersinstallUIisFloatingisRolloverBordersnavigateFocusedCompsetDockingColorsetFloatingsetFloatingColorsetFloatingLocationsetOrientationsetRolloverBordersuninstallKeyboardActionsuninstallUI

Field Detail

contentRectback to summary
private Rectangle contentRect
contentStyleback to summary
private SynthStyle contentStyle
dragWindowStyleback to summary
private SynthStyle dragWindowStyle
handleIconback to summary
private Icon handleIcon
styleback to summary
private SynthStyle style

Constructor Detail

SynthToolBarUIback to summary
public SynthToolBarUI()

Constructs a SynthToolBarUI.

Method Detail

createLayoutback to summary
protected LayoutManager createLayout()

Creates a LayoutManager to use with the toolbar.

Returns:LayoutManager

a LayoutManager instance

createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.basic.BasicToolBarUI.createUI.

Creates a new UI object for the given component.

Parameters
c:JComponent

component to create UI object for

Returns:ComponentUI

the UI object

getComponentStateback to summary
private int getComponentState(JComponent c, Region region)
getContextback to summary
public SynthContext getContext(JComponent c)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Doc from javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.

Annotations
@Override
getContextback to summary
private SynthContext getContext(JComponent c, int state)
getContextback to summary
private SynthContext getContext(JComponent c, Region region, SynthStyle style)
getContextback to summary
private SynthContext getContext(JComponent c, Region region, SynthStyle style, int state)
installComponentsback to summary
protected void installComponents()

Overrides javax.swing.plaf.basic.BasicToolBarUI.installComponents.

Doc from javax.swing.plaf.basic.BasicToolBarUI.installComponents.

Registers components.

Annotations
@Override
installDefaultsback to summary
protected void installDefaults()

Overrides javax.swing.plaf.basic.BasicToolBarUI.installDefaults.

Doc from javax.swing.plaf.basic.BasicToolBarUI.installDefaults.

Installs default properties.

Annotations
@Override
installListenersback to summary
protected void installListeners()

Overrides javax.swing.plaf.basic.BasicToolBarUI.installListeners.

Doc from javax.swing.plaf.basic.BasicToolBarUI.installListeners.

Registers listeners.

Annotations
@Override
paintback to summary
public void paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.paint.

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(SynthContext, Graphics) method.

Parameters
g:Graphics

the Graphics object used for painting

c:JComponent

the component being painted

Annotations
@Override
See Also
paint(SynthContext, Graphics)
paintback to summary
protected void paint(SynthContext context, Graphics g)

Paints the toolbar.

Parameters
context:SynthContext

context for the component being painted

g:Graphics

the Graphics object used for painting

See Also
update(Graphics, JComponent)
paintBorderback to summary
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Doc from javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.

Annotations
@Override
paintContentback to summary
protected void paintContent(SynthContext context, Graphics g, Rectangle bounds)

Paints the toolbar content.

Parameters
context:SynthContext

context for the component being painted

g:Graphics

Graphics object used for painting

bounds:Rectangle

bounding box for the toolbar

paintDragWindowback to summary
protected void paintDragWindow(Graphics g)

Overrides javax.swing.plaf.basic.BasicToolBarUI.paintDragWindow.

Doc from javax.swing.plaf.basic.BasicToolBarUI.paintDragWindow.

Paints the contents of the window used for dragging.

Annotations
@Override
propertyChangeback to summary
public void propertyChange(PropertyChangeEvent e)

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

Annotations
@Override
setBorderToNonRolloverback to summary
protected void setBorderToNonRollover(Component c)

Overrides javax.swing.plaf.basic.BasicToolBarUI.setBorderToNonRollover.

This implementation does nothing, because the rollover property of the JToolBar class is not used in the Synth Look and Feel.

Annotations
@Override
setBorderToNormalback to summary
protected void setBorderToNormal(Component c)

Overrides javax.swing.plaf.basic.BasicToolBarUI.setBorderToNormal.

This implementation does nothing, because the rollover property of the JToolBar class is not used in the Synth Look and Feel.

Annotations
@Override
setBorderToRolloverback to summary
protected void setBorderToRollover(Component c)

Overrides javax.swing.plaf.basic.BasicToolBarUI.setBorderToRollover.

This implementation does nothing, because the rollover property of the JToolBar class is not used in the Synth Look and Feel.

Annotations
@Override
uninstallComponentsback to summary
protected void uninstallComponents()

Overrides javax.swing.plaf.basic.BasicToolBarUI.uninstallComponents.

Doc from javax.swing.plaf.basic.BasicToolBarUI.uninstallComponents.

Unregisters components.

Annotations
@Override
uninstallDefaultsback to summary
protected void uninstallDefaults()

Overrides javax.swing.plaf.basic.BasicToolBarUI.uninstallDefaults.

Doc from javax.swing.plaf.basic.BasicToolBarUI.uninstallDefaults.

Uninstalls default properties.

Annotations
@Override
uninstallListenersback to summary
protected void uninstallListeners()

Overrides javax.swing.plaf.basic.BasicToolBarUI.uninstallListeners.

Doc from javax.swing.plaf.basic.BasicToolBarUI.uninstallListeners.

Unregisters listeners.

Annotations
@Override
updateback to summary
public void update(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.update.

Notifies this UI delegate to repaint the specified component. This method paints the component background, then calls the paint(SynthContext, Graphics) method.

In general, this method does not need to be overridden by subclasses. All Look and Feel rendering code should reside in the paint method.

Parameters
g:Graphics

the Graphics object used for painting

c:JComponent

the component being painted

Annotations
@Override
See Also
paint(SynthContext, Graphics)
updateStyleback to summary
private void updateStyle(JToolBar c)
javax.swing.plaf.synth back to summary

pack-priv Class SynthToolBarUI.SynthToolBarLayoutManager

extends Object
implements LayoutManager
Class Inheritance
  • java.lang.Object
  • javax.swing.plaf.synth.SynthToolBarUI.SynthToolBarLayoutManager
All Implemented Interfaces
java.awt.LayoutManager

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
addLayoutComponent(String name, Component comp)

Implements java.awt.LayoutManager.addLayoutComponent.

If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.

private boolean
public void
layoutContainer(Container parent)

Implements java.awt.LayoutManager.layoutContainer.

Lays out the specified container.

public Dimension
minimumLayoutSize(Container parent)

Implements java.awt.LayoutManager.minimumLayoutSize.

Calculates the minimum size dimensions for the specified container, given the components it contains.

public Dimension
preferredLayoutSize(Container parent)

Implements java.awt.LayoutManager.preferredLayoutSize.

Calculates the preferred size dimensions for the specified container, given the components it contains.

public void
removeLayoutComponent(Component comp)

Implements java.awt.LayoutManager.removeLayoutComponent.

Removes the specified component from the layout.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SynthToolBarLayoutManagerback to summary
pack-priv SynthToolBarLayoutManager()

Method Detail

addLayoutComponentback to summary
public void addLayoutComponent(String name, Component comp)

Implements java.awt.LayoutManager.addLayoutComponent.

Doc from java.awt.LayoutManager.addLayoutComponent.

If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.

isGlueback to summary
private boolean isGlue(Component c)
layoutContainerback to summary
public void layoutContainer(Container parent)

Implements java.awt.LayoutManager.layoutContainer.

Doc from java.awt.LayoutManager.layoutContainer.

Lays out the specified container.

minimumLayoutSizeback to summary
public Dimension minimumLayoutSize(Container parent)

Implements java.awt.LayoutManager.minimumLayoutSize.

Doc from java.awt.LayoutManager.minimumLayoutSize.

Calculates the minimum size dimensions for the specified container, given the components it contains.

preferredLayoutSizeback to summary
public Dimension preferredLayoutSize(Container parent)

Implements java.awt.LayoutManager.preferredLayoutSize.

Doc from java.awt.LayoutManager.preferredLayoutSize.

Calculates the preferred size dimensions for the specified container, given the components it contains.

removeLayoutComponentback to summary
public void removeLayoutComponent(Component comp)

Implements java.awt.LayoutManager.removeLayoutComponent.

Doc from java.awt.LayoutManager.removeLayoutComponent.

Removes the specified component from the layout.