|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.painter.AbstractPainter<E> com.alee.managers.style.skin.web.WebPopupPainter<E>
public class WebPopupPainter<E extends javax.swing.JComponent>
Web-styled popup painter for any type of components. It is generally used for WebPopupMenuUI default styling but might also be used in other cases. Be aware that you will have to manually setup this painter if used outside of the WebPopupMenuUI.
Field Summary | |
---|---|
protected java.awt.Color |
borderColor
|
protected int |
cornerAlignment
|
protected int |
cornerSide
|
protected int |
cornerWidth
|
protected static java.lang.String |
DROPDOWN_BORDER_SHAPE
|
protected static java.lang.String |
DROPDOWN_FILL_SHAPE
|
protected PopupStyle |
popupStyle
Style settings. |
protected int |
relativeCorner
|
protected int |
round
|
protected float |
shadeTransparency
|
protected int |
shadeWidth
|
protected static java.lang.String |
SIMPLE_BORDER_SHAPE
|
protected static java.lang.String |
SIMPLE_FILL_SHAPE
Shape cache keys. |
protected float |
transparency
|
protected boolean |
transparent
Runtime variables. |
Fields inherited from class com.alee.extended.painter.AbstractPainter |
---|
listeners, margin, opaque, preferredSize |
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 | |
---|---|
WebPopupPainter()
|
Method Summary | |
---|---|
protected java.awt.geom.GeneralPath |
createDropdownCornerShape(E popupMenu,
java.awt.Dimension menuSize,
boolean fill)
Creates and returns dropdown style corner shape. |
protected java.awt.geom.GeneralPath |
createDropdownShape(E popup,
java.awt.Dimension popupSize,
boolean fill)
Creates and returns dropdown style shape. |
protected java.awt.geom.GeneralPath |
createSimpleShape(E popup,
java.awt.Dimension popupSize,
boolean fill)
Creates and returns simple popup shape. |
protected java.awt.Color |
getBackgroundColor(E popup)
Returns popup background color. |
java.awt.Color |
getBorderColor()
Returns popup border color. |
protected java.awt.Shape |
getBorderShape(E popup,
java.awt.Dimension popupSize,
boolean fill)
Returns popup border shape. |
protected java.lang.Object[] |
getCachedShapeSettings(E popup)
Returns an array of shape settings cached along with the shape. |
protected java.awt.Color |
getComponentBackground(E popup)
Returns popup background color. |
int |
getCornerAlignment()
Returns dropdown corner alignment. |
int |
getCornerSide()
Returns dropdown style corner side. |
int |
getCornerWidth()
Returns popup dropdown style corner width. |
protected float |
getCurrentShadeTransparency()
Returns current shade transparency. |
protected java.awt.Shape |
getDropdownCornerShape(E popupMenu,
java.awt.Dimension menuSize,
boolean fill)
Returns dropdown style corner shape. |
java.awt.Insets |
getMargin(E c)
Returns margin required for visual data provided by this painter. |
PopupStyle |
getPopupStyle()
Returns popup style. |
int |
getRelativeCorner()
Returns relative dropdown corner position. |
int |
getRound()
Returns popup border corners rounding. |
protected java.awt.Rectangle |
getShadeBounds(java.awt.Dimension popupSize)
Returns popup shade bounds. |
float |
getShadeTransparency()
Returns popup shade transparency. |
int |
getShadeWidth()
Returns popup shade width. |
protected int |
getSideWidth()
Returns popup side space width. |
float |
getTransparency()
Returns popup background transparency. |
java.lang.Boolean |
isOpaque(E c)
Returns whether visual data provided by this painter is opaque or not. |
boolean |
isTransparent()
Returns whether popup is transparent or not. |
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E popup)
Paints visual data onto the component graphics. |
protected void |
paintBackground(java.awt.Graphics2D g2d,
E popup,
java.awt.Dimension popupSize)
Paints popup background fill. |
protected void |
paintBorder(java.awt.Graphics2D g2d,
E popup,
java.awt.Dimension popupSize)
Paints popup border. |
protected void |
paintShade(java.awt.Graphics2D g2d,
E popup,
java.awt.Dimension popupSize)
Paints popup shade. |
protected void |
paintSimplePopup(java.awt.Graphics2D g2d,
E popup)
Paints simple popup version. |
protected void |
paintTransparentPopup(java.awt.Graphics2D g2d,
E popup)
Paints transparent popup version. |
java.awt.Shape |
provideShape(E component,
java.awt.Rectangle bounds)
Returns painted component shape. |
void |
setBorderColor(java.awt.Color color)
Sets popup border color. |
void |
setCornerAlignment(int cornerAlignment)
Sets dropdown corner alignment. |
void |
setCornerSide(int cornerSide)
Sets dropdown style corner side. |
void |
setCornerWidth(int width)
Sets popup dropdown style corner width. |
void |
setPopupStyle(PopupStyle style)
Sets popup style. |
void |
setRelativeCorner(int relativeCorner)
Sets relative dropdown corner position. |
void |
setRound(int round)
Sets popup border corners rounding. |
void |
setShadeTransparency(float transparency)
Sets popup shade transparency. |
void |
setShadeWidth(int width)
Sets popup shade width. |
void |
setTransparency(float transparency)
Sets popup background transparency. |
void |
setTransparent(boolean transparent)
Sets whether popup is transparent or not. |
Methods inherited from class com.alee.extended.painter.AbstractPainter |
---|
addPainterListener, getPreferredSize, install, p, removePainterListener, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, uninstall, updateAll, updateOpacity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String SIMPLE_FILL_SHAPE
protected static final java.lang.String SIMPLE_BORDER_SHAPE
protected static final java.lang.String DROPDOWN_FILL_SHAPE
protected static final java.lang.String DROPDOWN_BORDER_SHAPE
protected PopupStyle popupStyle
protected java.awt.Color borderColor
protected int round
protected int shadeWidth
protected float shadeTransparency
protected int cornerWidth
protected float transparency
protected boolean transparent
protected int cornerSide
protected int relativeCorner
protected int cornerAlignment
Constructor Detail |
---|
public WebPopupPainter()
Method Detail |
---|
public PopupStyle getPopupStyle()
public void setPopupStyle(PopupStyle style)
style
- new popup stylepublic java.awt.Color getBorderColor()
public void setBorderColor(java.awt.Color color)
color
- new popup border colorpublic int getRound()
public void setRound(int round)
round
- new popup border corners roundingpublic int getShadeWidth()
public void setShadeWidth(int width)
width
- new popup shade widthpublic float getShadeTransparency()
public void setShadeTransparency(float transparency)
transparency
- new popup shade transparencypublic int getCornerWidth()
public void setCornerWidth(int width)
width
- popup dropdown style corner widthpublic float getTransparency()
public void setTransparency(float transparency)
transparency
- popup background transparencypublic boolean isTransparent()
public void setTransparent(boolean transparent)
transparent
- whether popup is transparent or notpublic int getCornerSide()
public void setCornerSide(int cornerSide)
cornerSide
- dropdown style corner sidepublic int getRelativeCorner()
public void setRelativeCorner(int relativeCorner)
relativeCorner
- relative dropdown corner positionpublic int getCornerAlignment()
public void setCornerAlignment(int cornerAlignment)
cornerAlignment
- dropdown corner alignmentpublic java.awt.Shape provideShape(E component, java.awt.Rectangle bounds)
provideShape
in interface PainterShapeProvider<E extends javax.swing.JComponent>
component
- component to processbounds
- bounds for painter visual data
public java.lang.Boolean isOpaque(E c)
isOpaque
in interface Painter<E extends javax.swing.JComponent>
isOpaque
in class AbstractPainter<E extends javax.swing.JComponent>
c
- component to process
public java.awt.Insets getMargin(E c)
getMargin
in interface Painter<E extends javax.swing.JComponent>
getMargin
in class AbstractPainter<E extends javax.swing.JComponent>
c
- component to process
public void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E popup)
paint
in interface Painter<E extends javax.swing.JComponent>
g2d
- component graphicsbounds
- bounds for painter visual datapopup
- component to processprotected void paintTransparentPopup(java.awt.Graphics2D g2d, E popup)
g2d
- graphics contextpopup
- popup componentprotected void paintSimplePopup(java.awt.Graphics2D g2d, E popup)
g2d
- graphics contextpopup
- popup componentprotected void paintShade(java.awt.Graphics2D g2d, E popup, java.awt.Dimension popupSize)
g2d
- graphics contextpopup
- popup componentpopupSize
- popup sizeprotected float getCurrentShadeTransparency()
protected void paintBackground(java.awt.Graphics2D g2d, E popup, java.awt.Dimension popupSize)
g2d
- graphics contextpopup
- popup componentpopupSize
- popup sizeprotected void paintBorder(java.awt.Graphics2D g2d, E popup, java.awt.Dimension popupSize)
g2d
- graphics contextpopup
- popup componentpopupSize
- popup sizeprotected java.awt.Color getBackgroundColor(E popup)
popup
- popup component
protected java.awt.Color getComponentBackground(E popup)
popup
- popup component
protected java.awt.Rectangle getShadeBounds(java.awt.Dimension popupSize)
popupSize
- popup size
protected java.awt.Shape getBorderShape(E popup, java.awt.Dimension popupSize, boolean fill)
popup
- popup componentpopupSize
- popup sizefill
- whether it is a fill shape or not
protected java.lang.Object[] getCachedShapeSettings(E popup)
popup
- popup component
protected java.awt.geom.GeneralPath createSimpleShape(E popup, java.awt.Dimension popupSize, boolean fill)
popup
- popup componentpopupSize
- popup sizefill
- whether it is a fill shape or not
protected java.awt.geom.GeneralPath createDropdownShape(E popup, java.awt.Dimension popupSize, boolean fill)
popup
- popup componentpopupSize
- popup sizefill
- whether it is a fill shape or not
protected java.awt.Shape getDropdownCornerShape(E popupMenu, java.awt.Dimension menuSize, boolean fill)
popupMenu
- popup menumenuSize
- menu sizefill
- whether it is a fill shape or not
protected java.awt.geom.GeneralPath createDropdownCornerShape(E popupMenu, java.awt.Dimension menuSize, boolean fill)
popupMenu
- popup menumenuSize
- menu sizefill
- whether it is a fill shape or not
protected int getSideWidth()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |