|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmain.DisplayRanges
public class DisplayRanges
The DisplayRanges
class contains an arbitrary number of ranges
that specify how nodes and edges are drawn on the map. The ranges specify
boundary values that define a numerical range. They can also specify how to
draw invalid map components and map components that don't fit into any of the
other ranges.
Field Summary | |
---|---|
private java.util.ArrayList<Range> |
ranges
|
Constructor Summary | |
---|---|
DisplayRanges()
Creates a new set of ranges, which is initially empty. |
Method Summary | |
---|---|
void |
addRange(double low,
double high,
java.lang.Object value)
Adds a new standard range with its associated value Object . |
void |
addRange(Range range)
Adds the specified range to the list of ranges. |
java.util.ArrayList<Range> |
getRanges()
|
java.lang.Object |
getValue(java.lang.Double weight)
Returns the value that corresponds to the range in which the argument falls. |
java.util.Iterator<Range> |
iterator()
Returns an iterator over the ranges. |
private void |
removeElseRange()
|
private void |
removeInvalidRange()
|
boolean |
removeRange(Range range)
Removes the range that is identical to the argument range. |
void |
setElseValue(java.lang.Object value)
Sets the value associated with valid components that do not fit into a standard range. |
void |
setInvalidValue(java.lang.Object value)
Sets the value associated with invalid map components. |
java.lang.String |
toString()
Returns a string representation of this DisplayRanges . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<Range> ranges
Constructor Detail |
---|
public DisplayRanges()
Method Detail |
---|
public void addRange(double low, double high, java.lang.Object value)
Object
.
low
- a double
that defines the lower boundary of the
range. Weights equal to this parameter are considered to be in
the range.high
- a double
that defines the upper boundary of the
range. Weights equal to this parameter are not considered to
be in the range.value
- the Object
that specifies how components in
this range should be drawnpublic void addRange(Range range)
range
- the Range
to addpublic void setInvalidValue(java.lang.Object value)
value
- an Object
public void setElseValue(java.lang.Object value)
value
- an Object
private void removeInvalidRange()
private void removeElseRange()
public java.lang.Object getValue(java.lang.Double weight)
weight
- a Double
representing the weight of a map
component
public boolean removeRange(Range range)
range
- the Range
to remove
true
if the range was in the list of ranges;
false
otherwisepublic java.util.Iterator<Range> iterator()
Iterator
over the rangespublic java.lang.String toString()
DisplayRanges
.
This is for debugging purposes.
toString
in class java.lang.Object
DisplayRanges
public java.util.ArrayList<Range> getRanges()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |