public class AdaptivePopupMenuPainter<E extends javax.swing.JPopupMenu> extends AdaptivePainter<E> implements PopupMenuPainter<E>
listeners, margin, opaque, preferredSize| Constructor and Description |
|---|
AdaptivePopupMenuPainter(Painter painter)
Constructs new AdaptiveLabelPainter for the specified painter.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
setTransparent(boolean transparent)
Sets whether popup menu is transparent or not.
|
addPainterListener, getMargin, getPainter, getPreferredSize, install, isOpaque, paint, removePainterListener, uninstallp, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, updateAll, updateOpacityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPainterListener, getMargin, getPreferredSize, install, isOpaque, paint, removePainterListener, uninstallpublic AdaptivePopupMenuPainter(Painter painter)
painter - painter to adaptpublic void setTransparent(boolean transparent)
setTransparent in interface PopupMenuPainter<E extends javax.swing.JPopupMenu>transparent - whether popup menu is transparent or notpublic void setMenuSpacing(int spacing)
setMenuSpacing in interface PopupMenuPainter<E extends javax.swing.JPopupMenu>spacing - spacing between popup menuspublic 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.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