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
-
location
-
-
ListItem()
- Constructs a ListItem
-
ListItem(ListContainer, String)
- Constructs a ListItem with a title
-
clone()
- clone this ListItem
-
contains(int, int)
- Java 1.1 Code
-
doubleClick(int, int)
- Method called on a double mouse click
-
drawItem(Graphics)
- Draw the ListItem in the given graphics context
-
getArg()
-
-
getBoundingBox()
- Returns the bounding box for this ListItem
-
getCanvas()
-
-
getParentListContainer()
- get the parent folder of this ListItem
-
getText()
-
-
grab(int, int)
- Grabs this primitive
-
grabbed()
- Returns whether or not this primitive has been grabbed
-
grabbedPoint()
- return the point at which the ListItem was grabbed
-
intersects(Point)
-
-
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.
-
mouseDrag(int, int)
- Preforms the mouse dragging operation for this primitive.
-
mouseUp(int, int)
- Preforms the mouse up operation for this primitive.
-
move(Point, int, int)
- Move this primitive from the current location to a new (x,y)
-
release()
- Releases the grab on this primitive
-
removeMyself()
- remove this ListItem from it's parent folder
-
repaintMe()
-
-
rightAfter(Point)
-
-
rightBefore(Point)
-
-
select()
-
-
setArg(Object)
-
-
setBoundingBoxes(Graphics)
- Set the bounding box for this primitive.
-
setCanvas(Component)
- Sets the component we're drawing into
-
setColor(Color)
- Sets the color we're drawing with
-
setParentListContainer(ListContainer)
- set the parent of this ListItem to the given folder
-
unselect()
- toggle the selected value of this ListItem
location
public Point location
ListItem
public ListItem()
- Constructs a ListItem
ListItem
public ListItem(ListContainer container,
String title)
- Constructs a ListItem with a title
- Parameters:
- container - the parent ListContainer
- title - the title of the ListItem
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
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
drawItem
public void drawItem(Graphics g)
- Draw the ListItem in the given graphics context
- Parameters:
- the - graphics context
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
setParentListContainer
public void setParentListContainer(ListContainer container)
- set the parent of this ListItem to the given folder
- Parameters:
- folder - the new parent folder
getParentListContainer
public ListContainer getParentListContainer()
- get the parent folder of this ListItem
removeMyself
public void removeMyself()
- remove this ListItem from it's parent folder
unselect
public void unselect()
- toggle the selected value of this ListItem
select
public void select()
clone
public Object clone()
- clone this ListItem
- Overrides:
- clone in class Object
setCanvas
public void setCanvas(Component canvas)
- Sets the component we're drawing into
- Parameters:
- component - the component
getCanvas
public Component getCanvas()
setColor
public void setColor(Color color)
- Sets the color we're drawing with
- Parameters:
- the - Color
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.
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.
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.
grabbed
public final boolean grabbed()
- Returns whether or not this primitive has been grabbed
- Returns:
- a boolean value
grabbedPoint
public Point grabbedPoint()
- return the point at which the ListItem was grabbed
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
repaintMe
public void repaintMe()
release
public void release()
- Releases the grab on this primitive
contains
public boolean contains(int x,
int y)
- Java 1.1 Code
intersects
public boolean intersects(Point point)
rightBefore
public boolean rightBefore(Point point)
rightAfter
public boolean rightAfter(Point point)
getBoundingBox
public final Rectangle getBoundingBox()
- Returns the bounding box for this ListItem
getText
public String getText()
setArg
public void setArg(Object arg)
getArg
public Object getArg()
All Packages Class Hierarchy This Package Previous Next Index