Package rma.swing

Class RmaJTextField

All Implemented Interfaces:
FocusListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, DocumentListener, Scrollable, SwingConstants, Modifiable, ModifiedEventControl, EditableComponent, FormManagementListener, RmaValidComponent
Direct Known Subclasses:
AbstractFileChooserField, RmaJ24HourTimeField, RmaJDateField, RmaJDecimalField, RmaJDssPathPartField, RmaJIntegerField, RmaJLongField, RmaJToggleField

See Also:
  • Field Details

    • _minMaxTable

      protected RmaJTable _minMaxTable
    • _minMaxTableCol

      protected int _minMaxTableCol
    • _statusLine

      protected JTextComponent _statusLine
    • _statusText

      protected String _statusText
    • _name

      protected String _name
    • _parentWindow

      protected Window _parentWindow
    • _modifiable

      protected boolean _modifiable
    • _trimTxt

      protected boolean _trimTxt
    • _trimTrailingWhiteSpaceTxt

      protected boolean _trimTrailingWhiteSpaceTxt
  • Constructor Details

    • RmaJTextField

      public RmaJTextField(String text, int columns)
      Constructs a new TextField initialized with the specified text and columns.
    • RmaJTextField

      public RmaJTextField(Document doc, String text, int columns)
      Constructs a new JTextField that uses the given text storage model and the given number of columns.
    • RmaJTextField

      public RmaJTextField(int columns)
      Constructs a new empty TextField with the specified number of columns.
    • RmaJTextField

      public RmaJTextField()
      Constructs a new TextField.
    • RmaJTextField

      public RmaJTextField(String text)
      Constructs a new TextField initialized with the specified text.
  • Method Details

    • removeAWTEnterKeyCompatibility

      public static void removeAWTEnterKeyCompatibility()
    • showToolTipWindow

      protected void showToolTipWindow()
    • popupMenuAction

      protected void popupMenuAction(Point pt)
    • addPopupAction

      public void addPopupAction(Action action)
    • replaceSelection

      public void replaceSelection(String content)
      Overrides:
      replaceSelection in class JTextComponent
    • setEnabled

      public void setEnabled(boolean b)
      Overrides:
      setEnabled in class JComponent
    • setEditable

      public void setEditable(boolean b)
      Overrides:
      setEditable in class JTextComponent
    • setChangeColor

      public void setChangeColor(Color changeColor)
      set the foreground color when the user changes the text.
    • setDocument

      public void setDocument(Document doc)
      Overrides:
      setDocument in class JTextField
    • changedUpdate

      public void changedUpdate(DocumentEvent e)
      Specified by:
      changedUpdate in interface DocumentListener
    • insertUpdate

      public void insertUpdate(DocumentEvent e)
      Specified by:
      insertUpdate in interface DocumentListener
    • removeUpdate

      public void removeUpdate(DocumentEvent e)
      Specified by:
      removeUpdate in interface DocumentListener
    • setEmptyOk

      public void setEmptyOk(boolean b)
    • isEmptyOk

      public boolean isEmptyOk()
    • errorMsg

      public void errorMsg(String msg)
    • displayMsg

      protected void displayMsg(String msg)
      Parameters:
      msg -
    • displayMsgInQueue

      protected boolean displayMsgInQueue()
      Returns:
    • setDisplayMsgInQueue

      public void setDisplayMsgInQueue(boolean displayInQueue)
    • takeFocus

      public void takeFocus()
      allows the text field to take the focus back while within the focusLost() method.
    • isValid

      public boolean isValid(boolean showErr)
      return whether this component has valid data
      Specified by:
      isValid in interface RmaValidComponent
    • focusGained

      public void focusGained(FocusEvent e)
      Invoked when a this component gains the keyboard focus.
      Specified by:
      focusGained in interface FocusListener
    • focusLost

      public void focusLost(FocusEvent e)
      Invoked when this component loses the keyboard focus.
      Specified by:
      focusLost in interface FocusListener
    • setTrimWhiteSpace

      public void setTrimWhiteSpace(boolean b)
    • setTrimTrailingWhiteSpace

      public void setTrimTrailingWhiteSpace(boolean b)
    • setShowErrorMsg

      public void setShowErrorMsg(boolean b)
    • validateData

      protected boolean validateData(boolean showErrorMsg)
    • setMinMaxTable

      public void setMinMaxTable(RmaJTable tbl, int col)
    • setStatusLineField

      public void setStatusLineField(JTextComponent statusLine, String statusText)
      setup a status line field so when the mouse enters this field some status info text is displayed in the statusLine field. if statusLine is null then remove the mouselistener
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Specified by:
      mouseDragged in interface MouseMotionListener
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      Specified by:
      mouseMoved in interface MouseMotionListener
    • getName

      public String getName()
      Overrides:
      getName in class Component
    • setName

      public void setName(String name)
      Overrides:
      setName in class Component
    • getToolTipText

      public String getToolTipText(MouseEvent e)
      Overrides:
      getToolTipText in class JTextComponent
    • getToolTipText

      public String getToolTipText()
      Overrides:
      getToolTipText in class JComponent
    • fixToolTip

      protected String fixToolTip(String superToolTip)
    • clearPerformed

      public void clearPerformed()
      Called when the parent form calls clear(). Part of the Form management listener interface
      Specified by:
      clearPerformed in interface FormManagementListener
    • getText

      public String getText()
      Overrides:
      getText in class JTextComponent
    • isModified

      public boolean isModified()
      Specified by:
      isModified in interface Modifiable
    • setModified

      public void setModified(boolean b)
      Specified by:
      setModified in interface Modifiable
    • forwardModifiedEvents

      public boolean forwardModifiedEvents()
    • getForwardModifiedEvents

      public boolean getForwardModifiedEvents()
      Specified by:
      getForwardModifiedEvents in interface ModifiedEventControl
    • setFowardModifiedEvents

      public void setFowardModifiedEvents(boolean b)
      set whether this text field should forward modified events to it parent. by default it forwards the events.
      Specified by:
      setFowardModifiedEvents in interface ModifiedEventControl
      Parameters:
      b -
    • isCursorKey

      public static final boolean isCursorKey(int keyCode)
      final because this gets checked for every keystroke
    • setIsEditable

      public void setIsEditable(boolean b)
      Specified by:
      setIsEditable in interface EditableComponent
    • setModifiable

      public void setModifiable(boolean b)
    • setMaxLength

      public void setMaxLength(int length)
    • getMaxLength

      public int getMaxLength()
    • setUppercaseOnly

      public void setUppercaseOnly(boolean upperOnly)
    • setLowercaseOnly

      public void setLowercaseOnly(boolean lowerOnly)
    • setIgnoreModifiedEvents

      public void setIgnoreModifiedEvents(boolean ignore)
      Specified by:
      setIgnoreModifiedEvents in interface ModifiedEventControl
    • isIgnoringModifiedEvents

      public boolean isIgnoringModifiedEvents()
    • getIgnoreModifiedEvents

      public boolean getIgnoreModifiedEvents()
      Specified by:
      getIgnoreModifiedEvents in interface ModifiedEventControl
    • createDefaultModel

      protected Document createDefaultModel()
      Creates the default implementation of the model to be used at construction if one isn't explicitly given. An instance of RMADocument is returned.
      Overrides:
      createDefaultModel in class JTextField
      Returns:
      the default model implementation