biz.chitec.qapp.gjsaadminclient
Class MapOfListsEditElement
java.lang.Object
biz.chitec.qapp.gjsaadminclient.AbstractEditElement
biz.chitec.qapp.gjsaadminclient.StringEditElement
biz.chitec.qapp.gjsaadminclient.ListEditElement
biz.chitec.qapp.gjsaadminclient.MapOfListsEditElement
- All Implemented Interfaces:
- EditElement
- public class MapOfListsEditElement
- extends ListEditElement
Editor for properties which are maps of lists of strings.
The data is represented as one string where the elements are seperated by semicolons. Key and value are seperated by "=".
The list elements are seperated by commas.
- Version:
- $Id: e15c72733f34265f8c798c0faeae52f5f388c77c $
- Author:
- cantamen/Dirk Hillbrecht 2007. Released under the GPL.
Method Summary |
protected javax.swing.JComponent |
getEditComponent()
Create the edit component and return it.
|
protected java.lang.Object |
getValueFromEditComponent()
Get edited value out of the edit component.
|
protected boolean |
isEqualInNonNullCase(java.lang.Object oldvalue,
java.lang.Object newvalue)
Comparison of old and new value.
|
protected java.lang.String |
mapToString(java.util.Map m)
|
protected void |
setValueInEditComponent(java.lang.Object value)
Pass value of the property to the edit component in an appropriate way.
|
protected java.util.Map |
stringToMap(java.lang.String stri)
|
protected java.util.Map |
stringToMap(java.lang.String stri,
boolean settextfieldcolor)
|
Methods inherited from class biz.chitec.qapp.gjsaadminclient.AbstractEditElement |
addPropertyChangeListener, addTransferActionListener, checkButtons, finalizeChange, fireIsChangedChange, getPropertyName, getValue, isChanged, realize, resetChange, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
originaltextcolor
private java.awt.Color originaltextcolor
MapOfListsEditElement
public MapOfListsEditElement()
getEditComponent
protected javax.swing.JComponent getEditComponent()
- Description copied from class:
AbstractEditElement
- Create the edit component and return it.
Only called once per instance. Returns the actual edit element and performs certain initialisation steps on it.
It's up to the derived implementation to do the right things with the edit component in advance.
- Overrides:
getEditComponent
in class StringEditElement
mapToString
protected java.lang.String mapToString(java.util.Map m)
isEqualInNonNullCase
protected boolean isEqualInNonNullCase(java.lang.Object oldvalue,
java.lang.Object newvalue)
- Description copied from class:
AbstractEditElement
- Comparison of old and new value.
Default implementation uses equals(). For complex data types, different approach could be needed.
- Overrides:
isEqualInNonNullCase
in class AbstractEditElement
- Parameters:
oldvalue
- First data to be compared. Must not be null.newvalue
- Second data to be compared. Must not be null.
- Returns:
- true if both data are contentwise equal, false otherwise.
setValueInEditComponent
protected void setValueInEditComponent(java.lang.Object value)
- Description copied from class:
AbstractEditElement
- Pass value of the property to the edit component in an appropriate way.
The representation of the value to be edited is up to the edit component and completely encapsulated in this method.
- Overrides:
setValueInEditComponent
in class ListEditElement
stringToMap
protected java.util.Map stringToMap(java.lang.String stri)
stringToMap
protected java.util.Map stringToMap(java.lang.String stri,
boolean settextfieldcolor)
getValueFromEditComponent
protected java.lang.Object getValueFromEditComponent()
- Description copied from class:
AbstractEditElement
- Get edited value out of the edit component.
The value has to be converted from the representation in the edit component to real representation.
- Overrides:
getValueFromEditComponent
in class ListEditElement