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

public Class SynthDesktopPaneUI

extends BasicDesktopPaneUI
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.Color, .Component, .Container, .Dimension, .FlowLayout, .Graphics, .Insets, .Rectangle, java.awt.event.ComponentEvent, .ComponentListener, .ContainerEvent, .ContainerListener, java.beans.PropertyChangeEvent, .PropertyChangeListener, .PropertyVetoException, javax.swing.DefaultDesktopManager, .DesktopManager, .JComponent, .JDesktopPane, .JInternalFrame, .JLayeredPane, .JPanel, .UIManager, javax.swing.border.BevelBorder, javax.swing.plaf.ComponentUI, .UIResource, javax.swing.plaf.basic.BasicDesktopPaneUI

Provides the Synth L&F UI delegate for javax.swing.JDesktopPane.
Authors
Joshua Outwater, Steve Wilson
Since
1.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
SynthDesktopPaneUI.SynthDesktopManager

The default DesktopManager installed by the UI.

pack-priv static class
SynthDesktopPaneUI.TaskBar

The TaskBar installed by the UI.

Field Summary

Modifier and TypeField and Description
private DesktopManager
private SynthStyle
private SynthDesktopPaneUI.TaskBar
Inherited from javax.swing.plaf.basic.BasicDesktopPaneUI:
closeKeydesktopdesktopManagermaximizeKeyminimizeKeynavigateKeynavigateKey2

Constructor Summary

AccessConstructor and Description
public
SynthDesktopPaneUI()

Constructs a SynthDesktopPaneUI.

Method Summary

Modifier and TypeMethod and Description
public static ComponentUI

Returns:

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

Hides javax.swing.plaf.basic.BasicDesktopPaneUI.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)

protected void
protected void
protected void
installListeners()

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.installListeners.

Installs the PropertyChangeListener returned from createPropertyChangeListener on the JDesktopPane.

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

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.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 specified component.

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.

public void
propertyChange(PropertyChangeEvent evt)

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

protected void
protected void
protected void
uninstallListeners()

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallListeners.

Uninstalls the PropertyChangeListener returned from createPropertyChangeListener from the JDesktopPane.

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.BasicDesktopPaneUI:
createPropertyChangeListenergetMaximumSizegetMinimumSizegetPreferredSizeinstallKeyboardActionsinstallUIregisterKeyboardActionsuninstallKeyboardActionsuninstallUIunregisterKeyboardActions

Field Detail

oldDesktopManagerback to summary
private DesktopManager oldDesktopManager
styleback to summary
private SynthStyle style
taskBarback to summary
private SynthDesktopPaneUI.TaskBar taskBar

Constructor Detail

SynthDesktopPaneUIback to summary
public SynthDesktopPaneUI()

Constructs a SynthDesktopPaneUI.

Method Detail

createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.basic.BasicDesktopPaneUI.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)
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)
installDefaultsback to summary
protected void installDefaults()

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.installDefaults.

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

Installs default properties.

Annotations
@Override
installDesktopManagerback to summary
protected void installDesktopManager()

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.installDesktopManager.

Doc from javax.swing.plaf.basic.BasicDesktopPaneUI.installDesktopManager.

Installs desktop manager.

Annotations
@Override
installListenersback to summary
protected void installListeners()

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.installListeners.

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

Installs the PropertyChangeListener returned from createPropertyChangeListener on the JDesktopPane.

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

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.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 specified component. This implementation does nothing.

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
propertyChangeback to summary
public void propertyChange(PropertyChangeEvent evt)

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

Annotations
@Override
uninstallDefaultsback to summary
protected void uninstallDefaults()

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallDefaults.

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

Uninstalls default properties.

Annotations
@Override
uninstallDesktopManagerback to summary
protected void uninstallDesktopManager()

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallDesktopManager.

Doc from javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallDesktopManager.

Uninstalls desktop manager.

Annotations
@Override
uninstallListenersback to summary
protected void uninstallListeners()

Overrides javax.swing.plaf.basic.BasicDesktopPaneUI.uninstallListeners.

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

Uninstalls the PropertyChangeListener returned from createPropertyChangeListener from the JDesktopPane.

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(JDesktopPane c)
javax.swing.plaf.synth back to summary

pack-priv Class SynthDesktopPaneUI.SynthDesktopManager

extends DefaultDesktopManager
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Annotations
@SuppressWarnings:serial

The default DesktopManager installed by the UI.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
deiconifyFrame(JInternalFrame f)

Overrides javax.swing.DefaultDesktopManager.deiconifyFrame.

Implements javax.swing.DesktopManager.deiconifyFrame.

Removes the desktopIcon from its parent and adds its frame to the parent.

public void
iconifyFrame(JInternalFrame f)

Overrides javax.swing.DefaultDesktopManager.iconifyFrame.

Implements javax.swing.DesktopManager.iconifyFrame.

Removes the frame from its parent and adds its desktopIcon to the parent.

public void
protected void
removeIconFor(JInternalFrame f)

Overrides javax.swing.DefaultDesktopManager.removeIconFor.

Convenience method to remove the desktopIcon of f is necessary.

public void
setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)

Overrides javax.swing.DefaultDesktopManager.setBoundsForFrame.

Implements javax.swing.DesktopManager.setBoundsForFrame.

This moves the JComponent and repaints the damaged areas.

Inherited from javax.swing.DefaultDesktopManager:
activateFramebeginDraggingFramebeginResizingFramecloseFramedeactivateFramedragFrameendDraggingFrameendResizingFramegetBoundsForIconOfgetPreviousBoundsminimizeFrameopenFrameresizeFramesetPreviousBoundssetWasIconwasIcon

Constructor Detail

SynthDesktopManagerback to summary
pack-priv SynthDesktopManager()

Method Detail

deiconifyFrameback to summary
public void deiconifyFrame(JInternalFrame f)

Overrides javax.swing.DefaultDesktopManager.deiconifyFrame.

Implements javax.swing.DesktopManager.deiconifyFrame.

Doc from javax.swing.DefaultDesktopManager.deiconifyFrame.

Removes the desktopIcon from its parent and adds its frame to the parent.

iconifyFrameback to summary
public void iconifyFrame(JInternalFrame f)

Overrides javax.swing.DefaultDesktopManager.iconifyFrame.

Implements javax.swing.DesktopManager.iconifyFrame.

Doc from javax.swing.DefaultDesktopManager.iconifyFrame.

Removes the frame from its parent and adds its desktopIcon to the parent.

maximizeFrameback to summary
public void maximizeFrame(JInternalFrame f)

Overrides javax.swing.DefaultDesktopManager.maximizeFrame.

Implements javax.swing.DesktopManager.maximizeFrame.

Doc from javax.swing.DefaultDesktopManager.maximizeFrame.

Resizes the frame to fill its parents bounds.

removeIconForback to summary
protected void removeIconFor(JInternalFrame f)

Overrides javax.swing.DefaultDesktopManager.removeIconFor.

Doc from javax.swing.DefaultDesktopManager.removeIconFor.

Convenience method to remove the desktopIcon of f is necessary.

setBoundsForFrameback to summary
public void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)

Overrides javax.swing.DefaultDesktopManager.setBoundsForFrame.

Implements javax.swing.DesktopManager.setBoundsForFrame.

Doc from javax.swing.DefaultDesktopManager.setBoundsForFrame.

This moves the JComponent and repaints the damaged areas.

javax.swing.plaf.synth back to summary

pack-priv Class SynthDesktopPaneUI.TaskBar

extends JPanel
implements ComponentListener, ContainerListener
Class Inheritance
All Implemented Interfaces
java.awt.event.ContainerListener, java.util.EventListener, java.awt.event.ComponentListener
Annotations
@SuppressWarnings:serial

The TaskBar installed by the UI.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
componentAdded(ContainerEvent e)

Implements java.awt.event.ContainerListener.componentAdded.

Invoked when a component has been added to the container.

public void
componentHidden(ComponentEvent e)

Implements java.awt.event.ComponentListener.componentHidden.

Invoked when the component has been made invisible.

public void
componentMoved(ComponentEvent e)

Implements java.awt.event.ComponentListener.componentMoved.

Invoked when the component's position changes.

public void
componentRemoved(ContainerEvent e)

Implements java.awt.event.ContainerListener.componentRemoved.

Invoked when a component has been removed from the container.

public void
componentResized(ComponentEvent e)

Implements java.awt.event.ComponentListener.componentResized.

Invoked when the component's size changes.

public void
componentShown(ComponentEvent e)

Implements java.awt.event.ComponentListener.componentShown.

Invoked when the component has been made visible.

Inherited from javax.swing.JPanel:
getAccessibleContextgetUIgetUIClassIDparamStringsetUIupdateUI

Constructor Detail

TaskBarback to summary
pack-priv TaskBar()

Method Detail

adjustSizeback to summary
pack-priv void adjustSize()
componentAddedback to summary
public void componentAdded(ContainerEvent e)

Implements java.awt.event.ContainerListener.componentAdded.

Doc from java.awt.event.ContainerListener.componentAdded.

Invoked when a component has been added to the container.

componentHiddenback to summary
public void componentHidden(ComponentEvent e)

Implements java.awt.event.ComponentListener.componentHidden.

Doc from java.awt.event.ComponentListener.componentHidden.

Invoked when the component has been made invisible.

componentMovedback to summary
public void componentMoved(ComponentEvent e)

Implements java.awt.event.ComponentListener.componentMoved.

Doc from java.awt.event.ComponentListener.componentMoved.

Invoked when the component's position changes.

componentRemovedback to summary
public void componentRemoved(ContainerEvent e)

Implements java.awt.event.ContainerListener.componentRemoved.

Doc from java.awt.event.ContainerListener.componentRemoved.

Invoked when a component has been removed from the container.

componentResizedback to summary
public void componentResized(ComponentEvent e)

Implements java.awt.event.ComponentListener.componentResized.

Doc from java.awt.event.ComponentListener.componentResized.

Invoked when the component's size changes.

componentShownback to summary
public void componentShown(ComponentEvent e)

Implements java.awt.event.ComponentListener.componentShown.

Doc from java.awt.event.ComponentListener.componentShown.

Invoked when the component has been made visible.