public abstract class AbstractWidgetLCA extends java.lang.Object implements WidgetLifeCycleAdapter
Constructor and Description |
---|
AbstractWidgetLCA() |
Modifier and Type | Method and Description |
---|---|
Rectangle |
adjustCoordinates(Widget widget,
Rectangle bounds)
Deprecated.
Adjustment of the widget bounds is now handled on the client.
|
void |
doRedrawFake(Control control)
As a side effect to redraw calls some native widgets trigger events like
resize for example.
|
abstract void |
preserveValues(Widget widget)
Preserves the current state of the widget in order to be able to keep track of changes.
|
void |
readData(Widget widget)
Reads changes for this widget from the message that has been received from the client.
|
void |
render(Widget widget)
Renders the changes that have been made to this widget to the message that will be sent to the
client.
|
abstract void |
renderChanges(Widget widget)
Writes a message to the response that applies the state changes of
the widget to the client.
|
void |
renderDispose(Widget widget)
Writes a message to the response that renders the disposal of the
widget.
|
abstract void |
renderInitialization(Widget widget)
Writes a message to the response that creates a new widget instance
and initializes it.
|
public final void render(Widget widget) throws java.io.IOException
WidgetLifeCycleAdapter
render
in interface WidgetLifeCycleAdapter
widget
- the widget to render changes forjava.io.IOException
@Deprecated public Rectangle adjustCoordinates(Widget widget, Rectangle bounds)
widget
- the enclosed widget whose bounds to adjustbounds
- the actual bounds of the enclosed widgetpublic void readData(Widget widget)
The default implementation of this method passes all operations for the given widget to the operation handler registered with the corresponding remote object.
readData
in interface WidgetLifeCycleAdapter
widget
- the widget to be processedpublic abstract void preserveValues(Widget widget)
WidgetLifeCycleAdapter
Implementors can use the method WidgetAdapter.preserve(String, Object)
. As a rule of
thumb, every property that is written in render
must be preserved in this method.
preserveValues
in interface WidgetLifeCycleAdapter
widget
- the widget to be processedpublic abstract void renderInitialization(Widget widget) throws java.io.IOException
renderChanges
is called for the first time.widget
- the widget to initializejava.io.IOException
public abstract void renderChanges(Widget widget) throws java.io.IOException
widget
- the widget to render changes forjava.io.IOException
public void renderDispose(Widget widget) throws java.io.IOException
widget
- the widget to disposejava.io.IOException
public void doRedrawFake(Control control)
As a side effect to redraw calls some native widgets trigger events like
resize for example. To simulate this behavior subclasses may override
this method. The method takes as parameter type Control
,
since the redraw methods are only available at the Control
subclasses of Widgets
.
Note that the redraw fake takes place between the process action and the render phase.
control
- the control on which redraw was called.
Copyright (c) EclipseSource and others 2002, 2013.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0