org.strbio.mol.lib.pred2ary
Class ProfileDisplayArea.ClickedArea

java.lang.Object
  extended by org.strbio.mol.lib.pred2ary.ProfileDisplayArea.ClickedArea
Enclosing class:
ProfileDisplayArea

public class ProfileDisplayArea.ClickedArea
extends java.lang.Object

This class keeps track of rectangular areas of interest, and tells which one has been clicked on.


Constructor Summary
ProfileDisplayArea.ClickedArea()
           
 
Method Summary
 void add(int[] a)
          This adds a new area of interest.
 void clear()
           
 int[] clickedOn(int x, int y)
          this looks up which area corresponds to given x and y coordinates, or returns null if none do.
 int n()
          How many areas of interest are there?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileDisplayArea.ClickedArea

public ProfileDisplayArea.ClickedArea()
Method Detail

add

public void add(int[] a)
This adds a new area of interest. It is an array of integers, with the first 4 representing the left, top, right, and bottom coordinates of a box. Other integers in the array are ignored, but can be used for storing other things of interest to the user.


n

public int n()
How many areas of interest are there?


clear

public void clear()

clickedOn

public int[] clickedOn(int x,
                       int y)
this looks up which area corresponds to given x and y coordinates, or returns null if none do.