|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.qapp.gjsaadminclient.AbstractEditElement
General implementation of an edit element for the GJSA server settings editor. This generic ancestor class for the read editors implements most of the business logic. The derived "real" editors do only have to implement the parts which define the actual edit component and transferring the data to and from it. For this, an additional set of abstract methods is defined which are to be implemented by the ancestors.
Nested Class Summary | |
protected class |
AbstractEditElement.DCL
Helper class for edit components to easily propagate value changes through the rest of the system. |
protected class |
AbstractEditElement.EFL
Helper class for edit component to easily start help text showing. |
protected class |
AbstractEditElement.ML
Internal helper class for help text showing. |
Field Summary | |
private boolean |
darkelement
|
protected java.awt.event.ActionListener |
editcomponental
|
protected javax.swing.JLabel |
editlabel
|
protected java.lang.String |
helptext
|
private boolean |
lastchangesend
|
protected java.lang.Object |
oldvalue
|
protected java.beans.PropertyChangeSupport |
pcs
|
protected java.lang.String |
propertyname
|
protected java.util.ResourceBundle |
rb
|
protected javax.swing.JButton |
resetbutton
|
protected javax.swing.JButton |
transferbutton
|
Constructor Summary | |
protected |
AbstractEditElement()
|
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Add a listener for property changed of the edit element. |
void |
addTransferActionListener(java.awt.event.ActionListener al)
Add a listener to the "transfer" button. |
protected void |
checkButtons()
|
void |
finalizeChange()
Called if a change in the edit element has been transferred to the server and by this way has been made permanent. |
protected void |
fireIsChangedChange()
|
protected abstract javax.swing.JComponent |
getEditComponent()
Create the edit component and return it. |
java.lang.String |
getPropertyName()
Return the name/key of the property. |
java.lang.Object |
getValue()
Return the current value of the property in the edit element. |
protected abstract java.lang.Object |
getValueFromEditComponent()
Get edited value out of the edit component. |
boolean |
isChanged()
Return whether the property has been changed in the edit element. |
protected boolean |
isEqualInNonNullCase(java.lang.Object oldvalue,
java.lang.Object newvalue)
Comparison of old and new value. |
void |
realize(javax.swing.JPanel p,
java.lang.String propname,
boolean darkelementx,
java.lang.String title,
java.lang.String explanation)
Finish the edit element's setup and show it in the embedding panel. |
protected void |
resetChange()
|
void |
setValue(java.lang.Object data)
Set the propertie's value. |
protected abstract void |
setValueInEditComponent(java.lang.Object value)
Pass value of the property to the edit component in an appropriate way. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.ResourceBundle rb
protected java.beans.PropertyChangeSupport pcs
protected javax.swing.JButton transferbutton
protected javax.swing.JButton resetbutton
protected javax.swing.JLabel editlabel
protected java.lang.String propertyname
protected java.lang.String helptext
protected java.lang.Object oldvalue
protected java.awt.event.ActionListener editcomponental
private boolean lastchangesend
private boolean darkelement
Constructor Detail |
protected AbstractEditElement()
Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
EditElement
addPropertyChangeListener
in interface EditElement
pcl
- Listener for property change eventspublic void addTransferActionListener(java.awt.event.ActionListener al)
EditElement
addTransferActionListener
in interface EditElement
al
- Listener for the "transfer" button.public void realize(javax.swing.JPanel p, java.lang.String propname, boolean darkelementx, java.lang.String title, java.lang.String explanation)
EditElement
realize
in interface EditElement
p
- Panel to put the components of the edit element in.propname
- Internal name/key of the component to show.darkelementx
- Flag whether this is a property for which the server does not disclose the current setting.title
- Human-readable name/title of the property. May be empty or null.explanation
- Human-readable explanation of the property. May be empty or null.public java.lang.String getPropertyName()
EditElement
getPropertyName
in interface EditElement
public java.lang.Object getValue()
EditElement
getValue
in interface EditElement
protected boolean isEqualInNonNullCase(java.lang.Object oldvalue, java.lang.Object newvalue)
oldvalue
- First data to be compared. Must not be null.newvalue
- Second data to be compared. Must not be null.
public boolean isChanged()
EditElement
isChanged
in interface EditElement
protected void checkButtons()
public void finalizeChange()
EditElement
finalizeChange
in interface EditElement
protected void resetChange()
public void setValue(java.lang.Object data)
EditElement
setValue
in interface EditElement
data
- Current value of the property in the server.protected void fireIsChangedChange()
protected abstract javax.swing.JComponent getEditComponent()
protected abstract void setValueInEditComponent(java.lang.Object value)
value
- Value to show in the edit componentprotected abstract java.lang.Object getValueFromEditComponent()
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |