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 DoubleEditor  view DoubleEditor download DoubleEditor.java

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

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

This Class implements a editor for Doubles.

Version:
$Revision: 1.1.1.1 $

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
DoubleEditor()
           
 
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 Double 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

DoubleEditor

public DoubleEditor()
Method Detail

getAsText

public java.lang.String getAsText()
Returns the Double 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.