@Deprecated public class NPLabelPainter<E extends javax.swing.JLabel,U extends WebLabelUI,D extends IDecoration<E,D>> extends LabelPainter<E,U,D>
| Modifier and Type | Field and Description |
|---|---|
protected NinePatchIcon |
backgroundIcon
Deprecated.
Used 9-patch icons.
|
protected boolean |
focused
Deprecated.
|
protected NinePatchIcon |
focusedBackgroundIcon
Deprecated.
|
protected FocusTracker |
focusTracker
Deprecated.
Runtime variables.
|
protected boolean |
paintFocus
Deprecated.
|
protected boolean |
undecorated
Deprecated.
Style settings.
|
drawShade, paintIconR, paintTextR, paintViewR, rotation, shadeColor, shadeSizeancestor, DECORATION_STATES_PROPERTY, decorationCache, decorations, focusStateTracker, hierarchyTracker, hover, hoverStateTracker, neighboursTracker, statescomponent, listeners, ltr, propertyChangeListener, ui| Constructor and Description |
|---|
NPLabelPainter(NinePatchIcon backgroundIcon)
Deprecated.
Constructs 9-patch label painter using the specified background icon.
|
NPLabelPainter(NinePatchIcon backgroundIcon,
NinePatchIcon focusedBackgroundIcon)
Deprecated.
Constructs 9-patch label painter using the specified background icons.
|
| Modifier and Type | Method and Description |
|---|---|
NinePatchIcon |
getBackgroundIcon()
Deprecated.
Returns background 9-patch icon.
|
java.awt.Insets |
getBorders()
Deprecated.
Returns borders required for visual data provided by this painter.
|
protected NinePatchIcon |
getCurrentBackgroundIcon()
Deprecated.
Returns background 9-patch icon that should be painted right now.
|
NinePatchIcon |
getFocusedBackgroundIcon()
Deprecated.
Returns focused background 9-patch icon.
|
void |
install(E c,
U ui)
Deprecated.
Called when painter is installed onto some component.
|
boolean |
isPaintFocus()
Deprecated.
Returns whether focus should be painted or not.
|
boolean |
isUndecorated()
Deprecated.
Returns whether decoration should be painted or not.
|
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
U ui)
Deprecated.
Paints visual data using component graphics context.
|
void |
setBackgroundIcon(NinePatchIcon icon)
Deprecated.
Sets background 9-patch icon.
|
void |
setFocusedBackgroundIcon(NinePatchIcon icon)
Deprecated.
Sets focused background 9-patch icon.
|
void |
setPaintFocus(boolean paint)
Deprecated.
Sets whether focus should be painted or not.
|
void |
setUndecorated(boolean undecorated)
Deprecated.
Sets whether decoration should be painted or not.
|
void |
uninstall(E c,
U ui)
Deprecated.
Called when painter is installed into some component.
|
getActualRotation, getCompleteBorder, getContentSize, getPreferredSize, isHtmlText, isOpaqueUndecorated, layout, layoutCL, paintBackground, paintContent, paintDisabledText, paintEnabledText, paintHtmlText, paintIcon, paintPlainText, paintShadowText, paintText, transposeDimensionadjustBounds, asList, collectDecorationStates, getDecoration, getDecorations, getDecorationSize, getDecorationStates, getSectionPainters, installFocusListener, installHierarchyListener, installHoverListener, isDecorated, isDecorationPaintAllowed, isEnabled, isFocused, isHover, isOpaque, isOpaqueDecorated, isPlainBackgroundPaintAllowed, propertyChange, provideShape, uninstallFocusListener, uninstallHierarchyListener, uninstallHoverListener, updateDecorationState, usesState, usesStateaddPainterListener, b, borderChange, i, i, i, installPropertyChangeListener, isSectionPainter, isSettingsUpdateAllowed, orientationChange, p, removePainterListener, repaint, repaint, repaint, revalidate, saveOrientation, uninstallPropertyChangeListener, updateAll, updateBorder, updateOpacity, updateOrientationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPainterListener, getPreferredSize, isOpaque, removePainterListenerprotected boolean undecorated
protected boolean paintFocus
protected NinePatchIcon backgroundIcon
protected NinePatchIcon focusedBackgroundIcon
protected FocusTracker focusTracker
protected boolean focused
public NPLabelPainter(NinePatchIcon backgroundIcon)
backgroundIcon - background 9-patch iconpublic NPLabelPainter(NinePatchIcon backgroundIcon, NinePatchIcon focusedBackgroundIcon)
backgroundIcon - background 9-patch iconfocusedBackgroundIcon - focused background 9-patch iconpublic void install(E c, U ui)
Painterinstall in interface Painter<E extends javax.swing.JLabel,U extends WebLabelUI>install in class AbstractDecorationPainter<E extends javax.swing.JLabel,U extends WebLabelUI,D extends IDecoration<E,D>>c - component this painter is being installed ontoui - component UIpublic void uninstall(E c, U ui)
Painteruninstall in interface Painter<E extends javax.swing.JLabel,U extends WebLabelUI>uninstall in class AbstractDecorationPainter<E extends javax.swing.JLabel,U extends WebLabelUI,D extends IDecoration<E,D>>c - component this painter is being uninstalled fromui - component UIpublic boolean isUndecorated()
public void setUndecorated(boolean undecorated)
undecorated - whether decoration should be painted or notpublic boolean isPaintFocus()
public void setPaintFocus(boolean paint)
paint - whether focus should be painted or notpublic NinePatchIcon getBackgroundIcon()
public void setBackgroundIcon(NinePatchIcon icon)
icon - background 9-patch iconpublic NinePatchIcon getFocusedBackgroundIcon()
public void setFocusedBackgroundIcon(NinePatchIcon icon)
icon - focused background 9-patch iconpublic java.awt.Insets getBorders()
Painter
You may pass null in case additional borders aren't needed for this painter.
getBorders in interface Painter<E extends javax.swing.JLabel,U extends WebLabelUI>getBorders in class AbstractDecorationPainter<E extends javax.swing.JLabel,U extends WebLabelUI,D extends IDecoration<E,D>>null in case those aren't neededpublic void paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c,
U ui)
PainterIt is highly recommended to honor provided painting bounds to avoid painting issues. These bounds might be representing full component size or contain just a small portion of the component.
paint in interface Painter<E extends javax.swing.JLabel,U extends WebLabelUI>paint in class AbstractDecorationPainter<E extends javax.swing.JLabel,U extends WebLabelUI,D extends IDecoration<E,D>>g2d - graphics contextbounds - painting boundsc - painted componentui - painted component UIprotected NinePatchIcon getCurrentBackgroundIcon()