Get Bounce at SourceForge.net. Fast secure and Free Open Source software downloads

org.bounce.plaf
Class BounceLabelUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.LabelUI
          extended by javax.swing.plaf.basic.BasicLabelUI
              extended by org.bounce.plaf.BounceLabelUI
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class BounceLabelUI
extends javax.swing.plaf.basic.BasicLabelUI

Extend the BasicLabelUI class, this LabelUI allows for a multi-line label.

Version:
$Revision: 1.6 $, $Date: 2008/01/28 21:28:37 $
Author:
Edwin Dankert

Constructor Summary
BounceLabelUI()
           
 
Method Summary
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
          Creates the one version of this UI.
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
          Returns the preferred size of the label, this size will return the full width of the text as the preferred width and the full height of the lines as the height.
 void installUI(javax.swing.JComponent c)
          Installs the UI for the supplied component.
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
          Overrides the paint method in the BasicLabelUI class.
 void uninstallUI(javax.swing.JComponent c)
          Un-installs the current UI for the supplied component.
 
Methods inherited from class javax.swing.plaf.basic.BasicLabelUI
getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, installComponents, installDefaults, installKeyboardActions, installListeners, layoutCL, paintDisabledText, paintEnabledText, propertyChange, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BounceLabelUI

public BounceLabelUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
Creates the one version of this UI.

Parameters:
c - the component the ui needs to be installed for.
Returns:
the component's ui!

installUI

public void installUI(javax.swing.JComponent c)
Installs the UI for the supplied component.

Overrides:
installUI in class javax.swing.plaf.basic.BasicLabelUI
Parameters:
c - the component the ui needs to be installed for.

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Un-installs the current UI for the supplied component.

Overrides:
uninstallUI in class javax.swing.plaf.basic.BasicLabelUI
Parameters:
c - the component the ui needs to be un-installed for.

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Overrides the paint method in the BasicLabelUI class.

Overrides:
paint in class javax.swing.plaf.basic.BasicLabelUI
Parameters:
g - the graphics.
c - the button component.

getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
Returns the preferred size of the label, this size will return the full width of the text as the preferred width and the full height of the lines as the height.

This method is a revamped version of the method found in: BasicLabelUI.getPreferredSize()

Overrides:
getPreferredSize in class javax.swing.plaf.basic.BasicLabelUI
Parameters:
c - the button component.
Returns:
the preferred size of the button.

Get Bounce at SourceForge.net. Fast secure and Free Open Source software downloads

Copyright 2002-2002-2009 Edwin Dankert. All Rights Reserved.