|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.models.RangeSegment
public class RangeSegment
A RangeSegment defines one portion of a RangeCollection object.
Creating a RangeSegment
RangeSegments can be created in the following ways:
// Specify minimum, maximum, and color values
RangeSegment segment = new RangeSegment(minimum, maximum, Color);
or
// Specify only minimum and maximum values
RangeSegment segment = new RangeSegment(minimum, maximum);
Note: If a null color is specified (or no color at all), then the default
color is java.awt.Color.white.
Usage
The minimum, maximum, and color attributes can be changed on the RangeSegment. Users should not change the minimum or maximum values of a particular RangeSegment if the RangeCollection containing that segment has certain restrictions (such as contiguous segments). This could lead to unpredictable and undesired results.
// change the minimum where num is a Number object
segment.setMinimumNumber( num );
// change the maximum where num is a Number object
segment.setMaximumNumber( num );
// change the color where col is a java.awt.Color object
segment.setColor( col );
RangeSegmentInterface,
RangeInterface,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
COLOR
Proper string to use if the user wishes to alter the "COLOR" property using property bag methods. |
protected java.lang.Number |
max
|
protected java.lang.Number |
min
|
| Fields inherited from class com.sas.collection.PropertyBag |
|---|
allPropertyBagChangedListeners, defaults, keys, NO_SUCH_ELEMENT, numProperties, pendingEventGateCount, values |
| Constructor Summary | |
|---|---|
RangeSegment(java.lang.Number minimum,
java.lang.Number maximum)
Constructor which takes a minimum and maximum. |
|
RangeSegment(java.lang.Number minimum,
java.lang.Number maximum,
java.awt.Color col)
Constructor which takes a minimum, maximum, and color. |
|
| Method Summary | |
|---|---|
java.awt.Color |
getColor()
Return the color of the range segment. |
java.lang.Number |
getMaximumNumber()
Return the maximum value of the range segment. |
java.lang.Number |
getMinimumNumber()
Return the minimum value of the range segment. |
void |
setColor(java.awt.Color newColor)
Set the color of the range segment. |
void |
setMaximumNumber(java.lang.Number newMax)
Set the maximum value of the range segment. |
void |
setMinimumNumber(java.lang.Number newMin)
Set the minimum value of the range segment. |
| Methods inherited from class com.sas.collection.PropertyBag |
|---|
addItems, addItems, addPropertyBagChangedListener, anyListeners, clone, clone, collect, containsKey, count, disableEvents, enableEvents, equals, equals, eventsEnabled, firePropertyBagChanged, firePropertyBagChanged, firingEvents, get, get, getDefaults, growPropertyBag, invalidateKeyList, listKeys, load, load, merge, merge, notifyListeners, propertyBagChanged, propertyChange, propertyIndex, remove, remove, removeAll, removePropertyBagChangedListener, resize, save, save, set, set, set, setDefaults, setProperties, setProperties, swap, swapSources, toDictionary, toProperties, toProperties, toString, validateObject |
| Methods inherited from interface com.sas.models.RangeSegmentInterface |
|---|
clone |
| Methods inherited from interface com.sas.collection.PropertyBagInterface |
|---|
merge, remove, removeAll, set, set |
| Methods inherited from interface com.sas.collection.StaticPropertyBagInterface |
|---|
containsKey, count, get, get, listKeys, toDictionary |
| Methods inherited from interface com.sas.collection.PropertyBagChangedSource |
|---|
addPropertyBagChangedListener, removePropertyBagChangedListener |
| Field Detail |
|---|
public static final java.lang.String COLOR
protected java.lang.Number min
protected java.lang.Number max
| Constructor Detail |
|---|
public RangeSegment(java.lang.Number minimum,
java.lang.Number maximum)
minimum - The minimum value of the RangeSegment.maximum - The maximum value of the RangeSegment.
public RangeSegment(java.lang.Number minimum,
java.lang.Number maximum,
java.awt.Color col)
minimum - The minimum value of the RangeSegment.maximum - The maximum value of the RangeSegment.col - The color of the RangeSegment.| Method Detail |
|---|
public java.lang.Number getMinimumNumber()
getMinimumNumber in interface RangeInterfacegetMinimumNumber in interface RangeSegmentInterfacepublic java.lang.Number getMaximumNumber()
getMaximumNumber in interface RangeInterfacegetMaximumNumber in interface RangeSegmentInterfacepublic void setMinimumNumber(java.lang.Number newMin)
setMinimumNumber in interface RangeInterfacesetMinimumNumber in interface RangeSegmentInterfacenewMin - the minimum value of the range segment.public void setMaximumNumber(java.lang.Number newMax)
setMaximumNumber in interface RangeInterfacesetMaximumNumber in interface RangeSegmentInterfacenewMax - the maximum value of the range segment.public java.awt.Color getColor()
public void setColor(java.awt.Color newColor)
Color - The new color of the range segment.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||