ch.randelshofer.quaqua.jaguar
Class QuaquaJaguarSeparatorUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.SeparatorUI
javax.swing.plaf.basic.BasicSeparatorUI
ch.randelshofer.quaqua.jaguar.QuaquaJaguarSeparatorUI
- All Implemented Interfaces:
- VisuallyLayoutable
public class QuaquaJaguarSeparatorUI
- extends javax.swing.plaf.basic.BasicSeparatorUI
- implements VisuallyLayoutable
A replacement for the AquaSeparatorUI.
This class provides the following workaround for an issue in Apple's
implementation of the Aqua Look and Feel in Java 1.4.1:
- Menu separators are drawn using a blank area instead of a black and white
line.
This fix affects JSeparator's.
- Version:
- 2.2 2005-09-25 Paint texture when on menu.
2.1 2005-05-23 Take insets into account when drawing the separator
line.
2.0 2004-05-25 Renamed from Quaqua141UPSeparatorUI to
QuaquqJaguarSeparatorUI.
1.0 2003-09-29 Created.
- Author:
- Werner Randelshofer, Staldenmattweg 2, CH-6405 Immensee, Switzerland
Fields inherited from class javax.swing.plaf.basic.BasicSeparatorUI |
highlight, shadow |
Method Summary |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
|
int |
getBaseline(javax.swing.JComponent c,
int width,
int height)
Returns the baseline for the specified component, or -1 if the
baseline can not be determined. |
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c)
|
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
|
java.awt.Rectangle |
getVisualBounds(javax.swing.JComponent c,
int type,
int width,
int height)
Returns the visual bounds for the specified component, or null if the
visual bounds can not be determined. |
java.awt.Insets |
getVisualMargin(javax.swing.JSeparator tc)
|
protected void |
installDefaults(javax.swing.JSeparator s)
|
void |
paint(java.awt.Graphics gr,
javax.swing.JComponent c)
|
Methods inherited from class javax.swing.plaf.basic.BasicSeparatorUI |
getMaximumSize, installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUI |
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 |
QuaquaJaguarSeparatorUI
public QuaquaJaguarSeparatorUI()
- Creates a new instance of QuaquaSeparatorUI
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
installDefaults
protected void installDefaults(javax.swing.JSeparator s)
- Overrides:
installDefaults
in class javax.swing.plaf.basic.BasicSeparatorUI
paint
public void paint(java.awt.Graphics gr,
javax.swing.JComponent c)
- Overrides:
paint
in class javax.swing.plaf.basic.BasicSeparatorUI
getMinimumSize
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
- Overrides:
getMinimumSize
in class javax.swing.plaf.basic.BasicSeparatorUI
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSize
in class javax.swing.plaf.basic.BasicSeparatorUI
getVisualMargin
public java.awt.Insets getVisualMargin(javax.swing.JSeparator tc)
getBaseline
public int getBaseline(javax.swing.JComponent c,
int width,
int height)
- Description copied from interface:
VisuallyLayoutable
- Returns the baseline for the specified component, or -1 if the
baseline can not be determined. The baseline is measured from
the top of the component.
- Specified by:
getBaseline
in interface VisuallyLayoutable
- Parameters:
c
- JComponent to calculate baseline forwidth
- Width of the component to determine baseline for.height
- Height of the component to determine baseline for.
- Returns:
- baseline for the specified component
getVisualBounds
public java.awt.Rectangle getVisualBounds(javax.swing.JComponent c,
int type,
int width,
int height)
- Description copied from interface:
VisuallyLayoutable
- Returns the visual bounds for the specified component, or null if the
visual bounds can not be determined.
- Specified by:
getVisualBounds
in interface VisuallyLayoutable
- Parameters:
c
- JComponent to calculate visual margin fortype
- The type of the visual margin.width
- Width of the componentheight
- Height of the component
- Returns:
- The visual bounds in component coordinates.