| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--ncsa.horizon.awt.LineOfInterest
The LineOfInterest can be created, moved, resized, etc. by calling the appropriate methods. It is up to the calling application to implement the user action interface to the routines. E.g., create the LineOfInterest on mouse button down, extend the size on mouse drag, and return a completed LineOfInterest on mouse up.
The LineOfInterest neither generates nor receives events. It can be thought of as a simple decorational widget than knows its location and state, can draw itself given a graphics context, and can be manipulated and queried through method calls. It is the responsibility of the parent component to ask the Cursor to draw/redraw itself.
| Field Summary | |
| int | height
|
| int | width
|
| int | x
|
| int | y
|
| Constructor Summary | |
| LineOfInterest()
Create a LineOfInterest in the default style and size. |
|
| LineOfInterest(java.awt.Component _component)
Create a LineOfInterest in the default style and size. |
|
| LineOfInterest(java.awt.Point p,
java.awt.Component _component)
Create a LineOfInterest beginning at the specified point. |
|
| LineOfInterest(int _x,
int _y,
java.awt.Component _component)
Create a LineOfInterest beginning at the specified point. |
|
| LineOfInterest(int _x,
int _y,
int _width,
int _height,
java.awt.Component _component)
Create a LineOfInterest beginning with the specified vertex and dimensions. |
|
| Method Summary | |
| void | draw(java.awt.Graphics g)
Draw the LineOfInterest at its current location. |
| void | drop()
grab the line |
| void | drop(int x,
int y)
grab the line at a specific point |
| java.awt.Color | getColor()
Get the color of this LineOfInterest. |
| Line | getLine()
return this LineOfInterest as a Line to show its geographic attributes. |
| java.awt.Point | getOrigin()
get the location of the Marker. |
| java.awt.Dimension | getSize()
get the size of the Marker |
| int | getThickness()
Get the current LineOfInterest's line thickness. |
| void | grab()
grab the line |
| void | grab(int x,
int y)
grab the line at a specific point |
| void | grow(int _x,
int _y)
grow the line to the given point |
| void | hide()
Deprecated. Hide the LineOfInterest from view. |
| boolean | isGrabbed()
return true if the line has been grabbed |
| boolean | isVisible()
Tell if the LineOfInterest is visible |
| int | length()
Return line length. |
| void | move(int _x,
int _y)
Move this LineOfInterest to the coordinate (x,y) in the parent's coordinate space. |
| void | resize(int delta_x,
int delta_y)
resize the line |
| void | setColor(java.awt.Color color)
Set the color for this LineOfInterest. |
| void | setComponent(java.awt.Component component)
Set the component. |
| void | setOrigin(java.awt.Point p)
set the location of the Marker. |
| void | setSize(java.awt.Dimension d)
set the size of the Marker |
| void | setSize(int width,
int height)
set the size of the Marker |
| void | setThickness(int thickness)
Set the thickness for this LineOfInterest. |
| void | setVisible(boolean b)
set whether the line is visible |
| void | show(boolean b)
Deprecated. Show or hide this LineOfInterest according t |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Field Detail |
protected int x
protected int y
protected int width
protected int height
| Constructor Detail |
public LineOfInterest()
public LineOfInterest(java.awt.Component _component)
_component
- The component to attach the LineOfInterest to.
public LineOfInterest(java.awt.Point p,
java.awt.Component _component)
p
- The point defining a vertex of the region.
_component
- The component to attach the LineOfInterest to.
public LineOfInterest(int _x,
int _y,
java.awt.Component _component)
x
- The x value of the location of one vertex of the region.
y
- The y value of the location of one vertex of the region.
_component
- The component to attach the LineOfInterest to.
public LineOfInterest(int _x,
int _y,
int _width,
int _height,
java.awt.Component _component)
x
- The x value of the location of one vertex of the region.
y
- The y value of the location of one vertex of the region.
width
- The width of the region.
height
- The height of the region.
_component
- The component to attach the LineOfInterest to.| Method Detail |
public void draw(java.awt.Graphics g)
g
- The Graphics context to use for drawing.public java.awt.Color getColor()
public java.awt.Point getOrigin()
public void setOrigin(java.awt.Point p)
public Line getLine()
public int getThickness()
public void setVisible(boolean b)
public void hide()
public boolean isVisible()
public void move(int _x,
int _y)
_x
- the x coordinate
_y
- the y coordinatepublic void setColor(java.awt.Color color)
color
- The Color to use to draw the LineOfInterest.public void setComponent(java.awt.Component component)
public void setThickness(int thickness)
thickness
- Thickness to set.public void show(boolean b)
t
- true to show, false to hidepublic int length()
public void grab()
public void grab(int x,
int y)
public boolean isGrabbed()
public void drop()
public void drop(int x,
int y)
public final void grow(int _x,
int _y)
public java.awt.Dimension getSize()
public void setSize(java.awt.Dimension d)
public void setSize(int width,
int height)
public void resize(int delta_x,
int delta_y)
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||