com.alee.extended.label
Class WebStyledLabel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JLabel
                  extended by com.alee.extended.label.WebStyledLabel
All Implemented Interfaces:
LanguageMethods, ToolTipMethods, Styleable, EventMethods, FontMethods<WebStyledLabel>, SwingMethods, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants

public class WebStyledLabel
extends javax.swing.JLabel
implements EventMethods, ToolTipMethods, Styleable, LanguageMethods, FontMethods<WebStyledLabel>

Custom label component that quickly renders multi-styled text. Its rendering speed is superior to HTML rendering within simple JLabel and its usage is preferred.

Author:
Mikle Garin
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JLabel
javax.swing.JLabel.AccessibleJLabel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  boolean lineWrap
          Whether should wrap
protected  int maximumRows
           
protected  int minimumRows
           
protected  int preferredWidth
           
static java.lang.String PROPERTY_STYLE_RANGE
          Component properties.
protected  int rowGap
           
protected  int rows
           
protected  java.util.List<StyleRange> styleRanges
          StyleRange list.
 
Fields inherited from class javax.swing.JLabel
labelFor
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WebStyledLabel()
          Constructs empty label.
WebStyledLabel(javax.swing.Icon icon)
          Constructs label with the specified preferences.
WebStyledLabel(javax.swing.Icon icon, java.awt.Insets margin)
          Constructs label with the specified preferences.
WebStyledLabel(javax.swing.Icon icon, int horizontalAlignment)
          Constructs label with the specified preferences.
WebStyledLabel(javax.swing.Icon icon, int horizontalAlignment, java.awt.Insets margin)
          Constructs label with the specified preferences.
WebStyledLabel(java.awt.Insets margin)
          Constructs label with the specified preferences.
WebStyledLabel(int horizontalAlignment)
          Constructs label with the specified preferences.
WebStyledLabel(int horizontalAlignment, java.awt.Insets margin)
          Constructs label with the specified preferences.
WebStyledLabel(java.lang.String text, javax.swing.Icon icon, java.awt.Insets margin, java.lang.Object... data)
          Constructs label with the specified preferences.
WebStyledLabel(java.lang.String text, javax.swing.Icon icon, int horizontalAlignment, java.awt.Insets margin, java.lang.Object... data)
          Constructs label with the specified preferences.
WebStyledLabel(java.lang.String text, javax.swing.Icon icon, int horizontalAlignment, java.lang.Object... data)
          Constructs label with the specified preferences.
WebStyledLabel(java.lang.String text, javax.swing.Icon icon, java.lang.Object... data)
          Constructs label with the specified preferences.
WebStyledLabel(java.lang.String text, java.awt.Insets margin, java.lang.Object... data)
          Constructs label with the specified preferences.
WebStyledLabel(java.lang.String text, int horizontalAlignment, java.awt.Insets margin, java.lang.Object... data)
          Constructs label with the specified preferences.
WebStyledLabel(java.lang.String text, int horizontalAlignment, java.lang.Object... data)
          Constructs label with the specified preferences.
WebStyledLabel(java.lang.String text, java.lang.Object... data)
          Constructs label with the specified preferences.
 
Method Summary
 void addStyleRange(StyleRange styleRange)
          Adds style range into this label.
protected  StyleRange addStyleRangeImpl(StyleRange styleRange)
          Adds style range into this label.
 void addStyleRanges(java.util.List<StyleRange> styleRanges)
          Adds style ranges into this label.
protected  void addStyleRangesImpl(java.util.List<StyleRange> styleRanges)
          Adds style ranges into this label.
 WebCustomTooltip addToolTip(javax.swing.Icon icon, java.lang.String tooltip)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay, int delay)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(javax.swing.JComponent tooltip)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(javax.swing.JComponent tooltip, int delay)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(javax.swing.JComponent tooltip, TooltipWay tooltipWay)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(javax.swing.JComponent tooltip, TooltipWay tooltipWay, int delay)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(java.lang.String tooltip)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(java.lang.String tooltip, TooltipWay tooltipWay)
          Adds custom WebLaF tooltip to the component.
 WebCustomTooltip addToolTip(java.lang.String tooltip, TooltipWay tooltipWay, int delay)
          Adds custom WebLaF tooltip to the component.
 WebStyledLabel changeFontSize(int change)
          Changes font size of the specified component.
protected  StyleRange clearSimilarRangeImpl(int start, int length)
          Removes any style range found in the same range as the specified one.
 void clearStyleRanges()
          Clears all style ranges.
protected  void clearStyleRangesImpl()
          Clears all style ranges.
 java.lang.String getFontName()
          Returns component font name.
 int getFontSize()
          Returns component font size.
 java.awt.Insets getMargin()
          Returns label margin.
 int getMaximumRows()
          Returns maximum rows amount visible after wrapping.
 java.awt.Dimension getMaximumSize()
          
 int getMinimumRows()
          Returns minimum rows amount visible after wrapping.
 java.awt.Dimension getMinimumSize()
          
 Painter getPainter()
          Returns label painter.
 int getPreferredWidth()
          Gets the preferred width of the styled label.
 int getRowGap()
          Returns gap between text rows in pixels.
 int getRows()
          Returns row count used to wrap label text.
 java.lang.String getStyleId()
          Returns component style ID.
 java.util.List<StyleRange> getStyleRanges()
          Returns added style ranges.
protected  java.util.List<StyleRange> getStyleRangesImpl()
          Returns added style ranges.
 java.lang.String getUIClassID()
          
 WebStyledLabelUI getWebUI()
          Returns Web-UI applied to this class.
 boolean isBoldFont()
          Returns whether component font is bold or not.
 boolean isItalicFont()
          Returns whether component font is italic or not.
 boolean isLanguageSet()
          Returns whether this component registered in LanguageManager or not.
 boolean isLineWrap()
          Returns whether text lines should be wrapped or not.
 boolean isPlainFont()
          Returns whether component font is plain or not.
 java.awt.event.MouseAdapter onDoubleClick(MouseEventRunnable runnable)
          Shortcut method for double-click mouse event.
 java.awt.event.FocusAdapter onFocusGain(FocusEventRunnable runnable)
          Shortcut method for focus gain event.
 java.awt.event.FocusAdapter onFocusLoss(FocusEventRunnable runnable)
          Shortcut method for focus loss event.
 java.awt.event.KeyAdapter onKeyPress(HotkeyData hotkey, KeyEventRunnable runnable)
          Shortcut method for key press event.
 java.awt.event.KeyAdapter onKeyPress(KeyEventRunnable runnable)
          Shortcut method for key press event.
 java.awt.event.KeyAdapter onKeyRelease(HotkeyData hotkey, KeyEventRunnable runnable)
          Shortcut method for key release event.
 java.awt.event.KeyAdapter onKeyRelease(KeyEventRunnable runnable)
          Shortcut method for key release event.
 java.awt.event.KeyAdapter onKeyType(HotkeyData hotkey, KeyEventRunnable runnable)
          Shortcut method for key type event.
 java.awt.event.KeyAdapter onKeyType(KeyEventRunnable runnable)
          Shortcut method for key type event.
 java.awt.event.MouseAdapter onMenuTrigger(MouseEventRunnable runnable)
          Shortcut method for mouse event triggering popup menu.
 java.awt.event.MouseAdapter onMouseClick(MouseButton mouseButton, MouseEventRunnable runnable)
          Shortcut method for mouse click event.
 java.awt.event.MouseAdapter onMouseClick(MouseEventRunnable runnable)
          Shortcut method for mouse click event.
 java.awt.event.MouseAdapter onMouseDrag(MouseButton mouseButton, MouseEventRunnable runnable)
          Shortcut method for mouse drag event.
 java.awt.event.MouseAdapter onMouseDrag(MouseEventRunnable runnable)
          Shortcut method for mouse drag event.
 java.awt.event.MouseAdapter onMouseEnter(MouseEventRunnable runnable)
          Shortcut method for mouse enter event.
 java.awt.event.MouseAdapter onMouseExit(MouseEventRunnable runnable)
          Shortcut method for mouse exit event.
 java.awt.event.MouseAdapter onMousePress(MouseButton mouseButton, MouseEventRunnable runnable)
          Shortcut method for mouse press event.
 java.awt.event.MouseAdapter onMousePress(MouseEventRunnable runnable)
          Shortcut method for mouse press event.
 void removeLanguage()
          Unregisters component from LanguageManager.
 void removeLanguageUpdater()
          Unregisters any custom language updater set for this component.
 void removeStyleRange(StyleRange styleRange)
          Removes style range from this label.
protected  void removeStyleRangeImpl(StyleRange styleRange)
          Removes style range from this label.
 void removeStyleRanges(java.util.List<StyleRange> styleRanges)
          Removes style ranges from this label.
protected  void removeStyleRangesImpl(java.util.List<StyleRange> styleRanges)
          Removes style ranges from this label.
 void removeToolTip(WebCustomTooltip tooltip)
          Removes specified custom WebLaF tooltip from the component.
 void removeToolTips()
          Removes all custom WebLaF tooltips from the component.
 void removeToolTips(java.util.List<WebCustomTooltip> tooltips)
          Removes specified custom WebLaF tooltips from the component.
 void removeToolTips(WebCustomTooltip... tooltips)
          Removes specified custom WebLaF tooltips from the component.
 WebStyledLabel setBoldFont()
          Sets bold font for the component.
 WebStyledLabel setBoldFont(boolean apply)
          Sets bold font for the component.
 WebStyledLabel setFontName(java.lang.String fontName)
          Sets component font name.
 WebStyledLabel setFontSize(int fontSize)
          Sets component font size.
 WebStyledLabel setFontSizeAndStyle(int fontSize, boolean bold, boolean italic)
          Sets font size and style for the specified component.
 WebStyledLabel setFontSizeAndStyle(int fontSize, int style)
          Sets font size and style for the specified component.
 WebStyledLabel setFontStyle(boolean bold, boolean italic)
          Sets component font style.
 WebStyledLabel setFontStyle(int style)
          Sets component font style.
 WebStyledLabel setItalicFont()
          Sets italic or plain font for the component.
 WebStyledLabel setItalicFont(boolean apply)
          Sets italic or plain font for the component.
 void setLanguage(java.lang.String key, java.lang.Object... data)
          Registers component in LanguageManager under specified key and with specified formatting data.
 void setLanguageUpdater(LanguageUpdater updater)
          Registers custom language updater for this component.
 void setLineWrap(boolean wrap)
          Sets whether text lines should be wrapped or not.
 WebStyledLabel setMargin(java.awt.Insets margin)
          Sets label margin.
 WebStyledLabel setMargin(int spacing)
          Sets label margin.
 WebStyledLabel setMargin(int top, int left, int bottom, int right)
          Sets label margin.
 void setMaximumRows(int maximumRows)
          Sets maximum rows amount visible after wrapping.
 void setMinimumRows(int minimumRows)
          Sets minimum rows amount visible after wrapping.
 WebStyledLabel setPainter(Painter painter)
          Sets label painter.
 WebStyledLabel setPlainFont()
          Sets plain font for the component.
 WebStyledLabel setPlainFont(boolean apply)
          Sets plain font for the component.
 void setPreferredWidth(int width)
          Sets preferred width of the label.
 void setRowGap(int gap)
          Sets gap between text rows in pixels.
 void setRows(int rows)
          Sets row count used to wrap label text.
 void setStyleId(java.lang.String id)
          Sets custom component style ID.
 void setStyleRanges(java.util.List<StyleRange> styleRanges)
          Clears all style ranges and adds new ones.
 void setText(java.lang.String text)
          
 WebCustomTooltip setToolTip(javax.swing.Icon icon, java.lang.String tooltip)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(javax.swing.Icon icon, java.lang.String tooltip, TooltipWay tooltipWay, int delay)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(javax.swing.JComponent tooltip)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(javax.swing.JComponent tooltip, int delay)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(javax.swing.JComponent tooltip, TooltipWay tooltipWay)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(javax.swing.JComponent tooltip, TooltipWay tooltipWay, int delay)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(java.lang.String tooltip)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(java.lang.String tooltip, TooltipWay tooltipWay)
          Sets single custom WebLaF tooltip into the component.
 WebCustomTooltip setToolTip(java.lang.String tooltip, TooltipWay tooltipWay, int delay)
          Sets single custom WebLaF tooltip into the component.
 void updateLanguage(java.lang.Object... data)
          Updates component language and formatting data.
 void updateLanguage(java.lang.String key, java.lang.Object... data)
          Changes component language key and updates its language and formatting data.
 void updateUI()
          
 
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setUI, setVerticalAlignment, setVerticalTextPosition
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_STYLE_RANGE

public static final java.lang.String PROPERTY_STYLE_RANGE
Component properties.

See Also:
Constant Field Values

styleRanges

protected java.util.List<StyleRange> styleRanges
StyleRange list.


lineWrap

protected boolean lineWrap
Whether should wrap


rows

protected int rows

maximumRows

protected int maximumRows

minimumRows

protected int minimumRows

preferredWidth

protected int preferredWidth

rowGap

protected int rowGap
Constructor Detail

WebStyledLabel

public WebStyledLabel()
Constructs empty label.


WebStyledLabel

public WebStyledLabel(java.awt.Insets margin)
Constructs label with the specified preferences.

Parameters:
margin - label margin

WebStyledLabel

public WebStyledLabel(javax.swing.Icon icon)
Constructs label with the specified preferences.

Parameters:
icon - icon

WebStyledLabel

public WebStyledLabel(javax.swing.Icon icon,
                      java.awt.Insets margin)
Constructs label with the specified preferences.

Parameters:
icon - label icon
margin - label margin

WebStyledLabel

public WebStyledLabel(int horizontalAlignment)
Constructs label with the specified preferences.

Parameters:
horizontalAlignment - horizontal alignment

WebStyledLabel

public WebStyledLabel(int horizontalAlignment,
                      java.awt.Insets margin)
Constructs label with the specified preferences.

Parameters:
horizontalAlignment - horizontal alignment
margin - label margin

WebStyledLabel

public WebStyledLabel(javax.swing.Icon icon,
                      int horizontalAlignment)
Constructs label with the specified preferences.

Parameters:
icon - label icon
horizontalAlignment - horizontal alignment

WebStyledLabel

public WebStyledLabel(javax.swing.Icon icon,
                      int horizontalAlignment,
                      java.awt.Insets margin)
Constructs label with the specified preferences.

Parameters:
icon - label icon
horizontalAlignment - horizontal alignment
margin - label margin

WebStyledLabel

public WebStyledLabel(java.lang.String text,
                      java.lang.Object... data)
Constructs label with the specified preferences.

Parameters:
text - text or translation key
data - language data, may not be passed

WebStyledLabel

public WebStyledLabel(java.lang.String text,
                      java.awt.Insets margin,
                      java.lang.Object... data)
Constructs label with the specified preferences.

Parameters:
text - text or translation key
margin - label margin
data - language data, may not be passed

WebStyledLabel

public WebStyledLabel(java.lang.String text,
                      int horizontalAlignment,
                      java.lang.Object... data)
Constructs label with the specified preferences.

Parameters:
text - text or translation key
horizontalAlignment - horizontal alignment
data - language data, may not be passed

WebStyledLabel

public WebStyledLabel(java.lang.String text,
                      int horizontalAlignment,
                      java.awt.Insets margin,
                      java.lang.Object... data)
Constructs label with the specified preferences.

Parameters:
text - text or translation key
horizontalAlignment - horizontal alignment
margin - label margin
data - language data, may not be passed

WebStyledLabel

public WebStyledLabel(java.lang.String text,
                      javax.swing.Icon icon,
                      java.lang.Object... data)
Constructs label with the specified preferences.

Parameters:
text - text or translation key
icon - label icon
data - language data, may not be passed

WebStyledLabel

public WebStyledLabel(java.lang.String text,
                      javax.swing.Icon icon,
                      java.awt.Insets margin,
                      java.lang.Object... data)
Constructs label with the specified preferences.

Parameters:
text - text or translation key
icon - label icon
margin - label margin
data - language data, may not be passed

WebStyledLabel

public WebStyledLabel(java.lang.String text,
                      javax.swing.Icon icon,
                      int horizontalAlignment,
                      java.lang.Object... data)
Constructs label with the specified preferences.

Parameters:
text - text or translation key
icon - label icon
horizontalAlignment - horizontal alignment
data - language data, may not be passed

WebStyledLabel

public WebStyledLabel(java.lang.String text,
                      javax.swing.Icon icon,
                      int horizontalAlignment,
                      java.awt.Insets margin,
                      java.lang.Object... data)
Constructs label with the specified preferences.

Parameters:
text - text or translation key
icon - label icon
horizontalAlignment - horizontal alignment
margin - label margin
data - language data, may not be passed
Method Detail

setText

public void setText(java.lang.String text)

Overrides:
setText in class javax.swing.JLabel

getMargin

public java.awt.Insets getMargin()
Returns label margin.

Returns:
label margin

setMargin

public WebStyledLabel setMargin(java.awt.Insets margin)
Sets label margin.

Parameters:
margin - new label margin
Returns:
this label

setMargin

public WebStyledLabel setMargin(int top,
                                int left,
                                int bottom,
                                int right)
Sets label margin.

Parameters:
top - top label margin
left - left label margin
bottom - bottom label margin
right - right label margin
Returns:
this label

setMargin

public WebStyledLabel setMargin(int spacing)
Sets label margin.

Parameters:
spacing - label margin
Returns:
this label

getPainter

public Painter getPainter()
Returns label painter.

Returns:
label painter

setPainter

public WebStyledLabel setPainter(Painter painter)
Sets label painter. Pass null to remove label painter.

Parameters:
painter - new label painter
Returns:
this label

getStyleRanges

public java.util.List<StyleRange> getStyleRanges()
Returns added style ranges.

Returns:
added style ranges

addStyleRange

public void addStyleRange(StyleRange styleRange)
Adds style range into this label.

Parameters:
styleRange - new style range

addStyleRanges

public void addStyleRanges(java.util.List<StyleRange> styleRanges)
Adds style ranges into this label.

Parameters:
styleRanges - new style ranges list

removeStyleRange

public void removeStyleRange(StyleRange styleRange)
Removes style range from this label.

Parameters:
styleRange - style range to remove

removeStyleRanges

public void removeStyleRanges(java.util.List<StyleRange> styleRanges)
Removes style ranges from this label.

Parameters:
styleRanges - style ranges to remove

setStyleRanges

public void setStyleRanges(java.util.List<StyleRange> styleRanges)
Clears all style ranges and adds new ones.

Parameters:
styleRanges - new style ranges

clearStyleRanges

public void clearStyleRanges()
Clears all style ranges.


getStyleRangesImpl

protected java.util.List<StyleRange> getStyleRangesImpl()
Returns added style ranges.

Returns:
added style ranges

addStyleRangeImpl

protected StyleRange addStyleRangeImpl(StyleRange styleRange)
Adds style range into this label.

Parameters:
styleRange - new style range
Returns:
removed style range

addStyleRangesImpl

protected void addStyleRangesImpl(java.util.List<StyleRange> styleRanges)
Adds style ranges into this label.

Parameters:
styleRanges - new style ranges list

removeStyleRangeImpl

protected void removeStyleRangeImpl(StyleRange styleRange)
Removes style range from this label.

Parameters:
styleRange - style range to remove

removeStyleRangesImpl

protected void removeStyleRangesImpl(java.util.List<StyleRange> styleRanges)
Removes style ranges from this label.

Parameters:
styleRanges - style ranges to remove

clearStyleRangesImpl

protected void clearStyleRangesImpl()
Clears all style ranges.


clearSimilarRangeImpl

protected StyleRange clearSimilarRangeImpl(int start,
                                           int length)
Removes any style range found in the same range as the specified one.

Parameters:
start - range start
length - range length
Returns:
removed style range

isLineWrap

public boolean isLineWrap()
Returns whether text lines should be wrapped or not.

Returns:
true if text lines should be wrapped, false otherwise

setLineWrap

public void setLineWrap(boolean wrap)
Sets whether text lines should be wrapped or not.

Parameters:
wrap - whether text lines should be wrapped or not

getRows

public int getRows()
Returns row count used to wrap label text.

Returns:
row count used to wrap label text

setRows

public void setRows(int rows)
Sets row count used to wrap label text. By default it is set to zero.

Note that it has lower priority than preferred width. If preferred width is set this value is ignored.

Parameters:
rows - the row count

getRowGap

public int getRowGap()
Returns gap between text rows in pixels.

Returns:
gap between text rows in pixels

setRowGap

public void setRowGap(int gap)
Sets gap between text rows in pixels.

Parameters:
gap - gap between text rows in pixels

getMaximumRows

public int getMaximumRows()
Returns maximum rows amount visible after wrapping.

Returns:
maximum rows amount visible after wrapping

setMaximumRows

public void setMaximumRows(int maximumRows)
Sets maximum rows amount visible after wrapping. By default it is set to zero.

Parameters:
maximumRows - maximum rows amount visible after wrapping

getMinimumRows

public int getMinimumRows()
Returns minimum rows amount visible after wrapping.

Returns:
minimum rows amount visible after wrapping

setMinimumRows

public void setMinimumRows(int minimumRows)
Sets minimum rows amount visible after wrapping. By default it is set to zero.

Parameters:
minimumRows - minimum rows amount visible after wrapping

getStyleId

public java.lang.String getStyleId()
Returns component style ID. Custom ID can be specified to override default component style using "setStyleId" method. If style for such custom ID is not found in skin descriptor then default style for that component is used.

Specified by:
getStyleId in interface Styleable
Returns:
component style ID

setStyleId

public void setStyleId(java.lang.String id)
Sets custom component style ID. If style for such custom ID is not found in skin descriptor default style will be used for that component. This method forces component to instantly use component style with the specified ID.

Specified by:
setStyleId in interface Styleable
Parameters:
id - custom component style ID

getWebUI

public WebStyledLabelUI getWebUI()
Returns Web-UI applied to this class.

Returns:
Web-UI applied to this class

updateUI

public void updateUI()

Overrides:
updateUI in class javax.swing.JLabel

getUIClassID

public java.lang.String getUIClassID()

Overrides:
getUIClassID in class javax.swing.JLabel

onMousePress

public java.awt.event.MouseAdapter onMousePress(MouseEventRunnable runnable)
Shortcut method for mouse press event.

Specified by:
onMousePress in interface EventMethods
Parameters:
runnable - mouse event runnable
Returns:
used mouse adapter

onMousePress

public java.awt.event.MouseAdapter onMousePress(MouseButton mouseButton,
                                                MouseEventRunnable runnable)
Shortcut method for mouse press event.

Specified by:
onMousePress in interface EventMethods
Parameters:
mouseButton - mouse button filter
runnable - mouse event runnable
Returns:
used mouse adapter

onMouseEnter

public java.awt.event.MouseAdapter onMouseEnter(MouseEventRunnable runnable)
Shortcut method for mouse enter event.

Specified by:
onMouseEnter in interface EventMethods
Parameters:
runnable - mouse event runnable
Returns:
used mouse adapter

onMouseExit

public java.awt.event.MouseAdapter onMouseExit(MouseEventRunnable runnable)
Shortcut method for mouse exit event.

Specified by:
onMouseExit in interface EventMethods
Parameters:
runnable - mouse event runnable
Returns:
used mouse adapter

onMouseDrag

public java.awt.event.MouseAdapter onMouseDrag(MouseEventRunnable runnable)
Shortcut method for mouse drag event.

Specified by:
onMouseDrag in interface EventMethods
Parameters:
runnable - mouse event runnable
Returns:
used mouse adapter

onMouseDrag

public java.awt.event.MouseAdapter onMouseDrag(MouseButton mouseButton,
                                               MouseEventRunnable runnable)
Shortcut method for mouse drag event.

Specified by:
onMouseDrag in interface EventMethods
Parameters:
mouseButton - mouse button filter
runnable - mouse event runnable
Returns:
used mouse adapter

onMouseClick

public java.awt.event.MouseAdapter onMouseClick(MouseEventRunnable runnable)
Shortcut method for mouse click event.

Specified by:
onMouseClick in interface EventMethods
Parameters:
runnable - mouse event runnable
Returns:
used mouse adapter

onMouseClick

public java.awt.event.MouseAdapter onMouseClick(MouseButton mouseButton,
                                                MouseEventRunnable runnable)
Shortcut method for mouse click event.

Specified by:
onMouseClick in interface EventMethods
Parameters:
mouseButton - mouse button filter
runnable - mouse event runnable
Returns:
used mouse adapter

onDoubleClick

public java.awt.event.MouseAdapter onDoubleClick(MouseEventRunnable runnable)
Shortcut method for double-click mouse event.

Specified by:
onDoubleClick in interface EventMethods
Parameters:
runnable - mouse event runnable
Returns:
used mouse adapter

onMenuTrigger

public java.awt.event.MouseAdapter onMenuTrigger(MouseEventRunnable runnable)
Shortcut method for mouse event triggering popup menu.

Specified by:
onMenuTrigger in interface EventMethods
Parameters:
runnable - mouse event runnable
Returns:
used mouse adapter

onKeyType

public java.awt.event.KeyAdapter onKeyType(KeyEventRunnable runnable)
Shortcut method for key type event.

Specified by:
onKeyType in interface EventMethods
Parameters:
runnable - key event runnable
Returns:
used key adapter

onKeyType

public java.awt.event.KeyAdapter onKeyType(HotkeyData hotkey,
                                           KeyEventRunnable runnable)
Shortcut method for key type event.

Specified by:
onKeyType in interface EventMethods
Parameters:
hotkey - hotkey filter
runnable - key event runnable
Returns:
used key adapter

onKeyPress

public java.awt.event.KeyAdapter onKeyPress(KeyEventRunnable runnable)
Shortcut method for key press event.

Specified by:
onKeyPress in interface EventMethods
Parameters:
runnable - key event runnable
Returns:
used key adapter

onKeyPress

public java.awt.event.KeyAdapter onKeyPress(HotkeyData hotkey,
                                            KeyEventRunnable runnable)
Shortcut method for key press event.

Specified by:
onKeyPress in interface EventMethods
Parameters:
hotkey - hotkey filter
runnable - key event runnable
Returns:
used key adapter

onKeyRelease

public java.awt.event.KeyAdapter onKeyRelease(KeyEventRunnable runnable)
Shortcut method for key release event.

Specified by:
onKeyRelease in interface EventMethods
Parameters:
runnable - key event runnable
Returns:
used key adapter

onKeyRelease

public java.awt.event.KeyAdapter onKeyRelease(HotkeyData hotkey,
                                              KeyEventRunnable runnable)
Shortcut method for key release event.

Specified by:
onKeyRelease in interface EventMethods
Parameters:
hotkey - hotkey filter
runnable - key event runnable
Returns:
used key adapter

onFocusGain

public java.awt.event.FocusAdapter onFocusGain(FocusEventRunnable runnable)
Shortcut method for focus gain event.

Specified by:
onFocusGain in interface EventMethods
Parameters:
runnable - focus event runnable
Returns:
used focus adapter

onFocusLoss

public java.awt.event.FocusAdapter onFocusLoss(FocusEventRunnable runnable)
Shortcut method for focus loss event.

Specified by:
onFocusLoss in interface EventMethods
Parameters:
runnable - focus event runnable
Returns:
used focus adapter

setToolTip

public WebCustomTooltip setToolTip(java.lang.String tooltip)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
tooltip - tooltip text or language key
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(javax.swing.Icon icon,
                                   java.lang.String tooltip)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
icon - tooltip icon
tooltip - tooltip text or language key
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(java.lang.String tooltip,
                                   TooltipWay tooltipWay)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
tooltip - tooltip text or language key
tooltipWay - tooltip display direction
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(javax.swing.Icon icon,
                                   java.lang.String tooltip,
                                   TooltipWay tooltipWay)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
icon - tooltip icon
tooltip - tooltip text or language key
tooltipWay - tooltip display direction
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(java.lang.String tooltip,
                                   TooltipWay tooltipWay,
                                   int delay)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
tooltip - tooltip text or language key
tooltipWay - tooltip display direction
delay - tooltip display delay
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(javax.swing.Icon icon,
                                   java.lang.String tooltip,
                                   TooltipWay tooltipWay,
                                   int delay)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
icon - tooltip icon
tooltip - tooltip text or language key
tooltipWay - tooltip display direction
delay - tooltip display delay
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(javax.swing.JComponent tooltip)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
tooltip - custom tooltip component
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(javax.swing.JComponent tooltip,
                                   int delay)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
tooltip - custom tooltip component
delay - tooltip display delay
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(javax.swing.JComponent tooltip,
                                   TooltipWay tooltipWay)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
tooltip - custom tooltip component
tooltipWay - tooltip display direction
Returns:
created custom WebLaF tooltip

setToolTip

public WebCustomTooltip setToolTip(javax.swing.JComponent tooltip,
                                   TooltipWay tooltipWay,
                                   int delay)
Sets single custom WebLaF tooltip into the component.

Specified by:
setToolTip in interface ToolTipMethods
Parameters:
tooltip - custom tooltip component
tooltipWay - tooltip display direction
delay - tooltip display delay
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(java.lang.String tooltip)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
tooltip - tooltip text or language key
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(javax.swing.Icon icon,
                                   java.lang.String tooltip)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
icon - tooltip icon
tooltip - tooltip text or language key
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(java.lang.String tooltip,
                                   TooltipWay tooltipWay)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
tooltip - tooltip text or language key
tooltipWay - tooltip display direction
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(javax.swing.Icon icon,
                                   java.lang.String tooltip,
                                   TooltipWay tooltipWay)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
icon - tooltip icon
tooltip - tooltip text or language key
tooltipWay - tooltip display direction
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(java.lang.String tooltip,
                                   TooltipWay tooltipWay,
                                   int delay)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
tooltip - tooltip text or language key
tooltipWay - tooltip display direction
delay - tooltip display delay
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(javax.swing.Icon icon,
                                   java.lang.String tooltip,
                                   TooltipWay tooltipWay,
                                   int delay)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
icon - tooltip icon
tooltip - tooltip text or language key
tooltipWay - tooltip display direction
delay - tooltip display delay
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(javax.swing.JComponent tooltip)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
tooltip - custom tooltip component
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(javax.swing.JComponent tooltip,
                                   int delay)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
tooltip - custom tooltip component
delay - tooltip display delay
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(javax.swing.JComponent tooltip,
                                   TooltipWay tooltipWay)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
tooltip - custom tooltip component
tooltipWay - tooltip display direction
Returns:
created custom WebLaF tooltip

addToolTip

public WebCustomTooltip addToolTip(javax.swing.JComponent tooltip,
                                   TooltipWay tooltipWay,
                                   int delay)
Adds custom WebLaF tooltip to the component.

Specified by:
addToolTip in interface ToolTipMethods
Parameters:
tooltip - custom tooltip component
tooltipWay - tooltip display direction
delay - tooltip display delay
Returns:
created custom WebLaF tooltip

removeToolTip

public void removeToolTip(WebCustomTooltip tooltip)
Removes specified custom WebLaF tooltip from the component.

Specified by:
removeToolTip in interface ToolTipMethods
Parameters:
tooltip - custom WebLaF tooltip to remove

removeToolTips

public void removeToolTips()
Removes all custom WebLaF tooltips from the component.

Specified by:
removeToolTips in interface ToolTipMethods

removeToolTips

public void removeToolTips(WebCustomTooltip... tooltips)
Removes specified custom WebLaF tooltips from the component.

Specified by:
removeToolTips in interface ToolTipMethods
Parameters:
tooltips - custom WebLaF tooltips to remove

removeToolTips

public void removeToolTips(java.util.List<WebCustomTooltip> tooltips)
Removes specified custom WebLaF tooltips from the component.

Specified by:
removeToolTips in interface ToolTipMethods
Parameters:
tooltips - custom WebLaF tooltips to remove

getMinimumSize

public java.awt.Dimension getMinimumSize()

Overrides:
getMinimumSize in class javax.swing.JComponent

getMaximumSize

public java.awt.Dimension getMaximumSize()

Overrides:
getMaximumSize in class javax.swing.JComponent

setPreferredWidth

public void setPreferredWidth(int width)
Sets preferred width of the label.

Parameters:
width - new preferred width of the label

getPreferredWidth

public int getPreferredWidth()
Gets the preferred width of the styled label.

Returns:
the preferred width

setLanguage

public void setLanguage(java.lang.String key,
                        java.lang.Object... data)
Registers component in LanguageManager under specified key and with specified formatting data.

Specified by:
setLanguage in interface LanguageMethods
Parameters:
key - language record key
data - formatting data

updateLanguage

public void updateLanguage(java.lang.Object... data)
Updates component language and formatting data.

Specified by:
updateLanguage in interface LanguageMethods
Parameters:
data - new formatting data

updateLanguage

public void updateLanguage(java.lang.String key,
                           java.lang.Object... data)
Changes component language key and updates its language and formatting data.

Specified by:
updateLanguage in interface LanguageMethods
Parameters:
key - new language key
data - new formatting data

removeLanguage

public void removeLanguage()
Unregisters component from LanguageManager.

Specified by:
removeLanguage in interface LanguageMethods

isLanguageSet

public boolean isLanguageSet()
Returns whether this component registered in LanguageManager or not.

Specified by:
isLanguageSet in interface LanguageMethods
Returns:
true if component is registered in LanguageManager, false otherwise

setLanguageUpdater

public void setLanguageUpdater(LanguageUpdater updater)
Registers custom language updater for this component.

Specified by:
setLanguageUpdater in interface LanguageMethods
Parameters:
updater - component language updater

removeLanguageUpdater

public void removeLanguageUpdater()
Unregisters any custom language updater set for this component.

Specified by:
removeLanguageUpdater in interface LanguageMethods

setPlainFont

public WebStyledLabel setPlainFont()
Sets plain font for the component.

Specified by:
setPlainFont in interface FontMethods<WebStyledLabel>
Returns:
modified component

setPlainFont

public WebStyledLabel setPlainFont(boolean apply)
Sets plain font for the component.

Specified by:
setPlainFont in interface FontMethods<WebStyledLabel>
Parameters:
apply - whether to apply font changes or not
Returns:
modified component

isPlainFont

public boolean isPlainFont()
Returns whether component font is plain or not.

Specified by:
isPlainFont in interface FontMethods<WebStyledLabel>
Returns:
true if component font is plain, false otherwise

setBoldFont

public WebStyledLabel setBoldFont()
Sets bold font for the component.

Specified by:
setBoldFont in interface FontMethods<WebStyledLabel>
Returns:
modified component

setBoldFont

public WebStyledLabel setBoldFont(boolean apply)
Sets bold font for the component.

Specified by:
setBoldFont in interface FontMethods<WebStyledLabel>
Parameters:
apply - whether to apply font changes or not
Returns:
modified component

isBoldFont

public boolean isBoldFont()
Returns whether component font is bold or not.

Specified by:
isBoldFont in interface FontMethods<WebStyledLabel>
Returns:
true if component font is bold, false otherwise

setItalicFont

public WebStyledLabel setItalicFont()
Sets italic or plain font for the component.

Specified by:
setItalicFont in interface FontMethods<WebStyledLabel>
Returns:
modified component

setItalicFont

public WebStyledLabel setItalicFont(boolean apply)
Sets italic or plain font for the component.

Specified by:
setItalicFont in interface FontMethods<WebStyledLabel>
Parameters:
apply - whether to apply font changes or not
Returns:
modified component

isItalicFont

public boolean isItalicFont()
Returns whether component font is italic or not.

Specified by:
isItalicFont in interface FontMethods<WebStyledLabel>
Returns:
true if component font is italic, false otherwise

setFontStyle

public WebStyledLabel setFontStyle(boolean bold,
                                   boolean italic)
Sets component font style.

Specified by:
setFontStyle in interface FontMethods<WebStyledLabel>
Parameters:
bold - whether should set bold font or not
italic - whether should set italic font or not
Returns:
modified component

setFontStyle

public WebStyledLabel setFontStyle(int style)
Sets component font style.

Specified by:
setFontStyle in interface FontMethods<WebStyledLabel>
Parameters:
style - new style
Returns:
modified component

setFontSize

public WebStyledLabel setFontSize(int fontSize)
Sets component font size.

Specified by:
setFontSize in interface FontMethods<WebStyledLabel>
Parameters:
fontSize - font size
Returns:
modified component

changeFontSize

public WebStyledLabel changeFontSize(int change)
Changes font size of the specified component.

Specified by:
changeFontSize in interface FontMethods<WebStyledLabel>
Parameters:
change - font size change amount
Returns:
modified component

getFontSize

public int getFontSize()
Returns component font size.

Specified by:
getFontSize in interface FontMethods<WebStyledLabel>
Returns:
component font size

setFontSizeAndStyle

public WebStyledLabel setFontSizeAndStyle(int fontSize,
                                          boolean bold,
                                          boolean italic)
Sets font size and style for the specified component.

Specified by:
setFontSizeAndStyle in interface FontMethods<WebStyledLabel>
Parameters:
fontSize - new font size
bold - whether should set bold font or not
italic - whether should set italic font or not
Returns:
modified component

setFontSizeAndStyle

public WebStyledLabel setFontSizeAndStyle(int fontSize,
                                          int style)
Sets font size and style for the specified component.

Specified by:
setFontSizeAndStyle in interface FontMethods<WebStyledLabel>
Parameters:
fontSize - new font size
style - new style
Returns:
modified component

setFontName

public WebStyledLabel setFontName(java.lang.String fontName)
Sets component font name.

Specified by:
setFontName in interface FontMethods<WebStyledLabel>
Parameters:
fontName - new font name
Returns:
modified component

getFontName

public java.lang.String getFontName()
Returns component font name.

Specified by:
getFontName in interface FontMethods<WebStyledLabel>
Returns:
component font name