@Deprecated public class NPDecorationPainter<E extends javax.swing.JComponent,U extends javax.swing.plaf.ComponentUI> extends AbstractPainter<E,U>
WebDecorationPainter but this one is based on 9-patch icons.
It uses 9-patch icons for normal and focused component states and its side separators.com.alee.managers.style.skin.web.WebDecorationPainter| Modifier and Type | Field and Description |
|---|---|
protected NinePatchIcon |
backgroundIcon
Deprecated.
Used 9-patch icons.
|
protected NinePatchIcon |
bottomSeparatorIcon
Deprecated.
|
protected boolean |
detectSideByContentPatches
Deprecated.
|
protected boolean |
focused
Deprecated.
|
protected NinePatchIcon |
focusedBackgroundIcon
Deprecated.
|
protected FocusTracker |
focusTracker
Deprecated.
Runtime variables.
|
protected int |
hiddenSideSpacing
Deprecated.
|
protected NinePatchIcon |
leftSeparatorIcon
Deprecated.
|
protected boolean |
paintBottom
Deprecated.
|
protected boolean |
paintBottomLine
Deprecated.
|
protected boolean |
paintFocus
Deprecated.
|
protected boolean |
paintLeft
Deprecated.
|
protected boolean |
paintLeftLine
Deprecated.
|
protected boolean |
paintRight
Deprecated.
|
protected boolean |
paintRightLine
Deprecated.
|
protected boolean |
paintTop
Deprecated.
|
protected boolean |
paintTopLine
Deprecated.
|
protected NinePatchIcon |
rightSeparatorIcon
Deprecated.
|
protected NinePatchIcon |
separatorIcon
Deprecated.
|
protected NinePatchIcon |
topSeparatorIcon
Deprecated.
|
protected boolean |
undecorated
Deprecated.
Style settings.
|
component, listeners, ltr, propertyChangeListener, ui| Constructor and Description |
|---|
NPDecorationPainter()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.Rectangle |
getBackgroundBounds(NinePatchIcon icon,
java.awt.Rectangle b,
E c)
Deprecated.
Returns bounds within which background 9-patch icon should be painted.
|
NinePatchIcon |
getBackgroundIcon()
Deprecated.
Returns background 9-patch icon.
|
java.awt.Insets |
getBorders()
Deprecated.
Returns borders required for visual data provided by this painter.
|
NinePatchIcon |
getBottomSeparatorIcon()
Deprecated.
Returns bottom side separator 9-patch icon.
|
protected NinePatchIcon |
getCurrentBackgroundIcon()
Deprecated.
Returns background 9-patch icon that should be painted right now.
|
protected NinePatchIcon |
getCurrentBottomSeparatorIcon()
Deprecated.
Returns bottom separator 9-patch icon that should be painted according to provided icons.
|
protected NinePatchIcon |
getCurrentLeftSeparatorIcon()
Deprecated.
Returns left separator 9-patch icon that should be painted according to provided icons.
|
protected NinePatchIcon |
getCurrentRightSeparatorIcon()
Deprecated.
Returns right separator 9-patch icon that should be painted according to provided icons.
|
protected NinePatchIcon |
getCurrentTopSeparatorIcon()
Deprecated.
Returns top separator 9-patch icon that should be painted according to provided icons.
|
NinePatchIcon |
getFocusedBackgroundIcon()
Deprecated.
Returns focused background 9-patch icon.
|
int |
getHiddenSideSpacing()
Deprecated.
Returns additional spacing provided for side with hidden decoration.
|
NinePatchIcon |
getLeftSeparatorIcon()
Deprecated.
Returns left side separator 9-patch icon.
|
NinePatchIcon |
getRightSeparatorIcon()
Deprecated.
Returns right side separator 9-patch icon.
|
NinePatchIcon |
getSeparatorIcon()
Deprecated.
Returns default side separator 9-patch icon.
|
int |
getShadeWidth()
Deprecated.
|
NinePatchIcon |
getTopSeparatorIcon()
Deprecated.
Sets top side separator 9-patch icon.
|
void |
install(E c,
U ui)
Deprecated.
Called when painter is installed onto some component.
|
protected boolean |
isAnyLineShouldBePainted()
Deprecated.
Returns whether at least one side line should be painted or not.
|
protected boolean |
isBottomLineShouldBePainted()
Deprecated.
Returns whether bottom side line should be painted or not.
|
boolean |
isDetectSideByContentPatches()
Deprecated.
Returns whether single decoration side size should be detected by content patches on the image or not.
|
protected boolean |
isLeftLineShouldBePainted()
Deprecated.
Returns whether left side line should be painted or not.
|
boolean |
isPaintBottom()
Deprecated.
Returns whether should paint bottom side or not.
|
boolean |
isPaintBottomLine()
Deprecated.
Returns whether should paint bottom side line or not.
|
boolean |
isPaintFocus()
Deprecated.
Returns whether focus should be painted or not.
|
boolean |
isPaintLeft()
Deprecated.
Returns whether should paint left side or not.
|
boolean |
isPaintLeftLine()
Deprecated.
Returns whether should paint left side line or not.
|
boolean |
isPaintRight()
Deprecated.
Returns whether should paint right side or not.
|
boolean |
isPaintRightLine()
Deprecated.
Returns whether should paint right side line or not.
|
boolean |
isPaintTop()
Deprecated.
Returns whether should paint top side or not.
|
boolean |
isPaintTopLine()
Deprecated.
Returns whether should paint top side line or not.
|
protected boolean |
isRightLineShouldBePainted()
Deprecated.
Returns whether right side line should be painted or not.
|
protected boolean |
isTopLineShouldBePainted()
Deprecated.
Returns whether top side line 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 |
setBottomSeparatorIcon(NinePatchIcon icon)
Deprecated.
Sets bottom side separator 9-patch icon.
|
void |
setDetectSideByContentPatches(boolean detectSideByContentPatches)
Deprecated.
Set whether single decoration side size should be detected by content patches on the image or not.
|
void |
setFocusedBackgroundIcon(NinePatchIcon icon)
Deprecated.
Sets focused background 9-patch icon.
|
void |
setHiddenSideSpacing(int spacing)
Deprecated.
Sets additional spacing provided for side with hidden decoration.
|
void |
setLeftSeparatorIcon(NinePatchIcon icon)
Deprecated.
Sets left side separator 9-patch icon.
|
void |
setPaintBottom(boolean bottom)
Deprecated.
|
void |
setPaintBottomLine(boolean bottom)
Deprecated.
|
void |
setPaintFocus(boolean paint)
Deprecated.
Sets whether focus should be painted or not.
|
void |
setPaintLeft(boolean left)
Deprecated.
|
void |
setPaintLeftLine(boolean left)
Deprecated.
|
void |
setPaintRight(boolean right)
Deprecated.
|
void |
setPaintRightLine(boolean right)
Deprecated.
|
void |
setPaintSideLines(boolean top,
boolean left,
boolean bottom,
boolean right)
Deprecated.
|
void |
setPaintSides(boolean top,
boolean left,
boolean bottom,
boolean right)
Deprecated.
|
void |
setPaintTop(boolean top)
Deprecated.
|
void |
setPaintTopLine(boolean top)
Deprecated.
|
void |
setRightSeparatorIcon(NinePatchIcon icon)
Deprecated.
Sets right side separator 9-patch icon.
|
void |
setSeparatorIcon(NinePatchIcon icon)
Deprecated.
Sets default side separator 9-patch icon.
|
void |
setShadeWidth(int width)
Deprecated.
|
void |
setTopSeparatorIcon(NinePatchIcon icon)
Deprecated.
Sets top side separator 9-patch icon.
|
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.
|
addPainterListener, b, borderChange, getCompleteBorder, getPreferredSize, i, i, i, installPropertyChangeListener, isOpaque, isSectionPainter, isSettingsUpdateAllowed, orientationChange, p, propertyChange, removePainterListener, repaint, repaint, repaint, revalidate, saveOrientation, uninstallPropertyChangeListener, updateAll, updateBorder, updateOpacity, updateOrientationprotected boolean undecorated
protected boolean paintFocus
protected boolean paintTop
protected boolean paintLeft
protected boolean paintBottom
protected boolean paintRight
protected boolean paintTopLine
protected boolean paintLeftLine
protected boolean paintBottomLine
protected boolean paintRightLine
protected boolean detectSideByContentPatches
protected int hiddenSideSpacing
protected NinePatchIcon backgroundIcon
protected NinePatchIcon focusedBackgroundIcon
protected NinePatchIcon separatorIcon
protected NinePatchIcon topSeparatorIcon
protected NinePatchIcon leftSeparatorIcon
protected NinePatchIcon bottomSeparatorIcon
protected NinePatchIcon rightSeparatorIcon
protected FocusTracker focusTracker
protected boolean focused
public void install(E c, U ui)
Painterinstall in interface Painter<E extends javax.swing.JComponent,U extends javax.swing.plaf.ComponentUI>install in class AbstractPainter<E extends javax.swing.JComponent,U extends javax.swing.plaf.ComponentUI>c - component this painter is being installed ontoui - component UIpublic void uninstall(E c, U ui)
Painteruninstall in interface Painter<E extends javax.swing.JComponent,U extends javax.swing.plaf.ComponentUI>uninstall in class AbstractPainter<E extends javax.swing.JComponent,U extends javax.swing.plaf.ComponentUI>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 int getShadeWidth()
public void setShadeWidth(int width)
public boolean isPaintTop()
public void setPaintTop(boolean top)
public boolean isPaintLeft()
public void setPaintLeft(boolean left)
public boolean isPaintBottom()
public void setPaintBottom(boolean bottom)
public boolean isPaintRight()
public void setPaintRight(boolean right)
public void setPaintSides(boolean top,
boolean left,
boolean bottom,
boolean right)
public boolean isPaintTopLine()
public void setPaintTopLine(boolean top)
public boolean isPaintLeftLine()
public void setPaintLeftLine(boolean left)
public boolean isPaintBottomLine()
public void setPaintBottomLine(boolean bottom)
public boolean isPaintRightLine()
public void setPaintRightLine(boolean right)
public void setPaintSideLines(boolean top,
boolean left,
boolean bottom,
boolean right)
public boolean isDetectSideByContentPatches()
public void setDetectSideByContentPatches(boolean detectSideByContentPatches)
detectSideByContentPatches - whether single decoration side size should be detected by content patches on the image or notpublic int getHiddenSideSpacing()
public void setHiddenSideSpacing(int spacing)
spacing - additional spacing provided for side with hidden decorationpublic 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 NinePatchIcon getSeparatorIcon()
public void setSeparatorIcon(NinePatchIcon icon)
icon - default side separator 9-patch iconpublic NinePatchIcon getTopSeparatorIcon()
public void setTopSeparatorIcon(NinePatchIcon icon)
icon - top side separator 9-patch iconpublic NinePatchIcon getLeftSeparatorIcon()
public void setLeftSeparatorIcon(NinePatchIcon icon)
icon - left side separator 9-patch iconpublic NinePatchIcon getBottomSeparatorIcon()
public void setBottomSeparatorIcon(NinePatchIcon icon)
icon - bottom side separator 9-patch iconpublic NinePatchIcon getRightSeparatorIcon()
public void setRightSeparatorIcon(NinePatchIcon icon)
icon - right side separator 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.JComponent,U extends javax.swing.plaf.ComponentUI>getBorders in class AbstractPainter<E extends javax.swing.JComponent,U extends javax.swing.plaf.ComponentUI>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.
g2d - graphics contextbounds - painting boundsc - painted componentui - painted component UIprotected NinePatchIcon getCurrentBackgroundIcon()
protected NinePatchIcon getCurrentTopSeparatorIcon()
protected NinePatchIcon getCurrentLeftSeparatorIcon()
protected NinePatchIcon getCurrentBottomSeparatorIcon()
protected NinePatchIcon getCurrentRightSeparatorIcon()
protected boolean isAnyLineShouldBePainted()
protected boolean isTopLineShouldBePainted()
protected boolean isLeftLineShouldBePainted()
protected boolean isBottomLineShouldBePainted()
protected boolean isRightLineShouldBePainted()
protected java.awt.Rectangle getBackgroundBounds(NinePatchIcon icon, java.awt.Rectangle b, E c)
icon - background 9-patch iconb - component boundsc - component instance