mdh.hephaestus2.gamelib
Class MultiLabel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--mdh.hephaestus2.gamelib.MultiLabel
All Implemented Interfaces:
Accessible, EventListener, FocusListener, ImageObserver, MenuContainer, Serializable

public class MultiLabel
extends Canvas
implements FocusListener

A MultiLabel is a simple component that can display multiple lines of text.

Author:
Copyright © 2001 by Mark Hughes <kamikaze@kuoi.asui.uidaho.edu>
See Also:
Serialized Form

Field Summary
 
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
MultiLabel(String text)
           
 
Method Summary
 void focusGained(FocusEvent fe)
           
 void focusLost(FocusEvent fe)
           
 Dimension getMaximumSize()
           
 Dimension getMinimumSize()
           
 Dimension getPreferredSize()
           
 String getText()
           
 boolean isFocusable()
           
 boolean isFocusTraversable()
           
static void main(String[] args)
           
 void paint(Graphics g)
           
 void setText(String t)
           
 void update(Graphics g)
           
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, 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, getMouseListeners, getMouseMotionListeners, 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, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiLabel

public MultiLabel(String text)
Method Detail

main

public static void main(String[] args)

getMaximumSize

public Dimension getMaximumSize()
Overrides:
getMaximumSize in class Component

getMinimumSize

public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Component

getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Component

getText

public String getText()

focusGained

public void focusGained(FocusEvent fe)
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent fe)
Specified by:
focusLost in interface FocusListener

isFocusable

public boolean isFocusable()
Overrides:
isFocusable in class Component

isFocusTraversable

public boolean isFocusTraversable()
Overrides:
isFocusTraversable in class Component

paint

public void paint(Graphics g)
Overrides:
paint in class Canvas

setText

public void setText(String t)

update

public void update(Graphics g)
Overrides:
update in class Canvas