CH.ifa.draw.util
Class FloatingTextField
- java.lang.Object
-
- CH.ifa.draw.util.FloatingTextField
-
public class FloatingTextField extends java.lang.ObjectA 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
Constructors Constructor and Description FloatingTextField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddActionListener(java.awt.event.ActionListener listener)Adds an action listenervoidcreateOverlay(java.awt.Container container)Creates the overlay for the given Component.voidcreateOverlay(java.awt.Container container, java.awt.Font font)Creates the overlay for the given Container using a specific font.voidendOverlay()Removes the overlay.java.awt.DimensiongetPreferredSize(int cols)Gets the preferred size of the overlay.java.lang.StringgetText()Gets the text contents of the overlay.voidremoveActionListener(java.awt.event.ActionListener listener)Remove an action listenervoidsetBounds(java.awt.Rectangle r, java.lang.String text)Positions the overlay.
-
-
-
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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG