Class NumberArgument
java.lang.Object
org.gorpipe.querydialogs.BasicBean
org.gorpipe.querydialogs.AbstractListBean
org.gorpipe.querydialogs.Argument
org.gorpipe.querydialogs.argument.NumberArgument
- All Implemented Interfaces:
Serializable,ListModel
Represents an argument that expects a numeric value.
Provides support for specifying a minimum and/or a maximum allowed value
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe property name for the argument's numeric value.Fields inherited from class org.gorpipe.querydialogs.Argument
allowedValues, defaultValue, DEFERRED_LIST, path2LoadedValues, path2LoadedValuesHeader, PROPERTY_OPERATOR, PROPERTY_VALUE, type, value -
Constructor Summary
ConstructorsConstructorDescriptionNumberArgument(NumberArgument numbArg) Constructor that copies the input number argument.NumberArgument(ArgumentDescription argDescr, Boolean optional, Object defaultValue, List<? extends Object> allowedValues, URI valuesPath, List<String> operators, Boolean advanced, Integer displayWidth, Number min, Number max, ArgumentType argType) -
Method Summary
Modifier and TypeMethodDescriptionMake a copy of the argument.getMax()intGet the minium width of a text field for the argument maximum value.getMin()intGet the minium width of a text field for the argument minimum value.intThe minium width of a text field for the argument value.protected ObjectparseValue(String val) voidvoidsetMaxTextFieldMinWidth(int maxTextFieldMinWidth) Set the minium width of a text field for the argument maximum value.voidvoidsetMinTextFieldMinWidth(int minTextFieldMinWidth) Set the minium width of a text field for the argument minimum value.voidsetNumberValue(Number value) voidvoidsetValueTextFieldMinWidth(int valueTextFieldMinWidth) Set the minium width of a text field for the argument value.Methods inherited from class org.gorpipe.querydialogs.Argument
checkAllowed, deferredValuesLoaded, getDefaultValue, getDescription, getDisplayName, getDisplayWidth, getElementAt, getName, getOperator, getOperators, getSize, getTooltip, getType, getValue, getValuesHeader, getValuesPath, hasDeferredValues, isAdvanced, isEmpty, isOptional, loadDeferredValues, setDisplayWidth, setOperator, setValue, setValuesHeader, toStringMethods inherited from class org.gorpipe.querydialogs.AbstractListBean
addListDataListener, fireContentsChanged, removeListDataListenerMethods inherited from class org.gorpipe.querydialogs.BasicBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
PROPERTY_NUMBER_VALUE
The property name for the argument's numeric value.- See Also:
-
-
Constructor Details
-
NumberArgument
public NumberArgument(ArgumentDescription argDescr, Boolean optional, Object defaultValue, List<? extends Object> allowedValues, URI valuesPath, List<String> operators, Boolean advanced, Integer displayWidth, Number min, Number max, ArgumentType argType) - Parameters:
min- - the minimum allowed valuemax- - the maximum allowed value
-
NumberArgument
Constructor that copies the input number argument.- Parameters:
numbArg- the number argument to copy
-
-
Method Details
-
getMin
-
setMin
-
getMax
-
setMax
-
setValue
-
getNumberValue
-
setNumberValue
-
parseValue
- Overrides:
parseValuein classArgument
-
getValueTextFieldMinWidth
public int getValueTextFieldMinWidth()The minium width of a text field for the argument value. Used for example if the argument belongs to a group.- Returns:
- the minium width of a text field for the argument value
-
setValueTextFieldMinWidth
public void setValueTextFieldMinWidth(int valueTextFieldMinWidth) Set the minium width of a text field for the argument value. Used for example if the argument belongs to a group.- Parameters:
valueTextFieldMinWidth- the width value to set
-
getMinTextFieldMinWidth
public int getMinTextFieldMinWidth()Get the minium width of a text field for the argument minimum value. Used for example if the argument belongs to a group.- Returns:
- the minium width of a text field for the argument minimum value
-
setMinTextFieldMinWidth
public void setMinTextFieldMinWidth(int minTextFieldMinWidth) Set the minium width of a text field for the argument minimum value. Used for example if the argument belongs to a group.- Parameters:
minTextFieldMinWidth- the width to set
-
getMaxTextFieldMinWidth
public int getMaxTextFieldMinWidth()Get the minium width of a text field for the argument maximum value. Used for example if the argument belongs to a group.- Returns:
- the minium width of a text field for the argument maximum value
-
setMaxTextFieldMinWidth
public void setMaxTextFieldMinWidth(int maxTextFieldMinWidth) Set the minium width of a text field for the argument maximum value. Used for example if the argument belongs to a group.- Parameters:
maxTextFieldMinWidth- the width to set
-
copyArgument
Description copied from class:ArgumentMake a copy of the argument.- Specified by:
copyArgumentin classArgument- Returns:
- the argument copy
-