pal.gui
Class TreeComponent

java.lang.Object
  extended by java.awt.Component
      extended by pal.gui.TreeComponent
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class TreeComponent
extends java.awt.Component

An AWT Component for displaying a tree.

Version:
$Id: TreeComponent.java,v 1.17 2002/03/25 02:38:45 alexi Exp $
Author:
Alexei Drummond
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int CIRCULAR_BW
           
static int CIRCULAR_COLOR
           
static java.lang.String[] MODE_NAMES
           
static int NORMAL_BW
           
static int NORMAL_COLOR
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TreeComponent(Tree tree)
           
TreeComponent(Tree tree, boolean usingSymbols)
           
TreeComponent(Tree tree, java.lang.String title)
           
TreeComponent(Tree tree, java.lang.String title, boolean showTitle)
           
TreeComponent(Tree tree, TimeOrderCharacterData tocd, boolean usingSymbols)
           
 
Method Summary
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getPreferredSize()
           
 java.lang.String getTitle()
           
 void paint(java.awt.Graphics g)
           
 void setAttributeName(java.lang.String name)
           
 void setColouriser(NameColouriser nc)
           
 void setInvertCircular(boolean invert)
           
 void setLabelMapping(LabelMapping lm)
           
 void setMaxHeight(double maxHeight)
           
 void setMode(int mode)
          Sets the mode of display for this component.
 void setTitle(java.lang.String title)
           
 void setTree(Tree tree)
           
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NORMAL_BW

public static final int NORMAL_BW
See Also:
Constant Field Values

CIRCULAR_BW

public static final int CIRCULAR_BW
See Also:
Constant Field Values

NORMAL_COLOR

public static final int NORMAL_COLOR
See Also:
Constant Field Values

CIRCULAR_COLOR

public static final int CIRCULAR_COLOR
See Also:
Constant Field Values

MODE_NAMES

public static final java.lang.String[] MODE_NAMES
Constructor Detail

TreeComponent

public TreeComponent(Tree tree,
                     boolean usingSymbols)

TreeComponent

public TreeComponent(Tree tree,
                     TimeOrderCharacterData tocd,
                     boolean usingSymbols)

TreeComponent

public TreeComponent(Tree tree)

TreeComponent

public TreeComponent(Tree tree,
                     java.lang.String title)

TreeComponent

public TreeComponent(Tree tree,
                     java.lang.String title,
                     boolean showTitle)
Method Detail

setLabelMapping

public final void setLabelMapping(LabelMapping lm)

setColouriser

public void setColouriser(NameColouriser nc)

setAttributeName

public void setAttributeName(java.lang.String name)

setMaxHeight

public void setMaxHeight(double maxHeight)

setTree

public void setTree(Tree tree)

setTitle

public void setTitle(java.lang.String title)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Component

setInvertCircular

public void setInvertCircular(boolean invert)

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class java.awt.Component

getTitle

public java.lang.String getTitle()

setMode

public void setMode(int mode)
Sets the mode of display for this component.

Parameters:
the - mode to switch to. Valid arguments are NORMAL (for normal tree display), and CIRCULAR (for a circular view of the trees)

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Component