|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jadex.swing.map.MapRange
This is a utility class for storing the positions of the MapPoint, and processing the range calculations.
Constructor Summary | |
MapRange()
Default constructor |
|
MapRange(float startF,
float endF)
MapRange with float point numbers will be used in GeneticMap. |
|
MapRange(long start,
long end)
MapRange with integer numbers will be used in SequenceMap and PhysicalMap. |
|
MapRange(java.lang.String left,
java.lang.String right)
Construct a maprange with String arguments. |
Method Summary | |
MapRange |
combine(MapRange range1)
Add two maprange together and return a changed this maprange |
boolean |
contain(long value)
Check if this maprange contains a specific value. |
boolean |
equals(MapRange rg)
Compare two mapranges. |
boolean |
equalsF(MapRange rg)
Deprecated. use equals(MapRange rg) . |
long |
getEnd()
Get the end value. |
float |
getEndF()
Get the end value in float. |
long |
getExtend()
Get the total length of this MapRange. |
float |
getExtendF()
How to include the two ends? This is a question? |
long |
getLeftEnd()
Get the left end of this maprange |
long |
getRightEnd()
Get the right end of this maprange |
long |
getStart()
Get the start value. |
float |
getStartF()
Get the start value in float. |
boolean |
intersect(MapRange r)
Check if two mapranges intersect. |
MapRange |
moveDown(int step)
Move the current range to the lower direction. |
MapRange |
moveUp(int step)
Move the current range to the up direction. |
void |
setEnd(long e)
Set the end value. |
void |
setEndF(float end)
Set the end value in float. |
void |
setStart(long s)
Set the start value. |
void |
setStartF(float start)
Set the start value in float. |
java.lang.String |
toString()
An handy print method. |
java.lang.String |
toStringF()
Deprecated. use toString . |
MapRange |
zoomIn(int step)
Zoom-in in the current range |
MapRange |
zoomOut(int step)
Zoom-out the current range |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MapRange()
public MapRange(long start, long end)
start
- the start positionend
- the end position.public MapRange(float startF, float endF)
start
- the start position in float.end
- the end position in float.public MapRange(java.lang.String left, java.lang.String right)
left
- the start position in string.right
- the end position in string.Method Detail |
public void setStart(long s)
s
- the start value.public void setEnd(long e)
e
- the end value.public long getStart() throws UnknownPositionException
throw
- an UnknownPositionException if the position is unknown.public long getEnd() throws UnknownPositionException
throw
- an UnknownPositionException is the position is unknown.public long getExtend() throws UnknownPositionException
throw
- an UnknownPositionException is the value is not initialized.public float getExtendF() throws UnknownPositionException
public java.lang.String toString()
toString
in class java.lang.Object
java.lang.Object
public java.lang.String toStringF()
toString
.
public boolean equals(MapRange rg)
public boolean equalsF(MapRange rg)
equals(MapRange rg)
.
public float getStartF() throws UnknownPositionException
public float getEndF() throws UnknownPositionException
public void setStartF(float start)
public void setEndF(float end)
public boolean intersect(MapRange r)
r
- the compared maprangepublic MapRange zoomIn(int step)
the
- strength of the zoomingpublic MapRange zoomOut(int step)
the
- strength of the zoomingpublic MapRange moveUp(int step)
step
- the magnitude of the moving.public MapRange moveDown(int step)
step
- the magnitude of the moving.public boolean contain(long value)
value
- the compared value.public MapRange combine(MapRange range1)
range1
- the maprange to be addedpublic long getLeftEnd()
public long getRightEnd()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |