Class PopupHelper
java.lang.Object
com.inductiveautomation.ignition.client.util.gui.popup.PopupHelper
This class uses a lower-level implementation of Popup than the similar JPopupMenuHelper class does. This can help
 when popups get nested.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionPopupHelper(JComponent invoker, Supplier<JComponent> popupContents) PopupHelper(JComponent invoker, Supplier<JComponent> popupContents, boolean addCloseButton) PopupHelper(JComponent invoker, Supplier<JComponent> popupContents, boolean addCloseButton, Insets closeInsets) PopupHelper(JComponent invoker, JComponent popupContents) PopupHelper(JComponent invoker, JComponent popupContents, boolean addCloseButton, Insets closeInsets) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidbind()Adds mouse handling to the invoking component to show the popup.voidToggles popup visibilityvoidprotected JComponentinitializeContentPanel(JComponent content) booleanbooleanvoidsetAcceptInputFocus(boolean acceptInputFocus) voidsetCloseListener(Runnable closeListener) Set a runnable to be called when the popup is closed.voidsetInvoker(JComponent invoker) Set the invoking component.voidsetLocation(PopupLocation location) voidsetTrigger(PopupTrigger trigger) Set when the popup is show (for use with bind())protected voidvoidunbind()Removes the mouse handling added by bind()
- 
Field Details- 
DEFAULT_CLOSE_INSETS
 
- 
- 
Constructor Details- 
PopupHelper
- 
PopupHelperpublic PopupHelper(JComponent invoker, JComponent popupContents, boolean addCloseButton, Insets closeInsets) 
- 
PopupHelper
- 
PopupHelper
- 
PopupHelperpublic PopupHelper(JComponent invoker, Supplier<JComponent> popupContents, boolean addCloseButton, Insets closeInsets) 
 
- 
- 
Method Details- 
initializeContentPanel
- 
setCloseListenerSet a runnable to be called when the popup is closed.
- 
getCloseListener
- 
setTriggerSet when the popup is show (for use with bind())
- 
getTrigger
- 
setLocation
- 
getLocation
- 
isAcceptInputFocuspublic boolean isAcceptInputFocus()
- 
setAcceptInputFocuspublic void setAcceptInputFocus(boolean acceptInputFocus) 
- 
setInvokerSet the invoking component. Shouldn't be re-set after the consructor if using the bind() method of controlling the popup. Can be used if doTogglePopup(MouseEvent) is being called directly.
- 
bindpublic void bind()Adds mouse handling to the invoking component to show the popup. Popup is shown either when the PopupTrigger matches.
- 
unbindpublic void unbind()Removes the mouse handling added by bind()
- 
isShowingpublic boolean isShowing()
- 
doTogglePopupToggles popup visibility
- 
hidePopuppublic void hidePopup()
- 
showPopup
 
-