Class TextlikeComponent

java.lang.Object
com.inductiveautomation.ignition.designer.util.TextlikeComponent
Direct Known Subclasses:
TextlikeComponent.TableTextComponent, TextlikeComponent.TextLikeCodeEditor, TextlikeComponent.TextLikeComboBox, TextlikeComponent.TextLikeScriptEditor, TextlikeComponent.TextLikeTextComponent

public abstract class TextlikeComponent extends Object
Wrapper around various components that can be modeled like a JTextComponent. Can be instantiated using the static of(component) functions.
  • Constructor Details

    • TextlikeComponent

      public TextlikeComponent()
  • Method Details

    • setText

      public abstract void setText(String text)
      Inserts text into the component. Note: usually expected to NOT replace everything, but instead insert at the current cursor position.
    • requestFocus

      public abstract void requestFocus()
    • getText

      public abstract String getText()
    • getInternalComponent

      public abstract Component getInternalComponent()
    • of

      public static TextlikeComponent of(com.jidesoft.editor.CodeEditor comp)
    • of

      public static TextlikeComponent of(com.inductiveautomation.ignition.designer.gui.tools.PythonTextArea comp)
    • of

      public static TextlikeComponent of(JTextComponent comp)
    • of

      public static TextlikeComponent of(JComboBox<?> comp)
    • of

      public static TextlikeComponent of(JTable comp, int column)
      Uses the currently selected row of the table. Will overwrite the existing text during setText(String), contrary to the description of the method. For alternate behavior, see TextLikeComponent.of(table, column, keepExistingText).
    • of

      public static TextlikeComponent of(JTable comp, int column, boolean keepExistingText)
      Uses the currently selected row of the table.
      Parameters:
      keepExistingText - If true, any text in the cell will be preserved during a setText operation. If false, the cell will be overwritten completely (contrary to the behavior described in setText(String)).