QJCC homepage

biz.chitec.qapp.gjsaadminclient
Interface EditElement

All Known Implementing Classes:
AbstractEditElement

public interface EditElement

Contract for an edit element. Each server property is represented by an appropriate edit element. This interface defines the contract which has to be obeyed by these edit elements.

Version:
$Id: b0bfce9d582e3d1de1dc964ebd5f34b1eee00415 $
Author:
cantamen/Dirk Hillbrecht 2007. Released under the GPL.

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.
 void finalizeChange()
          Called if a change in the edit element has been transferred to the server and by this way has been made permanent.
 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.
 boolean isChanged()
          Return whether the property has been changed in the edit element.
 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.
 void setValue(java.lang.Object data)
          Set the propertie's value.
 

Method Detail

realize

public 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. This method passes all information about the property to show into the edit element, apart from the actual value of the property. The edit element has to pass its contents into the given panel so that it will be shown.

Parameters:
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.

setValue

public void setValue(java.lang.Object data)
Set the propertie's value.

Parameters:
data - Current value of the property in the server.

getPropertyName

public java.lang.String getPropertyName()
Return the name/key of the property.

Returns:
Name/key of the property.

getValue

public java.lang.Object getValue()
Return the current value of the property in the edit element.

Returns:
Current value of the property in the edit element.

isChanged

public boolean isChanged()
Return whether the property has been changed in the edit element.

Returns:
True if some non-transmitted edits have been made, false otherwise.

finalizeChange

public void finalizeChange()
Called if a change in the edit element has been transferred to the server and by this way has been made permanent.


addTransferActionListener

public void addTransferActionListener(java.awt.event.ActionListener al)
Add a listener to the "transfer" button.

Parameters:
al - Listener for the "transfer" button.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Add a listener for property changed of the edit element. Property change events are sent if the change state changes or if a help text should be shown.

Parameters:
pcl - Listener for property change events

QJCC homepage