Package rma.swing

Class RmaJLongField

All Implemented Interfaces:
FocusListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, DocumentListener, Scrollable, SwingConstants, Modifiable, ModifiedEventControl, UnitsComponent, EditableComponent, FormManagementListener, RmaValidComponent

public class RmaJLongField extends RmaJTextField implements UnitsComponent
extension of the JTextField to only allow Long integer type numbers
See Also:
  • Constructor Details

    • RmaJLongField

      public RmaJLongField()
    • RmaJLongField

      public RmaJLongField(long value, int columns)
  • Method Details

    • getValueUndefined

      public long getValueUndefined(long undefinedValue)
      return the value of this field. If not defined return undefinedValue. if the field has had it's value set with setValue() and hasn't modified by the user return the original setValue() value, not the displayed contents of the field.
    • getValueUndefined

      public long getValueUndefined()
      return the value of this field. If not defined return UNDEF_LONG. if the field has had it's value set with setValue() and hasn't modified by the user return the original setValue() value, not the displayed contents of the field.
    • getValue

      public long getValue()
    • getValueAsDbl

      public double getValueAsDbl()
    • getTextAsDbl

      public Double getTextAsDbl()
    • getTextAsLong

      public Long getTextAsLong()
    • setValue

      public void setValue(ParamInteger param)
    • setValue

      public void setValue(long value)
    • setValue

      public void setValue(double value)
    • createDefaultModel

      protected Document createDefaultModel()
      Description copied from class: RmaJTextField
      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 RmaJTextField
      Returns:
      the default model implementation
    • setMinValue

      public void setMinValue(long min)
    • getMinValue

      public long getMinValue()
    • setMaxValue

      public void setMaxValue(long max)
    • getMaxValue

      public long getMaxValue()
    • validateData

      protected boolean validateData(boolean showErrorMsg)
      Overrides:
      validateData in class RmaJTextField
    • getDisplayUnitsString

      public String getDisplayUnitsString(int unitSystem)
      Description copied from interface: UnitsComponent
      This method allows the retrieves the units string for a given units system
      Specified by:
      getDisplayUnitsString in interface UnitsComponent
      See Also:
    • setDisplayScaleFactor

      public void setDisplayScaleFactor(int paramId, double scaleFactor)
      Description copied from interface: UnitsComponent
      Sets a scaling factor to use when displaying the data.
      Specified by:
      setDisplayScaleFactor in interface UnitsComponent
      Parameters:
      paramId - This is the identifier of the paramater to scale. If the data is not of this type then it is ignored
      scaleFactor - This is the scaling factor *to* be multiplied to the value when it is rendered
    • setDisplayUnitsSystem

      public void setDisplayUnitsSystem(int ut)
      Description copied from interface: UnitsComponent
      Sets the current Unit System for this object
      Specified by:
      setDisplayUnitsSystem in interface UnitsComponent
    • setMaxLength

      public void setMaxLength(int length)
      Overrides:
      setMaxLength in class RmaJTextField