Package adams.gui.goe
Class BaseCharsetEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.BaseCharsetEditor
-
- All Implemented Interfaces:
MultiSelectionEditor
,PropertyEditor
public class BaseCharsetEditor extends PropertyEditorSupport implements MultiSelectionEditor
A PropertyEditor that displays charsets.CharsetHelper.CHARSET_DEFAULT
is a placeholder for the system's default charset.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description BaseCharsetEditor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAsText()
Gets the current value as text.String
getJavaInitializationString()
Returns a description of the property value as java source.Object[]
getSelectedObjects(Container parent)
Returns the selected objects.String[]
getTags()
Gets the list of tags that can be selected from.void
setAsText(String text)
Sets the current property value as text.static String
toString(AbstractOption option, Object object)
Returns the charset as string.static Object
valueOf(AbstractOption option, String str)
Returns a charset generated from the string.-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getSource, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
-
-
-
Method Detail
-
toString
public static String toString(AbstractOption option, Object object)
Returns the charset as string.- Parameters:
option
- the current optionobject
- the locale object to convert- Returns:
- the generated string
-
valueOf
public static Object valueOf(AbstractOption option, String str)
Returns a charset generated from the string.- Parameters:
option
- the current optionstr
- the string to convert to a locale- Returns:
- the generated locale
-
getJavaInitializationString
public String getJavaInitializationString()
Returns a description of the property value as java source.- Specified by:
getJavaInitializationString
in interfacePropertyEditor
- Overrides:
getJavaInitializationString
in classPropertyEditorSupport
- Returns:
- a value of type 'String'
-
getAsText
public String getAsText()
Gets the current value as text.- Specified by:
getAsText
in interfacePropertyEditor
- Overrides:
getAsText
in classPropertyEditorSupport
- Returns:
- a value of type 'String'
-
setAsText
public void setAsText(String text)
Sets the current property value as text.- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
- Parameters:
text
- the text of the selected tag.
-
getTags
public String[] getTags()
Gets the list of tags that can be selected from.- Specified by:
getTags
in interfacePropertyEditor
- Overrides:
getTags
in classPropertyEditorSupport
- Returns:
- an array of string tags.
-
getSelectedObjects
public Object[] getSelectedObjects(Container parent)
Returns the selected objects.- Specified by:
getSelectedObjects
in interfaceMultiSelectionEditor
- Parameters:
parent
- the parent container- Returns:
- the objects
-
-