All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.awt.hlist.ListCanvas

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----ncsa.awt.hlist.ListCanvas

public class ListCanvas
extends Canvas
implements ItemSelectable, AdjustmentListener
This class produces an object which displays heirarchical data


Variable Index

 o itemListener

Constructor Index

 o ListCanvas(Panel, String, int, int)
Constructor for ListCanvas; used to display the graphical representation of ListContainers and ListElements

Method Index

 o addItemListener(ItemListener)
 o adjustmentValueChanged(AdjustmentEvent)
 o adjustSize()
readjust the size of the canvas and panel that holds it.
 o createInitialFolder()
Create the initial folder for this ListCanvas.
 o deleteSelection()
 o elements()
 o getClosedContainerImage()
Get the Image representing the closed container
 o getListElementImage()
Get the Image representing this bookmark
 o getMainContainer()
Get the main container for this ListCanvas
 o getOpenContainerImage()
Get the Image representing the open container
 o getSelectedObjects()
Get the currently selected HotListItem
 o getTitle()
Get the name of this ListCanvas
 o hilite(ListItem)
 o lineAfter(ListItem)
 o lineBefore(ListItem)
 o paint(Graphics)
Paint this ListCanvas
 o paintFirstTime()
 o processMouseEvent(MouseEvent)
Handle a mouseDown event within the ListCanvas
 o processMouseMotionEvent(MouseEvent)
Handle a mouseDrag event within the ListCanvas
 o removeItemListener(ItemListener)
 o setCurrentItem(ListItem)
 o setListContainerImages(Image, Image)
Set the Image representing the open and closed states of a Container.
 o setListElementImage(Image)
Set the image representing this bookmark
 o setMainContainer(ListContainer)
Get the main container for this ListCanvas
 o unEverything()

Variables

 o itemListener
 public ItemListener itemListener

Constructors

 o ListCanvas
 public ListCanvas(Panel panel,
                   String title,
                   int width,
                   int height)
Constructor for ListCanvas; used to display the graphical representation of ListContainers and ListElements

Parameters:
panel - the panel holding this canvas
title - title of the ListCanvas
width - Width of the canvas
height - Height of the canvas

Methods

 o paintFirstTime
 public void paintFirstTime()
 o adjustmentValueChanged
 public void adjustmentValueChanged(AdjustmentEvent e)
 o addItemListener
 public void addItemListener(ItemListener listener)
 o removeItemListener
 public void removeItemListener(ItemListener listener)
 o setListElementImage
 public void setListElementImage(Image element)
Set the image representing this bookmark

 o getListElementImage
 public Image getListElementImage()
Get the Image representing this bookmark

 o setListContainerImages
 public void setListContainerImages(Image open_img,
                                    Image closed_img)
Set the Image representing the open and closed states of a Container.

 o getOpenContainerImage
 public Image getOpenContainerImage()
Get the Image representing the open container

 o getClosedContainerImage
 public Image getClosedContainerImage()
Get the Image representing the closed container

 o createInitialFolder
 public void createInitialFolder()
Create the initial folder for this ListCanvas. Currently there is only one main folder per ListCanvas; this can be changed to handle multiple main folders in the future.

 o processMouseEvent
 public void processMouseEvent(MouseEvent e)
Handle a mouseDown event within the ListCanvas

Parameters:
event - the event that occurred
x - x coordinate
y - y coordinate
Overrides:
processMouseEvent in class Component
 o adjustSize
 public void adjustSize()
readjust the size of the canvas and panel that holds it.

 o processMouseMotionEvent
 public void processMouseMotionEvent(MouseEvent e)
Handle a mouseDrag event within the ListCanvas

Parameters:
event - the event that occurred
x - x coordinate
y - y coordinate
Overrides:
processMouseMotionEvent in class Component
 o getSelectedObjects
 public Object[] getSelectedObjects()
Get the currently selected HotListItem

 o setMainContainer
 public void setMainContainer(ListContainer folder)
Get the main container for this ListCanvas

 o getMainContainer
 public ListContainer getMainContainer()
Get the main container for this ListCanvas

 o getTitle
 public String getTitle()
Get the name of this ListCanvas

 o setCurrentItem
 public void setCurrentItem(ListItem item)
 o paint
 public void paint(Graphics g)
Paint this ListCanvas

Overrides:
paint in class Canvas
 o hilite
 public void hilite(ListItem item)
 o lineAfter
 public void lineAfter(ListItem item)
 o lineBefore
 public void lineBefore(ListItem item)
 o unEverything
 public void unEverything()
 o elements
 public Enumeration elements()
 o deleteSelection
 public void deleteSelection()

All Packages  Class Hierarchy  This Package  Previous  Next  Index