Class IntValue


public class IntValue extends AbstractValue<Integer>
Value class for Integer Value with an option for display the value as decimal or hex. The editor component uses an IntegerTextField for display and editing the value. This value supports the concept of no value which is represented by the text field being empty. If the text field is not empty, then the field only allows valid numeric values.

This class and other subclasses of AbstractValue are part of a subsystem for easily defining a set of values that can be displayed in an input dialog (ValuesMapDialog). Typically, these values are created indirectly using a GValuesMap which is then given to the constructor of the dialog. However, an alternate approach is to create the dialog without a ValuesMap and then use its ValuesMapDialog.addValue(AbstractValue) method directly.

  • Constructor Details

    • IntValue

      public IntValue(String name)
      Constructs an IntValue that displays it value in decimal
      Parameters:
      name - the name of the value
    • IntValue

      public IntValue(String name, int defaultValue)
      Constructs an IntValue with a default value that displays it value in decimal
      Parameters:
      name - the name of the value
      defaultValue - the default value
    • IntValue

      public IntValue(String name, Integer defaultValue, boolean displayAsHex)
      Constructs an IntValue with a default value.
      Parameters:
      name - the name of the value
      defaultValue - the default value
      displayAsHex - if true, the value will be displayed as hex, otherwise it will display as decimal.
  • Method Details