Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dinopolis.util.gui.property_editor
Class StringEditor  view StringEditor download StringEditor.java

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended byorg.dinopolis.util.gui.property_editor.StringEditor
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.awt.event.FocusListener, java.beans.PropertyEditor

public class StringEditor
extends java.beans.PropertyEditorSupport
implements java.awt.event.ActionListener, java.awt.event.FocusListener

This Class implements a String editor.

Version:
$Revision: 1.2 $

Field Summary
private  javax.swing.JPanel editing_component_
          the editing component
private  javax.swing.JTextField text_field_
          the text field
 
Fields inherited from class java.beans.PropertyEditorSupport
 
Constructor Summary
StringEditor()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Invoked when the a text field changed its value.
protected  void createEditingComponent()
          Creates and sets the editing component.
 void focusGained(java.awt.event.FocusEvent event)
          Invoked when the a text field gained its focus.
 void focusLost(java.awt.event.FocusEvent event)
          Invoked when the a text field loses its focus.
 java.lang.String getAsText()
          Returns the String value.
 java.awt.Component getCustomEditor()
          Returns the custom editing component.
 void setAsText(java.lang.String value)
          Sets the given value.
protected  void setValue()
          Sets the value according to the strings given within the text fields.
 void setValue(java.lang.Object value)
          Sets the given value.
protected  void updateValues()
          Updates the text field to stored value.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editing_component_

private javax.swing.JPanel editing_component_
the editing component


text_field_

private javax.swing.JTextField text_field_
the text field

Constructor Detail

StringEditor

public StringEditor()
Method Detail

getAsText

public java.lang.String getAsText()
Returns the String value.

Specified by:
getAsText in interface java.beans.PropertyEditor

setAsText

public void setAsText(java.lang.String value)
Sets the given value.

Specified by:
setAsText in interface java.beans.PropertyEditor

getCustomEditor

public java.awt.Component getCustomEditor()
Returns the custom editing component.

Specified by:
getCustomEditor in interface java.beans.PropertyEditor

createEditingComponent

protected void createEditingComponent()
Creates and sets the editing component.


setValue

public void setValue(java.lang.Object value)
Sets the given value.

Specified by:
setValue in interface java.beans.PropertyEditor

updateValues

protected void updateValues()
Updates the text field to stored value.


focusLost

public void focusLost(java.awt.event.FocusEvent event)
Invoked when the a text field loses its focus. Sets the value of the textfield.

Specified by:
focusLost in interface java.awt.event.FocusListener

focusGained

public void focusGained(java.awt.event.FocusEvent event)
Invoked when the a text field gained its focus. Selects the textfield.

Specified by:
focusGained in interface java.awt.event.FocusListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Invoked when the a text field changed its value.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

setValue

protected void setValue()
Sets the value according to the strings given within the text fields.