jadex.swing.map
Class DisplayModel

java.lang.Object
  |
  +--jadex.swing.map.DisplayModel

public class DisplayModel
extends java.lang.Object

This is a datamodel used for both GeneticMap and SequenceMap displays.


Constructor Summary
DisplayModel()
          Creates new DisplayModel
 
Method Summary
 void addPoint(MapPoint p)
          Add a MapPoint.
 java.util.Vector assignPoints(float rel)
          Distribute all MapPoints.
protected  void assignPoints(MapPoint[] l, float rel)
          Distribute a MapPoint array.
 java.util.Comparator getComparator()
          Get the comparator for sorting the MapPoints.
 MapPoint[] getData()
          Get all MapPoint in an array.
 MapPoint[] getMapPoints(int size)
          Get the MapPointn with the number of size.
 MapPoint[] getMapPoints(MapRange r)
          Giving a maprange, get all mappoints in this range.
 MapPoint[] getMapPoints(MapRange r, int number)
          Giving a maprange and showing number, get the mappoints.
 void setComparator(java.util.Comparator comp)
          Set the comparator for sorting the MapPoints.
 void setData(java.util.List l)
          Set the total displayable MapPoint data.
 void setData(MapPoint[] points)
          Set the total displayable MapPoint data from a MapPoint array.
 void setData(java.util.Vector v)
          Vector is a collection of MapPoint to be displayed.
 void sort()
          Sort all MapPoints.
 void sort(java.util.Comparator comp)
          Sort all MapPoints by a specified comparator.
 void sort(java.util.List points)
          Sort a MapPoint list by using the default Comparator.
 void sort(MapPoint[] points)
          Sort a MapPoint array by using defalt comparator.
 void sort(MapPoint[] points, java.util.Comparator comp)
          A utility for sorting a MapPoint array using a Comparator.
 void sortByError()
          Sort all MapPoints by position errors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayModel

public DisplayModel()
Creates new DisplayModel
Method Detail

addPoint

public void addPoint(MapPoint p)
Add a MapPoint.
Parameters:
p - a MapPoint to be added.

setData

public void setData(java.util.Vector v)
Vector is a collection of MapPoint to be displayed.
Parameters:
v - the MapPoint data that can be displayed.

setData

public void setData(java.util.List l)
Set the total displayable MapPoint data.
Parameters:
l - a list holding all MapPoints.

setData

public void setData(MapPoint[] points)
Set the total displayable MapPoint data from a MapPoint array.
Parameters:
points - a MapPoint array holding all data.

getData

public MapPoint[] getData()
Get all MapPoint in an array.
Returns:
a MapPoint array holding all MapPoints.

getMapPoints

public MapPoint[] getMapPoints(int size)
Get the MapPointn with the number of size.
Parameters:
size - the number of the MapPoints to be got.

getMapPoints

public MapPoint[] getMapPoints(MapRange r)
Giving a maprange, get all mappoints in this range.
Parameters:
r - the MapRange limiting the query.
Returns:
a MapPoint array in the MapRange r.

getMapPoints

public MapPoint[] getMapPoints(MapRange r,
                               int number)
Giving a maprange and showing number, get the mappoints.
Parameters:
r - the MapRange limiting the query.
number - the number of the MapPoints to be queried.
Returns:
a MapPoint array in the MapRange.

setComparator

public void setComparator(java.util.Comparator comp)
Set the comparator for sorting the MapPoints.
Parameters:
comp - the comparator for sorting the MapPoints.

getComparator

public java.util.Comparator getComparator()
Get the comparator for sorting the MapPoints.
Returns:
the Comparator for sorting the MapPoints.

sort

public void sort()
Sort all MapPoints.

sortByError

public void sortByError()
Sort all MapPoints by position errors.

sort

public void sort(java.util.Comparator comp)
Sort all MapPoints by a specified comparator.
Parameters:
comp - a Comparator used for sorting all MapPoints.

sort

public void sort(MapPoint[] points,
                 java.util.Comparator comp)
A utility for sorting a MapPoint array using a Comparator.
Parameters:
points - the MapPoint array to be sorted.
comp - the Comparator for sorting the MapPoint arrays.

sort

public void sort(MapPoint[] points)
Sort a MapPoint array by using defalt comparator.
Parameters:
points - a MapPoint array to be sorted.

sort

public void sort(java.util.List points)
Sort a MapPoint list by using the default Comparator.
Parameters:
points - a MapPoint List to be sorted.

assignPoints

public java.util.Vector assignPoints(float rel)
Distribute all MapPoints.
Parameters:
rel - the ratio between the biological distance (e.g., genetic or sequence distances) and graphic distance.

assignPoints

protected void assignPoints(MapPoint[] l,
                            float rel)
Distribute a MapPoint array.
Parameters:
l - the data to be distributed.
rel - the ratio.