All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.awt.hlist.ListItem

java.lang.Object
   |
   +----ncsa.awt.hlist.ListItem

public class ListItem
extends Object
implements Cloneable
This class describes a ListItem


Variable Index

 o location

Constructor Index

 o ListItem()
Constructs a ListItem
 o ListItem(ListContainer, String)
Constructs a ListItem with a title

Method Index

 o clone()
clone this ListItem
 o contains(int, int)
Java 1.1 Code
 o doubleClick(int, int)
Method called on a double mouse click
 o drawItem(Graphics)
Draw the ListItem in the given graphics context
 o getArg()
 o getBoundingBox()
Returns the bounding box for this ListItem
 o getCanvas()
 o getParentListContainer()
get the parent folder of this ListItem
 o getText()
 o grab(int, int)
Grabs this primitive
 o grabbed()
Returns whether or not this primitive has been grabbed
 o grabbedPoint()
return the point at which the ListItem was grabbed
 o intersects(Point)
 o mouseDown(int, int)
Sets up the vector of points we're going to do in this drawing operation, and calls the mouseDownAction with point coordinates.
 o mouseDrag(int, int)
Preforms the mouse dragging operation for this primitive.
 o mouseUp(int, int)
Preforms the mouse up operation for this primitive.
 o move(Point, int, int)
Move this primitive from the current location to a new (x,y)
 o release()
Releases the grab on this primitive
 o removeMyself()
remove this ListItem from it's parent folder
 o repaintMe()
 o rightAfter(Point)
 o rightBefore(Point)
 o select()
 o setArg(Object)
 o setBoundingBoxes(Graphics)
Set the bounding box for this primitive.
 o setCanvas(Component)
Sets the component we're drawing into
 o setColor(Color)
Sets the color we're drawing with
 o setParentListContainer(ListContainer)
set the parent of this ListItem to the given folder
 o unselect()
toggle the selected value of this ListItem

Variables

 o location
 public Point location

Constructors

 o ListItem
 public ListItem()
Constructs a ListItem

 o ListItem
 public ListItem(ListContainer container,
                 String title)
Constructs a ListItem with a title

Parameters:
container - the parent ListContainer
title - the title of the ListItem

Methods

 o doubleClick
 public boolean doubleClick(int x,
                            int y)
Method called on a double mouse click

Parameters:
x - the x coordinate of the double click
y - the y coordinate of the double click
 o move
 public void move(Point start,
                  int x,
                  int y)
Move this primitive from the current location to a new (x,y)

Parameters:
start - the reference Point at which this move started
x - the x coordinate
y - the y coordinate
 o drawItem
 public void drawItem(Graphics g)
Draw the ListItem in the given graphics context

Parameters:
the - graphics context
 o setBoundingBoxes
 public void setBoundingBoxes(Graphics g)
Set the bounding box for this primitive. The Graphics context is required to obtain the FontMetrics for this ListItem.

Parameters:
g - the graphics context
pnts - the vector containing the ListItem location
 o setParentListContainer
 public void setParentListContainer(ListContainer container)
set the parent of this ListItem to the given folder

Parameters:
folder - the new parent folder
 o getParentListContainer
 public ListContainer getParentListContainer()
get the parent folder of this ListItem

 o removeMyself
 public void removeMyself()
remove this ListItem from it's parent folder

 o unselect
 public void unselect()
toggle the selected value of this ListItem

 o select
 public void select()
 o clone
 public Object clone()
clone this ListItem

Overrides:
clone in class Object
 o setCanvas
 public void setCanvas(Component canvas)
Sets the component we're drawing into

Parameters:
component - the component
 o getCanvas
 public Component getCanvas()
 o setColor
 public void setColor(Color color)
Sets the color we're drawing with

Parameters:
the - Color
 o mouseDown
 public void mouseDown(int x,
                       int y)
Sets up the vector of points we're going to do in this drawing operation, and calls the mouseDownAction with point coordinates.

Parameters:
x - the x coordinate when the mouseDown event occurred.
y - the y coordinate when the mouseDown event occurred.
 o mouseDrag
 public void mouseDrag(int x,
                       int y)
Preforms the mouse dragging operation for this primitive. If the primitive has been selected for a dragging operation, the move method is called. Otherwise, it's a straight drawing operation, so the mouseDragAction method is called.

Parameters:
x - the x coordinate when the mouseDrag event occurred.
y - the y coordinate when the mouseDrag event occurred.
 o mouseUp
 public void mouseUp(int x,
                     int y)
Preforms the mouse up operation for this primitive. If the primitive has been selected for a dragging operation, nothing is done. Otherwise, it's a straight drawing operation, so the mouseUpAction method is called.

Parameters:
x - the x coordinate when the mouseUp event occurred.
y - the y coordinate when the mouseUp event occurred.
 o grabbed
 public final boolean grabbed()
Returns whether or not this primitive has been grabbed

Returns:
a boolean value
 o grabbedPoint
 public Point grabbedPoint()
return the point at which the ListItem was grabbed

 o grab
 public void grab(int x,
                  int y)
Grabs this primitive

Parameters:
x - the x coordinate where the primitive was grabbed
y - the y coordinate where the primitive was grabbed
 o repaintMe
 public void repaintMe()
 o release
 public void release()
Releases the grab on this primitive

 o contains
 public boolean contains(int x,
                         int y)
Java 1.1 Code

 o intersects
 public boolean intersects(Point point)
 o rightBefore
 public boolean rightBefore(Point point)
 o rightAfter
 public boolean rightAfter(Point point)
 o getBoundingBox
 public final Rectangle getBoundingBox()
Returns the bounding box for this ListItem

 o getText
 public String getText()
 o setArg
 public void setArg(Object arg)
 o getArg
 public Object getArg()

All Packages  Class Hierarchy  This Package  Previous  Next  Index