public class WebPopupMenuPainter<E extends javax.swing.JPopupMenu> extends WebPopupPainter<E> implements PopupMenuPainter<E>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
fixLocation |
protected int |
menuSpacing
Style settings.
|
protected PopupMenuType |
popupMenuType |
protected PopupMenuWay |
popupMenuWay
Runtime variables.
|
borderColor, cornerAlignment, cornerSide, cornerWidth, DROPDOWN_BORDER_SHAPE, DROPDOWN_FILL_SHAPE, popupStyle, relativeCorner, round, shadeTransparency, shadeWidth, SIMPLE_BORDER_SHAPE, SIMPLE_FILL_SHAPE, transparency, transparentlisteners, margin, opaque, preferredSize| Constructor and Description |
|---|
WebPopupMenuPainter() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
createDropdownCornerShape, createDropdownShape, createSimpleShape, getBackgroundColor, getBorderColor, getBorderShape, getCachedShapeSettings, getComponentBackground, getCornerAlignment, getCornerSide, getCornerWidth, getCurrentShadeTransparency, getDropdownCornerShape, getPopupStyle, getRelativeCorner, getRound, getShadeBounds, getShadeTransparency, getShadeWidth, getSideWidth, getTransparency, isOpaque, isTransparent, paint, paintBackground, paintBorder, paintShade, paintSimplePopup, provideShape, setBorderColor, setCornerAlignment, setCornerSide, setCornerWidth, setPopupStyle, setRelativeCorner, setRound, setShadeTransparency, setShadeWidth, setTransparency, setTransparentaddPainterListener, getPreferredSize, install, p, removePainterListener, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, uninstall, updateAll, updateOpacityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetTransparentaddPainterListener, getPreferredSize, install, isOpaque, paint, removePainterListener, uninstallprotected int menuSpacing
protected boolean fixLocation
protected PopupMenuWay popupMenuWay
protected PopupMenuType popupMenuType
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)
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