ilog.views.maps.beans.editor
Class IlvPercentPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by ilog.views.maps.beans.editor.IlvPercentPropertyEditor
All Implemented Interfaces:
PropertyEditor

public class IlvPercentPropertyEditor
extends PropertyEditorSupport

An editor for a double value containing percentage (by default between 0 and 200%).

Since:
JViews 7.5

Constructor Summary
IlvPercentPropertyEditor()
          Creates a new IlvPercentPropertyEditor with 0-200 range.
IlvPercentPropertyEditor(int minValue, int maxValue)
          Creates a new IlvPercentPropertyEditor with specified range.
 
Method Summary
 String getAsText()
          
 Component getCustomEditor()
          
 String getJavaInitializationString()
          
 Object getValue()
          
 boolean isPaintable()
          This property does not require specific painting.
 void paintValue(Graphics gfx, Rectangle box)
          No specific painting done.
 void setValue(Object value)
          
 boolean supportsCustomEditor()
          This property editor supports a custom editor.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getSource, getTags, removePropertyChangeListener, setAsText, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvPercentPropertyEditor

public IlvPercentPropertyEditor()
Creates a new IlvPercentPropertyEditor with 0-200 range.


IlvPercentPropertyEditor

public IlvPercentPropertyEditor(int minValue,
                                int maxValue)
Creates a new IlvPercentPropertyEditor with specified range.

Parameters:
minValue - minimum percent
maxValue - maximum percent
Method Detail

getCustomEditor

public Component getCustomEditor()

Specified by:
getCustomEditor in interface PropertyEditor
Overrides:
getCustomEditor in class PropertyEditorSupport
Returns:
Returns a JPanel containing a text and slider.
See Also:
PropertyEditorSupport.getCustomEditor()

getJavaInitializationString

public String getJavaInitializationString()

Specified by:
getJavaInitializationString in interface PropertyEditor
Overrides:
getJavaInitializationString in class PropertyEditorSupport
See Also:
PropertyEditorSupport.getJavaInitializationString()

isPaintable

public boolean isPaintable()
This property does not require specific painting.

Specified by:
isPaintable in interface PropertyEditor
Overrides:
isPaintable in class PropertyEditorSupport
Returns:
Returns false
See Also:
PropertyEditorSupport.isPaintable()

paintValue

public void paintValue(Graphics gfx,
                       Rectangle box)
No specific painting done.

Specified by:
paintValue in interface PropertyEditor
Overrides:
paintValue in class PropertyEditorSupport
See Also:
PropertyEditorSupport.paintValue(java.awt.Graphics, java.awt.Rectangle)

supportsCustomEditor

public boolean supportsCustomEditor()
This property editor supports a custom editor.

Specified by:
supportsCustomEditor in interface PropertyEditor
Overrides:
supportsCustomEditor in class PropertyEditorSupport
Returns:
Returns true
See Also:
PropertyEditorSupport.supportsCustomEditor()

setValue

public void setValue(Object value)

Specified by:
setValue in interface PropertyEditor
Overrides:
setValue in class PropertyEditorSupport
See Also:
PropertyEditorSupport.setValue(java.lang.Object)

getAsText

public String getAsText()

Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport
See Also:
PropertyEditorSupport.getAsText()

getValue

public Object getValue()

Specified by:
getValue in interface PropertyEditor
Overrides:
getValue in class PropertyEditorSupport
See Also:
PropertyEditorSupport.getValue()


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