Class PopupHelper
- java.lang.Object
- 
- com.inductiveautomation.ignition.client.util.gui.popup.PopupHelper
 
- 
 public class PopupHelper extends java.lang.ObjectThis class uses a lower-level implementation of Popup than the similar JPopupMenuHelper class does. This can help when popups get nested.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.awt.InsetsDEFAULT_CLOSE_INSETS
 - 
Constructor SummaryConstructors Constructor Description PopupHelper(javax.swing.JComponent invoker, java.util.function.Supplier<javax.swing.JComponent> popupContents)PopupHelper(javax.swing.JComponent invoker, java.util.function.Supplier<javax.swing.JComponent> popupContents, boolean addCloseButton)PopupHelper(javax.swing.JComponent invoker, java.util.function.Supplier<javax.swing.JComponent> popupContents, boolean addCloseButton, java.awt.Insets closeInsets)PopupHelper(javax.swing.JComponent invoker, javax.swing.JComponent popupContents)PopupHelper(javax.swing.JComponent invoker, javax.swing.JComponent popupContents, boolean addCloseButton, java.awt.Insets closeInsets)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind()Adds mouse handling to the invoking component to show the popup.voiddoTogglePopup(java.awt.event.MouseEvent e)Toggles popup visibilityjava.lang.RunnablegetCloseListener()PopupLocationgetLocation()PopupTriggergetTrigger()voidhidePopup()protected javax.swing.JComponentinitializeContentPanel(javax.swing.JComponent content)booleanisAcceptInputFocus()booleanisShowing()voidsetAcceptInputFocus(boolean acceptInputFocus)voidsetCloseListener(java.lang.Runnable closeListener)Set a runnable to be called when the popup is closed.voidsetInvoker(javax.swing.JComponent invoker)Set the invoking component.voidsetLocation(PopupLocation location)voidsetTrigger(PopupTrigger trigger)Set when the popup is show (for use with bind())protected voidshowPopup(java.awt.event.MouseEvent e)voidunbind()Removes the mouse handling added by bind()
 
- 
- 
- 
Constructor Detail- 
PopupHelperpublic PopupHelper(javax.swing.JComponent invoker, javax.swing.JComponent popupContents)
 - 
PopupHelperpublic PopupHelper(javax.swing.JComponent invoker, javax.swing.JComponent popupContents, boolean addCloseButton, java.awt.Insets closeInsets)
 - 
PopupHelperpublic PopupHelper(javax.swing.JComponent invoker, java.util.function.Supplier<javax.swing.JComponent> popupContents)
 - 
PopupHelperpublic PopupHelper(javax.swing.JComponent invoker, java.util.function.Supplier<javax.swing.JComponent> popupContents, boolean addCloseButton)
 - 
PopupHelperpublic PopupHelper(javax.swing.JComponent invoker, java.util.function.Supplier<javax.swing.JComponent> popupContents, boolean addCloseButton, java.awt.Insets closeInsets)
 
- 
 - 
Method Detail- 
initializeContentPanelprotected javax.swing.JComponent initializeContentPanel(javax.swing.JComponent content) 
 - 
setCloseListenerpublic void setCloseListener(java.lang.Runnable closeListener) Set a runnable to be called when the popup is closed.
 - 
getCloseListenerpublic java.lang.Runnable getCloseListener() 
 - 
setTriggerpublic void setTrigger(PopupTrigger trigger) Set when the popup is show (for use with bind())
 - 
getTriggerpublic PopupTrigger getTrigger() 
 - 
setLocationpublic void setLocation(PopupLocation location) 
 - 
getLocationpublic PopupLocation getLocation() 
 - 
isAcceptInputFocuspublic boolean isAcceptInputFocus() 
 - 
setAcceptInputFocuspublic void setAcceptInputFocus(boolean acceptInputFocus) 
 - 
setInvokerpublic void setInvoker(javax.swing.JComponent invoker) Set 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() 
 - 
doTogglePopuppublic void doTogglePopup(java.awt.event.MouseEvent e) Toggles popup visibility
 - 
hidePopuppublic void hidePopup() 
 - 
showPopupprotected void showPopup(java.awt.event.MouseEvent e) 
 
- 
 
-