public class PortEntryContentProvider extends BasicEntryContentProvider
PortEntry
s. Some
notes about its behavior:
setRange(int, int)
.setDefaultValue(int)
.AllowedValueType
is strictly Continuous
.Modifier and Type | Field and Description |
---|---|
static int |
MAX_PORT
The maximum allowed port.
|
static int |
MIN_PORT
The minimum allowed port.
|
static int |
MIN_PORT_PREFERRED
The preferred minimum port.
|
iComponentListener
Constructor and Description |
---|
PortEntryContentProvider()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
setAllowedValues(java.util.ArrayList<java.lang.String> allowedValues)
If possible, converts the new allowed value list into the min and max
ports, then redirects to
setRange(int, int) . |
void |
setAllowedValueType(AllowedValueType allowedValueType)
Does nothing.
|
void |
setDefaultValue(int defaultValue)
Sets the default port to the specified value.
|
void |
setDefaultValue(java.lang.String defaultValue)
Sets the default port for managed
PortEntry s. |
boolean |
setRange(int min,
int max)
Sets the range of allowed ports.
|
clone, copy, equals, getAllowedValues, getAllowedValueType, getDefaultValue, getParent, getTag, hashCode, setParent, setTag
copy, equals, getDescription, getId, getName, register, setDescription, setId, setName, unregister, update
public static final int MIN_PORT
public static final int MIN_PORT_PREFERRED
public static final int MAX_PORT
public PortEntryContentProvider()
public void setAllowedValueType(AllowedValueType allowedValueType)
PortEntry
s are strictly of the continuous type.setAllowedValueType
in interface IEntryContentProvider
setAllowedValueType
in class BasicEntryContentProvider
allowedValueType
- The allowedValueType to set.
IEntryContentProvider.setAllowedValueType(AllowedValueType
allowedValueType)
public void setAllowedValues(java.util.ArrayList<java.lang.String> allowedValues)
setRange(int, int)
. Note that the
incoming list is also rejected if it does not have exactly two elements.setAllowedValues
in interface IEntryContentProvider
setAllowedValues
in class BasicEntryContentProvider
allowedValues
- The allowedValues. Can not be null.
public boolean setRange(int min, int max)
setDefaultValue(String)
.public void setDefaultValue(java.lang.String defaultValue)
PortEntry
s. The specified value
may be outside the range as specified via setRange(int, int)
.setDefaultValue
in interface IEntryContentProvider
setDefaultValue
in class BasicEntryContentProvider
defaultValue
- The default value to set.
IEntryContentProvider.setDefaultValue(String defaultValue)
public void setDefaultValue(int defaultValue)
setDefaultValue(String)
.defaultValue
- The default port as an integer.