|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.component.Component
at.spardat.xma.component.ComponentClient
Implents the clients specific aspects of a Component. This includes the management of SWT-Resources like the Display and Images.
| Field Summary | |
static org.eclipse.swt.graphics.RGB |
errorBackground
color used to mark input fields containing errors |
static org.eclipse.swt.graphics.RGB |
errorBackgroundUneditable
color used to mark uneditable fields containing errors |
static short |
lastResGif
maximum Id reserved by the runtime. currently 100. |
static short |
resErrorGif
Id for Error-Icon |
static short |
resInfoGif
Id for Info-Icon |
static short |
resWarnGif
Id for Warning-Icon |
| Fields inherited from class at.spardat.xma.component.Component |
session_ |
| Constructor Summary | |
ComponentClient()
Constructor just for test-purpose. |
|
ComponentClient(XMASessionClient session,
boolean isStateless)
Constructor of the Component. |
|
| Method Summary | |
void |
addEventListener(at.spardat.xma.boot.component.IComponentListener listener)
Adds a ComponentListner to the listeners of the component. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the listeners of the component. |
ITask |
createTask(java.lang.String name)
Creates the Task with the given name. |
void |
dispose()
Frees all allocated recources of the Component. |
void |
externalize(XmaOutput xo,
boolean forceFull)
This method calculates the data stream necessary to update the server side component so that its state equals this client side component. |
void |
freePageModel(short idPageModel)
Frees the Page with the given ID. |
org.eclipse.swt.graphics.Color |
getColor(int red,
int green,
int blue)
Get a Color by naming its red, green and blue values. |
org.eclipse.swt.graphics.Color |
getColor(org.eclipse.swt.graphics.RGB rgb)
Get a Color by naming its red-green-blue value. |
XMAContext |
getContext()
Returns the global context. |
org.eclipse.swt.widgets.Display |
getDisplay()
Gets the Display used by all Pages in the Component. |
org.eclipse.swt.graphics.Font |
getFont(java.lang.String name,
int height,
int style)
Returns a font for the specified data that is owned by this component and automatically disposed if this component is disposed. |
org.eclipse.swt.graphics.Font |
getFontByHeight(org.eclipse.swt.graphics.Font template,
int height)
Returns a font whose name and style is taken from template and whose height is provided. |
org.eclipse.swt.graphics.Font |
getFontByStyle(org.eclipse.swt.graphics.Font template,
int style)
Returns a font whose name and height is taken from template and whose style is provided. |
java.lang.String |
getHelpUri()
Gets the URI to the help page explaining this component. |
org.eclipse.swt.graphics.Image |
getImage(short id)
Get an Image by its ID. |
org.eclipse.swt.graphics.Image |
getImage(java.lang.String resource)
Get an Image by naming its resource-file. |
java.util.Properties |
getProperties()
Gives all properties of the component. |
java.lang.String |
getProperty(java.lang.String name)
Gives the value of a property. |
at.spardat.xma.boot.component.IRtXMASessionClient |
getRTSession()
Returns the Session this belongs to (you can rely on the returned object not to be null). |
XMASessionClient |
getSession()
Returns the Session this belongs to (you can rely on the returned object not to be null). |
void |
internalize(XmaInput in)
This method gets the data stream after a server side event and applies the changes to this client side component. |
abstract void |
invoke(org.eclipse.swt.widgets.Composite parent)
This Method is called by the Launcher to start the Component on the client side. |
boolean |
isOutOfSyncWithServer()
Returns if the clients page model state is out of sync with respect to the servers state. |
protected RemoteCallClient |
newRemoteCall(java.lang.String namEvent)
Constructs a RemoteCall object to execute a
server side method with the provided name. |
void |
notifyClosed()
Notifies all listener that this component was closed. |
void |
notifyEvent(java.lang.String name,
java.lang.String value)
Notifies all listeners of the named event. |
protected void |
notifyPropertyChange(java.lang.String name,
java.lang.Object oldValue,
java.lang.Object value)
Notifies all registerd PropertyChangeListeners of a property change. |
void |
registerImage(short id,
java.lang.String resource)
Registers an image under the given id. |
void |
removeEventListener(at.spardat.xma.boot.component.IComponentListener listener)
Remove a ComponentListener form the listners of the component. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener form the listners of the component. |
void |
rpcFinished(RemoteCallClient rc,
RemoteReply reply)
Is called at the end of RemoteCallClient.execute(). |
void |
setOutOfSyncWithServer(boolean b)
Sets the out of sync state. |
void |
setProperties(java.util.Properties input)
Sets all properties of the component. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets one property of the component. |
int |
showMessage(at.spardat.enterprise.exc.INotification notification)
Displays the provided notification in a modal message box. |
| Methods inherited from class at.spardat.xma.component.Component |
commit, describe, externalizePageSet, externalizeProperties, getId, getModelClass, getName, getNumPageModels, getPageModel, getPageModels, getPropDes, getPropDes, getSCN, incrementSCN, internalizePageSet, internalizeProperties, isPageModelAlive, isStateless, model2props, props2model, registerPageModel, removePageModel, rollback, setId, setSCN, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static org.eclipse.swt.graphics.RGB errorBackground
public static org.eclipse.swt.graphics.RGB errorBackgroundUneditable
public static final short resInfoGif
public static final short resWarnGif
public static final short resErrorGif
public static final short lastResGif
| Constructor Detail |
public ComponentClient()
public ComponentClient(XMASessionClient session,
boolean isStateless)
session - the XMASession this component belongs toisStateless - defines whether this component is stateless or not.| Method Detail |
public void addEventListener(at.spardat.xma.boot.component.IComponentListener listener)
addEventListener in interface at.spardat.xma.boot.component.IComponentlistener - the new listener to registerpublic void removeEventListener(at.spardat.xma.boot.component.IComponentListener listener)
removeEventListener in interface at.spardat.xma.boot.component.IComponentlistener - the ComponentListener to removepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface at.spardat.xma.boot.component.IComponentlistener - the new listener to registerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface at.spardat.xma.boot.component.IComponentlistener - the PropertyChangeListener to removepublic void setProperties(java.util.Properties input)
setProperties in interface at.spardat.xma.boot.component.IComponentinput - the new set of properties
public void setProperty(java.lang.String name,
java.lang.String value)
setProperty in interface at.spardat.xma.boot.component.IComponentname - the name of the property to changevalue - the new value of the property
protected void notifyPropertyChange(java.lang.String name,
java.lang.Object oldValue,
java.lang.Object value)
name - The name of the property which changedoldValue - The old value of the propertyvalue - The new value of the propertypublic java.lang.String getProperty(java.lang.String name)
getProperty in interface at.spardat.xma.boot.component.IComponentname - the name of the property
public java.util.Properties getProperties()
getProperties in interface at.spardat.xma.boot.component.IComponent
public void notifyEvent(java.lang.String name,
java.lang.String value)
name - the name of the eventvalue - an optional value passed with the eventpublic void notifyClosed()
public org.eclipse.swt.widgets.Display getDisplay()
public void registerImage(short id,
java.lang.String resource)
id - the new id of the image.resource - a resource-string naming the image file.public org.eclipse.swt.graphics.Image getImage(short id)
id - one of the static final int ids defined in this class.
public org.eclipse.swt.graphics.Image getImage(java.lang.String resource)
resource - a resource-string naming the image file.
public org.eclipse.swt.graphics.Color getColor(int red,
int green,
int blue)
red - the red value of the color.green - the green value of the color.blue - the blue value of the color.
public org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.RGB rgb)
rgb - the red, green, blue values defining the color.
public org.eclipse.swt.graphics.Font getFont(java.lang.String name,
int height,
int style)
name - the name of the font (must not be null)height - the font height in pointsstyle - a bit or combination of SWT.NORMAL, SWT.BOLD, SWT.ITALIC
public org.eclipse.swt.graphics.Font getFontByHeight(org.eclipse.swt.graphics.Font template,
int height)
template - the reference font. Must not be null.height - the height in points of the return Font.
public org.eclipse.swt.graphics.Font getFontByStyle(org.eclipse.swt.graphics.Font template,
int style)
template - the reference font. Must not be null.style - the style of the font.
public java.lang.String getHelpUri()
public void dispose()
dispose in interface at.spardat.xma.boot.component.IComponentpublic void freePageModel(short idPageModel)
idPageModel - the ID of the Page to destroy.public abstract void invoke(org.eclipse.swt.widgets.Composite parent)
invoke in interface at.spardat.xma.boot.component.IComponent
public void externalize(XmaOutput xo,
boolean forceFull)
throws java.io.IOException
externalize in interface SynchronizationforceFull - the meaning here is as follows: If forceFull, we do
not trust the delta mechanism. That implies that all alive
pages are transmitted with all their widget models. So the
server side state of the component may be deliberately inconsistent
before. If forceFull is false, only changed pages or stateless pages
are transmitted.xo - the serialization destination
java.io.IOException - on serialization errorsSynchronization.externalize(at.spardat.xma.serializer.XmaOutput, boolean)
public void internalize(XmaInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
internalize in interface Synchronizationin - the XMAObjectInput. If a XMAObjectInputChangeListener is
set in the object in, it will be notified after applying
changes read from in.
java.lang.ClassNotFoundException - on serialization errors
java.io.IOException - on serialization errorsSynchronization.internalize(at.spardat.xma.serializer.XmaInput)public XMAContext getContext()
public XMASessionClient getSession()
public at.spardat.xma.boot.component.IRtXMASessionClient getRTSession()
getRTSession in interface at.spardat.xma.boot.component.IComponentpublic boolean isOutOfSyncWithServer()
This method must not be called or overwritten outside the framework.
public void setOutOfSyncWithServer(boolean b)
This method must not be called or overwritten outside the framework.
protected RemoteCallClient newRemoteCall(java.lang.String namEvent)
RemoteCall object to execute a
server side method with the provided name. The corresponding server side Component
class must have a method with the signature
void <namEvent> (RemoteCall call, RemoteReply reply)This method will be called if you call execute on the RemoteCall object returned by this.
namEvent - the name of the server side method to call
public int showMessage(at.spardat.enterprise.exc.INotification notification)
public ITask createTask(java.lang.String name)
createTask in interface IComponentClientname - unique name for the task within the component.
public void rpcFinished(RemoteCallClient rc,
RemoteReply reply)
rc - the RemoteCallClient whose execute method is about to endreply - the RemoteReply object that execute will return
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||