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, supportsCustomEditorpublic void setForceDisjointRanges(boolean forceDisjointRanges)
forceDisjointRanges - public void setAsText(String text) throws IllegalArgumentException
setAsText in interface PropertyEditorsetAsText in class PropertyEditorSupportIllegalArgumentExceptionpublic String getAsText()
getAsText in interface PropertyEditorgetAsText in class PropertyEditorSupportCopyright © 2014. All rights reserved.