JHotDraw 6.0b1

org.jhotdraw.util
Class FloatingTextField

java.lang.Object
  extended by org.jhotdraw.util.FloatingTextField

public class FloatingTextField
extends java.lang.Object

A text field overlay that is used to edit a TextFigure. A FloatingTextField requires a two step initialization: In a first step the overlay is created and in a second step it can be positioned.

See Also:
TextFigure

Constructor Summary
FloatingTextField()
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
          Adds an action listener
 void createOverlay(java.awt.Container container)
          Creates the overlay for the given Component.
 void createOverlay(java.awt.Container container, java.awt.Font font)
          Creates the overlay for the given Container using a specific font.
 void endOverlay()
          Removes the overlay.
 java.awt.Dimension getPreferredSize(int cols)
          Gets the preferred size of the overlay.
 java.lang.String getText()
          Gets the text contents of the overlay.
 void removeActionListener(java.awt.event.ActionListener listener)
          Remove an action listener
 void setBounds(java.awt.Rectangle r, java.lang.String text)
          Positions the overlay.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatingTextField

public FloatingTextField()
Method Detail

createOverlay

public void createOverlay(java.awt.Container container)
Creates the overlay for the given Component.


createOverlay

public void createOverlay(java.awt.Container container,
                          java.awt.Font font)
Creates the overlay for the given Container using a specific font.


addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Adds an action listener


removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Remove an action listener


setBounds

public void setBounds(java.awt.Rectangle r,
                      java.lang.String text)
Positions the overlay.


getText

public java.lang.String getText()
Gets the text contents of the overlay.


getPreferredSize

public java.awt.Dimension getPreferredSize(int cols)
Gets the preferred size of the overlay.


endOverlay

public void endOverlay()
Removes the overlay.


JHotDraw 6.0b1