Class SpinInputPart
- java.lang.Object
-
- net.sf.okapi.common.uidescription.AbstractPart
-
- net.sf.okapi.common.uidescription.SpinInputPart
-
- All Implemented Interfaces:
IParameterDescriptor
public class SpinInputPart extends AbstractPart
UI part descriptor for a spin-like input field. This UI part supports the following types: Integer.
-
-
Field Summary
-
Fields inherited from class net.sf.okapi.common.uidescription.AbstractPart
container, enabledOnSelection, labelFlushed, labelNextToInput, masterPart, paramDescriptor, vertical, withLabel
-
-
Constructor Summary
Constructors Constructor Description SpinInputPart(ParameterDescriptor paramDescriptor)Creates a new TextInputPart object with a given parameter descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckType()Checks the types supported by this UI part.intgetMaximumValue()Gets the maximum value allowed (for integer input).intgetMinimumValue()Gets the minimum value allowed (for integer input).voidsetRange(int minimumValue, int maximumValue)Sets the minimum and maximum values allowed.-
Methods inherited from class net.sf.okapi.common.uidescription.AbstractPart
getContainer, getDisplayName, getMasterPart, getName, getParent, getReadMethod, getShortDescription, getType, getWriteMethod, isEnabledOnSelection, isLabelFlushed, isLabelNextToInput, isVertical, isWithLabel, setContainer, setDisplayName, setLabelFlushed, setLabelNextToInput, setMasterPart, setShortDescription, setVertical, setWithLabel
-
-
-
-
Constructor Detail
-
SpinInputPart
public SpinInputPart(ParameterDescriptor paramDescriptor)
Creates a new TextInputPart object with a given parameter descriptor.- Parameters:
paramDescriptor- the parameter descriptor for this UI part.
-
-
Method Detail
-
checkType
protected void checkType()
Description copied from class:AbstractPartChecks the types supported by this UI part.- Overrides:
checkTypein classAbstractPart
-
getMinimumValue
public int getMinimumValue()
Gets the minimum value allowed (for integer input).- Returns:
- the minimum value allowed.
-
getMaximumValue
public int getMaximumValue()
Gets the maximum value allowed (for integer input).- Returns:
- the maximum value allowed.
-
setRange
public void setRange(int minimumValue, int maximumValue)Sets the minimum and maximum values allowed. If the values are lesser or greater than the minimum and maximum values allowed by an Integer, they are reset to those values. If the maximum is less than the minimum it is reset to the minimum.- Parameters:
minimumValue- the minimum value allowed.maximumValue- the maximum value allowed.
-
-