Class SingleLineExpressionEditor

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.ignition.designer.scripteditor.component.SingleLineExpressionEditor
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
BindingSingleLineExpressionEditor

public class SingleLineExpressionEditor extends JPanel
A single-line code editor for editing expressions. Provides a context menu with functions and operators similar to the multi-line ExpressionEditor, but in a compact single-line format suitable for inline expression entry.
See Also:
  • Constructor Details

    • SingleLineExpressionEditor

      public SingleLineExpressionEditor(FunctionFactory functionFactory, JComponent... toolbarComponents)
      Constructor that accepts additional toolbar components.
      Parameters:
      functionFactory - The function factory for expression evaluation
      toolbarComponents - Additional components to add to the toolbar (e.g., browse buttons)
  • Method Details

    • getCodeEditor

      public com.jidesoft.editor.CodeEditor getCodeEditor()
    • enableInlineMenuDisplay

      protected void enableInlineMenuDisplay()
      Turns on context menu display when "ctrl-space" is typed in the editor.
    • preventNewLines

      protected void preventNewLines()
      Prevents new lines from being entered in the single-line editor.
    • getMenu

      protected ExpressionEditorContextMenu getMenu()
    • showMenu

      public void showMenu()
    • setExpression

      public void setExpression(@Nullable String value)
    • getExpression

      public String getExpression()
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • initContextMenu

      protected void initContextMenu()