org.openbp.cockpit.modeler.tools
Class InPlaceEditingTextField

java.lang.Object
  extended by org.openbp.cockpit.modeler.tools.InPlaceEditingTextField

public class InPlaceEditingTextField
extends java.lang.Object

Flaoting text field that provides key listeners.

Author:
Stephan Pauxberger

Constructor Summary
InPlaceEditingTextField()
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
          Adds an action listener
 void addKeyListener(java.awt.event.KeyListener listener)
          Adds a key listener
 void displayOverlay(java.lang.String text, java.awt.Container container, java.awt.Rectangle r)
          Positions the overlay.
 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 removeKeyListener(java.awt.event.KeyListener listener)
          Remove a key listener
 void setFont(java.awt.Font font)
          Sets the font.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InPlaceEditingTextField

public InPlaceEditingTextField()
Method Detail

displayOverlay

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


endOverlay

public void endOverlay()
Removes the overlay.


getText

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


setFont

public void setFont(java.awt.Font font)
Sets the font.

Parameters:
font - New font

getPreferredSize

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


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


addKeyListener

public void addKeyListener(java.awt.event.KeyListener listener)
Adds a key listener


removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener listener)
Remove a key listener



Copyright © 2011. All Rights Reserved.