ilog.views.maps.projection
Class IlvCoordinateEditor

java.lang.Object
  extended by ilog.views.maps.projection.IlvCoordinateEditor
All Implemented Interfaces:
PropertyEditor
Direct Known Subclasses:
IlvLatitudeEditor, IlvLongitudeEditor

public abstract class IlvCoordinateEditor
extends Object
implements PropertyEditor

IlvCoordinateEditor is the abstract base class for classes used to edit coordinate values in degrees, minutes and seconds. Use the following subclasses of IlvCoordinateEditor as coordinate editors:

Since:
JViews 8.1

Field Summary
protected  double current
          The value currently being edited.
 
Constructor Summary
IlvCoordinateEditor()
          Creates a new IlvCoordinateEditor instance.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          
 void firePropertyChange(double old, double newval)
          Fires a PropertyChangeEvent to all listeners attached to this property editor.
 Component getCustomEditor()
          Returns the custom editor for this property editor.
 String getJavaInitializationString()
          
 String[] getTags()
          Returns the tags for this property editor.
 Object getValue()
          Returns the current value of this editor.
 boolean isPaintable()
          Tests if this property editor is paintable.
 void paintValue(Graphics g, Rectangle r)
          This base method does nothing, the editor is not paintable.
 void removePropertyChangeListener(PropertyChangeListener listener)
          
 void setAsText(String text)
          Changes the value of the editor from a text String.
 void setValue(Object value)
          Changes the value of the editor.
 boolean supportsCustomEditor()
          Tests if this property editor supports a custom editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyEditor
getAsText
 

Field Detail

current

protected double current
The value currently being edited.

Constructor Detail

IlvCoordinateEditor

public IlvCoordinateEditor()
Creates a new IlvCoordinateEditor instance.

Method Detail

setValue

public void setValue(Object value)
Changes the value of the editor.

Specified by:
setValue in interface PropertyEditor
Parameters:
value - The new value to be edited.
See Also:
PropertyEditor.setValue(java.lang.Object)

getValue

public Object getValue()
Returns the current value of this editor.

Specified by:
getValue in interface PropertyEditor
Returns:
The current value of this editor.
See Also:
PropertyEditor.getValue()

isPaintable

public boolean isPaintable()
Tests if this property editor is paintable.

Note: this base class in not paintable.

Specified by:
isPaintable in interface PropertyEditor
Returns:
This default base class always returns false.
See Also:
PropertyEditor.isPaintable()

paintValue

public void paintValue(Graphics g,
                       Rectangle r)
This base method does nothing, the editor is not paintable.

Specified by:
paintValue in interface PropertyEditor
Parameters:
g - Unused.
r - Unused.
See Also:
PropertyEditor.paintValue(java.awt.Graphics, java.awt.Rectangle)

getJavaInitializationString

public String getJavaInitializationString()

Specified by:
getJavaInitializationString in interface PropertyEditor
Returns:
This method always returns "0";
See Also:
PropertyEditor.getJavaInitializationString()

setAsText

public void setAsText(String text)
               throws IllegalArgumentException
Changes the value of the editor from a text String.

This method decodes text using IlvProjectionUtil.DMSToRadian(java.lang.String).

Specified by:
setAsText in interface PropertyEditor
Parameters:
text - The new coordinate string.
Throws:
IllegalArgumentException - if text cannot be decoded by IlvProjectionUtil.
See Also:
PropertyEditor.setAsText(java.lang.String)

getTags

public String[] getTags()
Returns the tags for this property editor.

Note: this base class does not support tags.

Specified by:
getTags in interface PropertyEditor
Returns:
This default base class always returns null.
See Also:
PropertyEditor.getTags()

getCustomEditor

public Component getCustomEditor()
Returns the custom editor for this property editor.

Note: this base class does not support a custom editor.

Specified by:
getCustomEditor in interface PropertyEditor
Returns:
This default base class always returns null.
See Also:
PropertyEditor.getCustomEditor(), supportsCustomEditor()

supportsCustomEditor

public boolean supportsCustomEditor()
Tests if this property editor supports a custom editor.

Note: this base class does not support a custom editor.

Specified by:
supportsCustomEditor in interface PropertyEditor
Returns:
This default base class always returns false.
See Also:
PropertyEditor.supportsCustomEditor()

firePropertyChange

public void firePropertyChange(double old,
                               double newval)
Fires a PropertyChangeEvent to all listeners attached to this property editor.

Parameters:
old - The old property value
newval - The new property value.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)

Specified by:
addPropertyChangeListener in interface PropertyEditor
See Also:
PropertyEditor.addPropertyChangeListener(java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)

Specified by:
removePropertyChangeListener in interface PropertyEditor
See Also:
PropertyEditor.removePropertyChangeListener(java.beans.PropertyChangeListener)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.