borland Packages  Class Hierarchy  dbswing Package 

TextIcon component

java.lang.Object
   +----java.awt.Component
           +----com.borland.dbswing.TextIcon

About the TextIcon component

Variables  Constructors  Properties  Methods  Event Listeners

Implements ImageObserver, MenuContainer, Serializable, Icon

Note: This is a feature of JBuilder Professional and Enterprise.

TextIcon is an opaque icon which simply paints the value of its text property. It can be used to display a text message wherever an icon is expected. Its size is determined completely by the bounds of its text property value, which in turn depends upon its font. If no font is available at the time a request for its size is made, a default dialog plain-style, 12 point font is used.


TextIcon variables

Variables implemented in java.awt.Component

TextIcon constructors

TextIcon properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.awt.Component

Properties implemented in java.lang.Object

TextIcon methods

Methods implemented in this class

Methods implemented in java.awt.Component

Methods implemented in java.lang.Object

TextIcon event listeners


TextIcon constructors

TextIcon()

  public TextIcon()
Constructs a TextIcon component.

TextIcon(java.lang.String)

  public TextIcon(String text)
Constructs a TextIcon component using the specified String as its text.

TextIcon properties

font

 public Font getFont()
Returns the font used by the TextIcon component.

If no font is available at the time a request for its size is made, a default dialog plain-style, 12 point font is used.

horizontalAlignment

 public int getHorizontalAlignment()
 public void setHorizontalAlignment(int horizontalAlignment)
Returns and sets the horizontal alignment of the text. One of:

iconHeight

 public int getIconHeight()
Returns the height of the TextIcon component. The height is based on the text and font properties.

iconWidth

 public int getIconWidth()
Returns the width of the TextIcon component. The width is based on the text and font properties.

margins

 public Insets getMargins()
 public void setMargins(Insets margins)
Returns and sets the margin for the text.

Note that a reference to the parameter rather than a copy is kept, so changing the object after setting this property may have unexpected results.

maximumSize

 public Dimension getMaximumSize()
Returns the maximum size of the TextIcon component. The maximum size is based on the text and font properties.

minimumSize

 public Dimension getMinimumSize()
Returns the minimum size of the TextIcon component. The minimum size is based on the text and font properties.

preferredSize

 public Dimension getPreferredSize()
Returns the preferred size of the TextIcon component. The preferred size is based on the text and font properties.

size

 public Dimension getSize()
Returns the actual size of the TextIcon component. The actual size is based on the text and font properties.

text

 public String getText()
 public void setText(String text)
Returns and sets the text to be drawn.

verticalAlignment

 public int getVerticalAlignment()
 public void setVerticalAlignment(int verticalAlignment)
Returns and sets the vertical alignment of the text. One of:

TextIcon methods

paint(java.awt.Graphics)

  public void paint(Graphics g)

Overrides: java.awt.Component.paint(java.awt.Graphics)


TextIcon event listeners

This component is a source for the following event sets.

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

inputMethod

 public synchronized void addInputMethodListener(java.awt.event.InputMethodListener )
 public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

mouse

 public synchronized void addMouseListener(java.awt.event.MouseListener )
 public synchronized void removeMouseListener(java.awt.event.MouseListener )

mouseMotion

 public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
 public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )

propertyChange

 public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
 public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )