com.vlsolutions.swing.docking.ui
Class DockViewTitleBarUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.PanelUI
          extended by com.vlsolutions.swing.docking.ui.DockViewTitleBarUI
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class DockViewTitleBarUI
extends javax.swing.plaf.PanelUI
implements java.beans.PropertyChangeListener

A UI for the DockViewTitleBar.

Since:
2.0

Field Summary
protected  DockViewTitleBar titleBar
           
 
Constructor Summary
DockViewTitleBarUI(DockViewTitleBar tb)
           
 
Method Summary
protected  void configureAttachButton(javax.swing.JButton btn)
          installs the icons and tooltip suitable for an attach button
protected  void configureButtons(DockViewTitleBar tb)
          Update the buttons to track state changes (for example, the maximize button can become "restore" when the view is maximized.
protected  void configureCloseButton(javax.swing.JButton btn)
          installs the icons and tooltip suitable for a close button
protected  void configureDockButton(javax.swing.JButton btn)
          installs the icons and tooltip suitable for a dock button
protected  void configureFloatButton(javax.swing.JButton btn)
          installs the icons and tooltip suitable for a float button
protected  void configureHideButton(javax.swing.JButton btn)
          installs the icons and tooltip suitable for a hide button
protected  void configureMaximizeButton(javax.swing.JButton btn)
          installs the icons and tooltip suitable for a maximize button
protected  void configureRestoreButton(javax.swing.JButton btn)
          installs the icons and tooltip suitable for a restore button.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
protected  void installBackground()
          Installs the default background of the title bar
protected  void installButtons()
          configure the title bar buttons
protected  void installLabel()
          Installs default on the titlebar label
protected  void installTitleBorder(javax.swing.JComponent c)
          installs the border of the title bar
 void installUI(javax.swing.JComponent c)
           
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
          Custom title bar painting : uses a gradient from the background color to the control highlight color.
 void propertyChange(java.beans.PropertyChangeEvent e)
          Listen to property changes in the DockKey or the title bar
protected  void uninstallTitleBorder(javax.swing.JComponent c)
          uninstalls the icons and tooltip suitable for a close button
 void uninstallUI(javax.swing.JComponent c)
           
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

titleBar

protected DockViewTitleBar titleBar
Constructor Detail

DockViewTitleBarUI

public DockViewTitleBarUI(DockViewTitleBar tb)
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class javax.swing.plaf.ComponentUI

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Overrides:
uninstallUI in class javax.swing.plaf.ComponentUI

installLabel

protected void installLabel()
Installs default on the titlebar label


installBackground

protected void installBackground()
Installs the default background of the title bar


installButtons

protected void installButtons()
configure the title bar buttons


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Listen to property changes in the DockKey or the title bar

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

configureButtons

protected void configureButtons(DockViewTitleBar tb)
Update the buttons to track state changes (for example, the maximize button can become "restore" when the view is maximized.


configureCloseButton

protected void configureCloseButton(javax.swing.JButton btn)
installs the icons and tooltip suitable for a close button


configureMaximizeButton

protected void configureMaximizeButton(javax.swing.JButton btn)
installs the icons and tooltip suitable for a maximize button


configureRestoreButton

protected void configureRestoreButton(javax.swing.JButton btn)
installs the icons and tooltip suitable for a restore button.


configureHideButton

protected void configureHideButton(javax.swing.JButton btn)
installs the icons and tooltip suitable for a hide button


configureDockButton

protected void configureDockButton(javax.swing.JButton btn)
installs the icons and tooltip suitable for a dock button


configureFloatButton

protected void configureFloatButton(javax.swing.JButton btn)
installs the icons and tooltip suitable for a float button


configureAttachButton

protected void configureAttachButton(javax.swing.JButton btn)
installs the icons and tooltip suitable for an attach button


installTitleBorder

protected void installTitleBorder(javax.swing.JComponent c)
installs the border of the title bar


uninstallTitleBorder

protected void uninstallTitleBorder(javax.swing.JComponent c)
uninstalls the icons and tooltip suitable for a close button


paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Custom title bar painting : uses a gradient from the background color to the control highlight color.

Overrides:
paint in class javax.swing.plaf.ComponentUI


© Copyright 2004-2007 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications