gumbo.graphic.content
Class AbstractLabelGraphic

java.lang.Object
  |
  +--gumbo.graphic.content.AbstractLabelGraphic
All Implemented Interfaces:
Graphic, LabelGraphic

public class AbstractLabelGraphic
extends java.lang.Object
implements LabelGraphic

An non-native graphic implementation of LabelGraphic, with state being maintained by this object, not some native graphic.

Version:
$Revision: 1.1 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Constructor Summary
AbstractLabelGraphic()
           
 
Method Summary
 java.lang.Object getGraphic()
          Default implementation: returns this object.
 javax.swing.Icon getIcon()
          Gets the label text.
 java.lang.String getText()
          Gets the label text.
 void setIcon(javax.swing.Icon icon)
          Sets the label icon.
 void setText(java.lang.String text)
          Sets the label text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLabelGraphic

public AbstractLabelGraphic()
Method Detail

setText

public void setText(java.lang.String text)
Description copied from interface: LabelGraphic
Sets the label text. Depending on the implementation, may support HTML and multiple lines (see JLabel), or leading white space (see JTextField).

Specified by:
setText in interface LabelGraphic
Parameters:
text - The new text. None if null.

getText

public java.lang.String getText()
Description copied from interface: LabelGraphic
Gets the label text.

Specified by:
getText in interface LabelGraphic
Returns:
The text. None if null.

setIcon

public void setIcon(javax.swing.Icon icon)
Description copied from interface: LabelGraphic
Sets the label icon. Depending on the implementation, may do nothing or throw an exception if an icon is not supported.

Specified by:
setIcon in interface LabelGraphic
Parameters:
icon - The new icon. None if null.

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: LabelGraphic
Gets the label text.

Specified by:
getIcon in interface LabelGraphic
Returns:
The icon. None if null

getGraphic

public java.lang.Object getGraphic()
Default implementation: returns this object.

Specified by:
getGraphic in interface Graphic
Returns:
The target graphic object. Possibly this object (self-proxy, direct implementation), but never null.