public class RangeArrayPropertyEditor extends PropertyEditorSupport
Examples: '1, 15, 25, 38, 55-60' is equal to '1-14, 15-24, 25-37, 38-54, 55-60' '36, 14, 1-10, 15, 49-57' is equal to '36-48, 14-14, 1-10, 15-35, 49-57'
Property editor also allows to validate whether ranges are disjoint. Validation
can be turned on/off by using setForceDisjointRanges(boolean)
. By default
validation is turned off.
Constructor and Description |
---|
RangeArrayPropertyEditor() |
Modifier and Type | Method and Description |
---|---|
String |
getAsText() |
void |
setAsText(String text) |
void |
setForceDisjointRanges(boolean forceDisjointRanges)
Set force disjoint ranges.
|
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
public void setForceDisjointRanges(boolean forceDisjointRanges)
forceDisjointRanges
- public void setAsText(String text) throws IllegalArgumentException
setAsText
in interface PropertyEditor
setAsText
in class PropertyEditorSupport
IllegalArgumentException
public String getAsText()
getAsText
in interface PropertyEditor
getAsText
in class PropertyEditorSupport
Copyright © 2013 SpringSource. All rights reserved.