|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.LabelUI
javax.swing.plaf.basic.BasicLabelUI
com.alee.extended.label.WebStyledLabelUI
public class WebStyledLabelUI
Field Summary | |
---|---|
protected boolean |
ignoreColorSettings
|
protected WebStyledLabel |
label
|
protected java.awt.Insets |
margin
Style settings. |
protected StyledLabelPainter |
painter
Component painter. |
protected int |
preferredRowCount
|
protected java.beans.PropertyChangeListener |
propertyChangeListener
Label listeners. |
protected float |
scriptFontRatio
|
protected java.lang.String |
styleId
Runtime variables. |
protected java.lang.String |
truncatedTextSuffix
|
Fields inherited from class javax.swing.plaf.basic.BasicLabelUI |
---|
labelUI |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary | |
---|---|
WebStyledLabelUI()
|
Method Summary | |
---|---|
protected void |
applyPainterSettings(StyledLabelPainter painter)
Applies UI settings to this specific painter. |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Returns an instance of the WebStyledLabelUI for the specified component. |
java.awt.Insets |
getMargin()
Returns component margin. |
Painter |
getPainter()
Returns label painter. |
int |
getPreferredRowCount()
Returns preferred row count. |
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
|
float |
getScriptFontRatio()
Returns subscript and superscript font ratio. |
java.lang.String |
getStyleId()
Returns component style ID. |
java.lang.String |
getTruncatedTextSuffix()
Returns truncated text suffix. |
void |
installUI(javax.swing.JComponent c)
Installs UI in the specified component. |
boolean |
isIgnoreColorSettings()
Returns whether color settings should be ignored or not. |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
Paints label. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
|
void |
setIgnoreColorSettings(boolean ignore)
Sets whether color settings should be ignored or not. |
void |
setMargin(java.awt.Insets margin)
Sets component margin. |
void |
setPainter(Painter painter)
Sets label painter. |
void |
setPreferredRowCount(int rows)
Sets preferred row count. |
void |
setScriptFontRatio(float ratio)
Sets subscript and superscript font ratio. |
void |
setStyleId(java.lang.String id)
Sets custom component style ID. |
void |
setTruncatedTextSuffix(java.lang.String suffix)
Sets truncated text suffix. |
void |
uninstallUI(javax.swing.JComponent c)
Uninstalls UI from the specified component. |
void |
updateBorder()
Updates custom WebLaF border. |
Methods inherited from class javax.swing.plaf.basic.BasicLabelUI |
---|
getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, installComponents, installDefaults, installKeyboardActions, installListeners, layoutCL, paintDisabledText, paintEnabledText, 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 |
Field Detail |
---|
protected java.awt.Insets margin
protected int preferredRowCount
protected boolean ignoreColorSettings
protected float scriptFontRatio
protected java.lang.String truncatedTextSuffix
protected StyledLabelPainter painter
protected java.beans.PropertyChangeListener propertyChangeListener
protected java.lang.String styleId
protected WebStyledLabel label
Constructor Detail |
---|
public WebStyledLabelUI()
Method Detail |
---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
c
- component that will use UI instance
public void installUI(javax.swing.JComponent c)
installUI
in class javax.swing.plaf.basic.BasicLabelUI
c
- component for this UIpublic void uninstallUI(javax.swing.JComponent c)
uninstallUI
in class javax.swing.plaf.basic.BasicLabelUI
c
- component with this UIpublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class javax.swing.plaf.basic.BasicLabelUI
public java.lang.String getStyleId()
getStyleId
in interface Styleable
public void setStyleId(java.lang.String id)
setStyleId
in interface Styleable
id
- custom component style IDpublic void updateBorder()
updateBorder
in interface BorderMethods
public java.awt.Insets getMargin()
public void setMargin(java.awt.Insets margin)
margin
- component marginpublic int getPreferredRowCount()
public void setPreferredRowCount(int rows)
rows
- new preferred row countpublic boolean isIgnoreColorSettings()
public void setIgnoreColorSettings(boolean ignore)
ignore
- whether color settings should be ignored or notpublic float getScriptFontRatio()
public void setScriptFontRatio(float ratio)
ratio
- new subscript and superscript font ratiopublic java.lang.String getTruncatedTextSuffix()
public void setTruncatedTextSuffix(java.lang.String suffix)
suffix
- new truncated text suffixpublic Painter getPainter()
public void setPainter(Painter painter)
painter
- new label painterprotected void applyPainterSettings(StyledLabelPainter painter)
painter
- label painterpublic void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicLabelUI
g
- graphicsc
- componentpublic java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize
in class javax.swing.plaf.basic.BasicLabelUI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |