|
||||||||||
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> com.alee.managers.style.skin.web.WebPopupMenuPainter<E>
public class WebPopupMenuPainter<E extends javax.swing.JPopupMenu>
Base painter for JPopupMenu component. It is used as WebPopupMenuUI default styling.
Field Summary | |
---|---|
protected boolean |
fixLocation
|
protected int |
menuSpacing
Style settings. |
protected PopupMenuType |
popupMenuType
|
protected PopupMenuWay |
popupMenuWay
Runtime variables. |
Fields inherited from class com.alee.managers.style.skin.web.WebPopupPainter |
---|
borderColor, cornerAlignment, cornerSide, cornerWidth, DROPDOWN_BORDER_SHAPE, DROPDOWN_FILL_SHAPE, popupStyle, relativeCorner, round, shadeTransparency, shadeWidth, SIMPLE_BORDER_SHAPE, SIMPLE_FILL_SHAPE, transparency, transparent |
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 | |
---|---|
WebPopupMenuPainter()
|
Method Summary | |
---|---|
java.awt.Insets |
getMargin(E c)
Returns margin required for visual data provided by this painter. |
int |
getMenuSpacing()
Returns spacing between popup menus. |
boolean |
isFixLocation()
Returns whether should fix initial popup menu location or not. |
protected void |
paintDropdownCornerFill(java.awt.Graphics2D g2d,
E popupMenu,
java.awt.Dimension menuSize)
Paints dropdown-styled popup menu corner fill if menu item near it is selected. |
protected void |
paintTransparentPopup(java.awt.Graphics2D g2d,
E popupMenu)
Paints transparent popup version. |
java.awt.Point |
preparePopupMenu(E popupMenu,
java.awt.Component invoker,
int x,
int y)
Prepares popup menu to be displayed. |
void |
setFixLocation(boolean fix)
Sets whether should fix initial popup menu location or not. |
void |
setMenuSpacing(int spacing)
Sets spacing between popup menus. |
void |
setPopupMenuType(PopupMenuType type)
Sets popup menu type. |
void |
setPopupMenuWay(PopupMenuWay way)
Sets preferred popup menu display way. |
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 |
Methods inherited from interface com.alee.laf.menu.PopupMenuPainter |
---|
setTransparent |
Methods inherited from interface com.alee.extended.painter.Painter |
---|
addPainterListener, getPreferredSize, install, isOpaque, paint, removePainterListener, uninstall |
Field Detail |
---|
protected int menuSpacing
protected boolean fixLocation
protected PopupMenuWay popupMenuWay
protected PopupMenuType popupMenuType
Constructor Detail |
---|
public WebPopupMenuPainter()
Method Detail |
---|
public int getMenuSpacing()
public void setMenuSpacing(int spacing)
setMenuSpacing
in interface PopupMenuPainter<E extends javax.swing.JPopupMenu>
spacing
- spacing between popup menuspublic boolean isFixLocation()
public void setFixLocation(boolean fix)
setFixLocation
in interface PopupMenuPainter<E extends javax.swing.JPopupMenu>
fix
- whether should fix initial popup menu location or notpublic void setPopupMenuWay(PopupMenuWay way)
setPopupMenuWay
in interface PopupMenuPainter<E extends javax.swing.JPopupMenu>
way
- preferred popup menu display waypublic void setPopupMenuType(PopupMenuType type)
setPopupMenuType
in interface PopupMenuPainter<E extends javax.swing.JPopupMenu>
type
- popup menu typepublic java.awt.Insets getMargin(E c)
getMargin
in interface Painter<E extends javax.swing.JPopupMenu>
getMargin
in class WebPopupPainter<E extends javax.swing.JPopupMenu>
c
- component to process
protected void paintTransparentPopup(java.awt.Graphics2D g2d, E popupMenu)
paintTransparentPopup
in class WebPopupPainter<E extends javax.swing.JPopupMenu>
g2d
- graphics contextpopupMenu
- popup componentprotected void paintDropdownCornerFill(java.awt.Graphics2D g2d, E popupMenu, java.awt.Dimension menuSize)
g2d
- graphics contextpopupMenu
- popup menumenuSize
- menu sizepublic java.awt.Point preparePopupMenu(E popupMenu, java.awt.Component invoker, int x, int y)
preparePopupMenu
in interface PopupMenuPainter<E extends javax.swing.JPopupMenu>
popupMenu
- JPopupMenu to prepare for displayx
- screen x location actual popup is to be shown aty
- screen y location actual popup is to be shown at
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |