public class SynthLabelUI extends BasicLabelUIimplements SynthUI
JLabel.
labelUIDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| Constructor and Description |
|---|
SynthLabelUI()
|
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent
Returns the LabelUI implementation used for the skins look and feel.
|
int |
getBaseline(JComponent
Returns the baseline.
|
SynthContext |
getContext(JComponent
Returns the Context for the specified component.
|
Dimension |
getMaximumSize(JComponent
Returns the specified component's maximum size appropriate for the look and feel.
|
Dimension |
getMinimumSize(JComponent
Returns the specified component's minimum size appropriate for the look and feel.
|
Dimension |
getPreferredSize(JComponent
Returns the specified component's preferred size appropriate for the look and feel.
|
protected void |
installDefaults(JLabel
|
void |
paint(Graphics
Paints the specified component according to the Look and Feel.
|
protected void |
paint(SynthContext
Paints the specified component.
|
void |
paintBorder(SynthContext
Paints the border.
|
void |
propertyChange(PropertyChangeEvent
This method gets called when a bound property is changed.
|
protected void |
uninstallDefaults(JLabel
|
void |
update(Graphics
Notifies this UI delegate to repaint the specified component.
|
getBaselineResizeBehavior, installComponents, installKeyboardActions, installListeners, installUI, layoutCL, paintDisabledText, paintEnabledText, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCountpublic static ComponentUIcreateUI(JComponent c)
c - component to create UI object for
protected void installDefaults(JLabelc)
protected void uninstallDefaults(JLabelc)
public SynthContextgetContext(JComponent c)
getContext in interface
SynthUI
c - Component requesting SynthContext.
public int getBaseline(JComponentc, int width, int height)
getBaseline in class
BasicLabelUI
c -
JComponent baseline is being requested for
width - the width to get the baseline for
height - the height to get the baseline for
JComponent.getBaseline(int, int)
public void update(Graphicsg, JComponent c)
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.
update in class
ComponentUI
g - the
Graphics object used for painting
c - the component being painted
paint(SynthContext,Graphics)
public void paint(Graphicsg, JComponent c)
This method is not used by Synth Look and Feel. Painting is handled by the paint(SynthContext,Graphics) method.
paint in class
BasicLabelUI
g - the
Graphics object used for painting
c - the component being painted
paint(SynthContext,Graphics)
protected void paint(SynthContextcontext, Graphics g)
context - context for the component being painted
g - the
Graphics object used for painting
update(Graphics,JComponent)
public void paintBorder(SynthContextcontext, Graphics g, int x, int y, int w, int h)
paintBorder in interface
SynthUI
context - a component context
g -
Graphics to paint on
x - the X coordinate
y - the Y coordinate
w - width of the border
h - height of the border
public DimensiongetPreferredSize(JComponent c)
null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns
null.
getPreferredSize in class
BasicLabelUI
c - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
JComponent.getPreferredSize() ,
LayoutManager.preferredLayoutSize(java.awt.Container)
public DimensiongetMinimumSize(JComponent c)
null is returned, the minimum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes
getPreferredSize and returns that value.
getMinimumSize in class
BasicLabelUI
c - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
JComponent.getMinimumSize() ,
LayoutManager.minimumLayoutSize(java.awt.Container) ,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public DimensiongetMaximumSize(JComponent c)
null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes
getPreferredSize and returns that value.
getMaximumSize in class
BasicLabelUI
c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
JComponent.getMaximumSize() ,
LayoutManager2.maximumLayoutSize(java.awt.Container)
public void propertyChange(PropertyChangeEvente)
propertyChange in interface
PropertyChangeListener
propertyChange in class
BasicLabelUI
e - A PropertyChangeEvent object describing the event source and the property that has changed.