com.arsdigita.toolbox.rebop
Class GenericLabel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended bycom.arsdigita.toolbox.rebop.GenericComponent
              extended bycom.arsdigita.toolbox.rebop.GenericLabel
All Implemented Interfaces:
EventListener, GenericDrawable, ImageObserver, MenuContainer, MouseListener, Serializable

public class GenericLabel
extends GenericComponent

GenericLabel.java Created: Thu Sep 20 08:28:15 2001

Version:
$Date: 2004/04/07 $
Author:
Gavin Doughtie
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String versionId
           
 
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
GenericLabel()
           
GenericLabel(String text)
           
 
Method Summary
 void addFormattedText(Font font, Color color, String string)
           
 void addNotify()
          Called when the native peer is available, Double-buffer image is automatically created if required.
 void forceUpdateSize()
           
 Dimension getMinimumSize()
           
 Dimension getPreferredSize()
           
protected  StyledText getStyledText()
           
 Vector getWrappedRuns()
           
 void reshape(int x, int y, int width, int height)
          Called whenever a component is resized.
 void setDrawable(GenericDrawable drawable)
          Sets the object that will draw this component.
 void setFont(Font font)
           
 void setForeground(Color fgColor)
           
 void setName(String text)
           
 void setUseOffset(boolean useOffset)
           
 void setWrappedRuns(Vector wrappedRuns)
           
 void setXOffset(int xOffset)
          The X and Y offsets are used to offset a drawable from the location where it is told to draw.
 void setYOffset(int yOffset)
           
 String toString()
           
 
Methods inherited from class com.arsdigita.toolbox.rebop.GenericComponent
componentReshape, draw, draw, drawDebug, forceInvalid, getDebugPaint, getDoubleBuffered, getDrawable, getXOffset, getYOffset, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, paint, setBounds, setDebugPaint, setDoubleBuffered, validateTree
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, 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, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, setVisible, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

GenericLabel

public GenericLabel(String text)

GenericLabel

public GenericLabel()
Method Detail

setFont

public void setFont(Font font)

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)
Description copied from class: GenericComponent
Called whenever a component is resized. Recreate the back buffer if necessary. This is a deprecated method, but it is the "root" method of all the awt component methods that change the size of a component (at least up through the JDK 1.3.1x) and overriding this method prevents having to override many others. Whenever this changes, this method can be removed as setBounds() will take care of things.

Overrides:
reshape in class GenericComponent
Parameters:
x - new x coordinate
y - new y coordinate
width - new width
height - new height

setDrawable

public void setDrawable(GenericDrawable drawable)
Description copied from class: GenericComponent
Sets the object that will draw this component. while some components will want to do their own painting, it is recommended that you create re-useable objects that implement the GenericDrawable interface instead.

Overrides:
setDrawable in class GenericComponent
Parameters:
drawable - Object that will be drawn in this component's paint() method

addFormattedText

public void addFormattedText(Font font,
                             Color color,
                             String string)

getStyledText

protected StyledText getStyledText()

setWrappedRuns

public void setWrappedRuns(Vector wrappedRuns)

getWrappedRuns

public Vector getWrappedRuns()

setUseOffset

public void setUseOffset(boolean useOffset)

setXOffset

public void setXOffset(int xOffset)
Description copied from interface: GenericDrawable
The X and Y offsets are used to offset a drawable from the location where it is told to draw. Offsets are typically used for drawables that are inside components that form the contents of a push-down button.

Specified by:
setXOffset in interface GenericDrawable
Overrides:
setXOffset in class GenericComponent

setYOffset

public void setYOffset(int yOffset)
Specified by:
setYOffset in interface GenericDrawable
Overrides:
setYOffset in class GenericComponent

setName

public void setName(String text)

setForeground

public void setForeground(Color fgColor)

toString

public String toString()

getPreferredSize

public Dimension getPreferredSize()

addNotify

public void addNotify()
Description copied from class: GenericComponent
Called when the native peer is available, Double-buffer image is automatically created if required.

Overrides:
addNotify in class GenericComponent

getMinimumSize

public Dimension getMinimumSize()

forceUpdateSize

public void forceUpdateSize()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC