Class ExpressionEditorContextMenu
- java.lang.Object
- 
- java.awt.Component
- 
- java.awt.Container
- 
- javax.swing.JComponent
- 
- javax.swing.JPopupMenu
- 
- com.inductiveautomation.ignition.designer.gui.ExpressionEditorContextMenu
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.awt.image.ImageObserver,- java.awt.MenuContainer,- java.io.Serializable,- javax.accessibility.Accessible,- javax.swing.MenuElement
 
 public class ExpressionEditorContextMenu extends javax.swing.JPopupMenuA right-click menu that fills in operators and functions for an expression editing text area. The main constructor builds the standard expression menu, but the menu can also be customized with various chaining builder functions.- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classExpressionEditorContextMenu.CodeEditorItemReferenceSelectionHandlerstatic classExpressionEditorContextMenu.CodeEditorItemSelectionHandlerItem selection handler that places the selected item directly into the code editorstatic interfaceExpressionEditorContextMenu.ItemSelectionHandler- 
Nested classes/interfaces inherited from class javax.swing.JPopupMenujavax.swing.JPopupMenu.AccessibleJPopupMenu, javax.swing.JPopupMenu.Separator
 - 
Nested classes/interfaces inherited from class javax.swing.JComponentjavax.swing.JComponent.AccessibleJComponent
 
- 
 - 
Field Summary- 
Fields inherited from class javax.swing.JComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
- 
 - 
Constructor SummaryConstructors Constructor Description ExpressionEditorContextMenu(FunctionFactory functionFactory, ExpressionEditorContextMenu.ItemSelectionHandler selectionHandler, javax.swing.Action... actions)Creates the default expression editing menu.ExpressionEditorContextMenu(ExpressionEditorContextMenu.ItemSelectionHandler selectionHandler)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.JMenuItemadd(javax.swing.JMenuItem menuItem)voidaddFunctions(java.lang.String id, java.lang.String displayKey, FunctionFactory factory)voidaddMenu(java.lang.String id, javax.swing.JPopupMenu menu)static ExpressionEditorContextMenucreateForCodeEditor(FunctionFactory functionFactory, com.jidesoft.editor.CodeEditor editor, javax.swing.Action... actions)Static function for creating a standard expression editing menu.javax.swing.JPopupMenugetFuncPopup()javax.swing.JPopupMenugetMenu(java.lang.String id)javax.swing.JPopupMenugetOpPopup()ExpressionEditorContextMenuseperator()ExpressionEditorContextMenuwithActions(javax.swing.Action... actions)ExpressionEditorContextMenuwithEditItems()Adds the standard cut/copy/paste items.ExpressionEditorContextMenuwithExpressionOperators()ExpressionEditorContextMenuwithFunctions(java.lang.String title, FunctionFactory functionFactory)- 
Methods inherited from class javax.swing.JPopupMenuadd, add, addMenuKeyListener, addPopupMenuListener, addSeparator, createActionChangeListener, createActionComponent, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMargin, getMenuKeyListeners, getPopupMenuListeners, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, paintBorder, paramString, processFocusEvent, processKeyEvent, processKeyEvent, processMouseEvent, remove, removeMenuKeyListener, removePopupMenuListener, setBorderPainted, setDefaultLightWeightPopupEnabled, setInvoker, setLabel, setLightWeightPopupEnabled, setLocation, setPopupSize, setPopupSize, setSelected, setSelectionModel, setUI, setVisible, show, updateUI
 - 
Methods inherited from class javax.swing.JComponentaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 - 
Methods inherited from class java.awt.Containeradd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 - 
Methods inherited from class java.awt.Componentaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
- 
 
- 
- 
- 
Constructor Detail- 
ExpressionEditorContextMenupublic ExpressionEditorContextMenu(ExpressionEditorContextMenu.ItemSelectionHandler selectionHandler) 
 - 
ExpressionEditorContextMenupublic ExpressionEditorContextMenu(FunctionFactory functionFactory, ExpressionEditorContextMenu.ItemSelectionHandler selectionHandler, javax.swing.Action... actions) Creates the default expression editing menu.
 
- 
 - 
Method Detail- 
createForCodeEditorpublic static ExpressionEditorContextMenu createForCodeEditor(FunctionFactory functionFactory, com.jidesoft.editor.CodeEditor editor, javax.swing.Action... actions) Static function for creating a standard expression editing menu.
 - 
withEditItemspublic ExpressionEditorContextMenu withEditItems() Adds the standard cut/copy/paste items. Adds a separator after them, only if additional items are added.
 - 
withExpressionOperatorspublic ExpressionEditorContextMenu withExpressionOperators() 
 - 
withFunctionspublic ExpressionEditorContextMenu withFunctions(java.lang.String title, FunctionFactory functionFactory) 
 - 
withActionspublic ExpressionEditorContextMenu withActions(javax.swing.Action... actions) 
 - 
seperatorpublic ExpressionEditorContextMenu seperator() 
 - 
addpublic javax.swing.JMenuItem add(javax.swing.JMenuItem menuItem) - Overrides:
- addin class- javax.swing.JPopupMenu
 
 - 
getOpPopuppublic javax.swing.JPopupMenu getOpPopup() 
 - 
getFuncPopuppublic javax.swing.JPopupMenu getFuncPopup() 
 - 
getMenupublic javax.swing.JPopupMenu getMenu(java.lang.String id) 
 - 
addMenupublic void addMenu(java.lang.String id, javax.swing.JPopupMenu menu)
 - 
addFunctionspublic void addFunctions(java.lang.String id, java.lang.String displayKey, FunctionFactory factory)
 
- 
 
-