|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.rwt.lifecycle.WidgetLCAUtil
public final class WidgetLCAUtil
Utility class that provides a number of useful static methods to support the
implementation of life cycle adapters (LCAs) for Widget
s.
ControlLCAUtil
Method Summary | |
---|---|
static java.lang.String |
escapeText(java.lang.String text,
boolean mnemonics)
Deprecated. As of RAP 1.5, all texts are transferred to the client as JSON strings and escaped on the client as needed. |
static java.lang.String[] |
getStyles(Widget widget,
java.lang.String[] styles)
Obtains a list of SWT style flags that are present in the given widget. |
static boolean |
hasChanged(Widget widget,
java.lang.String property,
java.lang.Object newValue)
Determines whether the property of the given widget has changed during the processing of the current request and thus the changes must be rendered in the response. |
static boolean |
hasChanged(Widget widget,
java.lang.String property,
java.lang.Object newValue,
java.lang.Object defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and thus the changes must be rendered in the response. |
static void |
preserveBackground(Widget widget,
Color background)
Preserves the value of the property background of the
specified widget. |
static void |
preserveBackground(Widget widget,
Color background,
boolean transparency)
Preserves the value of the property background of the
specified widget. |
static void |
preserveBackgroundGradient(Widget widget)
Preserves the background gradient properties of the specified widget. |
static void |
preserveBounds(Widget widget,
Rectangle bounds)
Preserves the value of the property bounds of the
specified widget. |
static void |
preserveCustomVariant(Widget widget)
Preserves the value of the custom variant of the specified widget. |
static void |
preserveEnabled(Widget widget,
boolean enabled)
Preserves the value of the property enabled of the specified
widget. |
static void |
preserveFont(Widget widget,
Font font)
Preserves the value of the property font of the specified
widget. |
static void |
preserveForeground(Widget widget,
Color foreground)
Preserves the value of the property foreground of the
specified widget. |
static void |
preserveHelpListener(Widget widget)
Preserves whether the given widget has one or more
HelpListener s attached. |
static void |
preserveListener(Widget widget,
java.lang.String listener,
boolean value)
Preserves the value of the listener of the specified widget. |
static void |
preserveProperty(Widget widget,
java.lang.String property,
boolean value)
Preserves the value of the property of the specified widget. |
static void |
preserveProperty(Widget widget,
java.lang.String property,
int value)
Preserves the value of the property of the specified widget. |
static void |
preserveProperty(Widget widget,
java.lang.String property,
java.lang.Object value)
Preserves the value of the property of the specified widget. |
static void |
preserveRoundedBorder(Widget widget)
Preserves the rounded border properties of the specified widget. |
static void |
preserveToolTipText(Widget widget,
java.lang.String toolTip)
Preserves the value of the property toolTipText of the
specified widget. |
static void |
processHelp(Widget widget)
Process a HelpEvent if the current request specifies that
there occurred a help event for the given widget . |
static Rectangle |
readBounds(java.lang.String widgetId,
Rectangle defaultValue)
Reads the bounds of the widget specified by its id from the current request. |
static Rectangle |
readBounds(Widget widget,
Rectangle defaultValue)
Reads the bounds of the specified widget from the current request. |
static java.lang.String |
readPropertyValue(Widget widget,
java.lang.String property)
Reads the value of the specified property for the specified widget from the request that is currently processed. |
static void |
renderBackground(Widget widget,
Color newColor)
Determines whether the property background of the given
widget has changed during the processing of the current request and if so,
writes a protocol message to the response that updates the client-side
background property of the specified widget. |
static void |
renderBackground(Widget widget,
Color background,
boolean transparency)
Determines whether the property background of the given
widget has changed during the processing of the current request and if so,
writes a protocol message to the response that updates the client-side
background property of the specified widget. |
static void |
renderBackgroundGradient(Widget widget)
Determines whether the background gradient properties of the given widget have changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side background gradient properties of the specified widget. |
static void |
renderBounds(Widget widget,
Rectangle bounds)
Determines whether the bounds of the given widget have changed during the processing of the current request and if so, writes a set operation the response that updates the client-side bounds of the specified widget. |
static void |
renderCustomVariant(Widget widget)
Determines whether the custom variant of the given widget has changed during the processing of the current request and if so, writes a protocol Message to the response that updates the client-side variant. |
static void |
renderEnabled(Widget widget,
boolean enabled)
Determines whether the property enabled of the given widget
has changed during the processing of the current request and if so, writes
a protocol message to the response that updates the client-side enabled
property of the specified widget. |
static void |
renderFont(Widget widget,
Font font)
Determines whether the property font of the given widget has
changed during the processing of the current request and if so, writes
JavaScript code to the response that updates the client-side font property
of the specified widget. |
static void |
renderForeground(Widget widget,
Color newColor)
Determines whether the property foreground of the given
widget has changed during the processing of the current request and if so,
writes a protocol message to the response that updates the client-side
foreground property of the specified widget. |
static void |
renderListener(Widget widget,
java.lang.String listener,
boolean newValue,
boolean defaultValue)
Determines whether the listener of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side listener of the specified widget. |
static void |
renderListenHelp(Widget widget)
Adds or removes client-side help listeners for the the given widget as necessary. |
static void |
renderMenu(Widget widget,
Menu menu)
Determines whether the property menu of the given widget has
changed during the processing of the current request and if so, writes
a protocol message to the response that updates the client-side menu property
of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
boolean newValue,
boolean defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
Color[] newValue,
Color[] defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
Color newValue,
Color defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
Font[] newValue,
Font[] defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
Image[] newValue,
Image[] defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
Image newValue,
Image defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
int newValue,
int defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
java.lang.Object newValue,
java.lang.Object defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
Point newValue,
Point defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
Rectangle newValue,
Rectangle defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderProperty(Widget widget,
java.lang.String property,
Widget newValue,
Widget defaultValue)
Determines whether the property of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side property of the specified widget. |
static void |
renderRoundedBorder(Widget widget)
Determines whether the rounded border properties of the given widget has changed during the processing of the current request and if so, writes a protocol message to the response that updates the client-side rounded border of the specified widget. |
static void |
renderToolTip(Widget widget,
java.lang.String toolTip)
Determines whether the property toolTip of the given widget
has changed during the processing of the current request and if so, writes
a protocol message to the response that updates the client-side toolTip
property of the specified widget. |
static java.lang.String |
replaceNewLines(java.lang.String input,
java.lang.String replacement)
Replaces all newline characters in the specified input string with the given replacement string. |
static boolean |
wasEventSent(Widget widget,
java.lang.String eventName)
Determines whether an event with the specified name was submitted for the specified widget within the current request. |
static void |
writeBackground(Widget widget,
Color newColor)
Deprecated. Use renderBackground(Widget, Color) instead |
static void |
writeBackground(Widget widget,
Color background,
boolean transparency)
Deprecated. Use renderBackground(Widget, Color) instead |
static void |
writeBackgroundGradient(Widget widget)
Deprecated. Use renderBackgroundGradient(Widget) instead |
static void |
writeBounds(Widget widget,
Control parent,
Rectangle bounds)
Deprecated. Use renderBounds(Widget, Rectangle) instead |
static void |
writeCustomVariant(Widget widget)
Deprecated. Use renderCustomVariant(Widget) instead |
static void |
writeEnabled(Widget widget,
boolean enabled)
Deprecated. Use renderEnabled(Widget, boolean) instead |
static void |
writeFont(Widget widget,
Font font)
Deprecated. Use renderFont(Widget, Font) instead |
static void |
writeForeground(Widget widget,
Color newColor)
Deprecated. Use renderForeground(Widget, Color) instead |
static void |
writeHelpListener(Widget widget)
Deprecated. Use renderListenHelp(Widget) instead |
static void |
writeImage(Widget widget,
Image image)
Deprecated. Use renderProperty(Widget, String, Image, Image) intead |
static void |
writeImage(Widget widget,
java.lang.String jsProperty,
Image image)
Deprecated. Use renderProperty(Widget, String, Image, Image) intead |
static void |
writeImage(Widget widget,
java.lang.String javaProperty,
java.lang.String jsProperty,
Image image)
Deprecated. Use renderProperty(Widget, String, Image, Image) intead |
static void |
writeMenu(Widget widget,
Menu menu)
Deprecated. Use renderMenu(Widget, Menu) instead |
static void |
writeRoundedBorder(Widget widget)
Deprecated. Use renderRoundedBorder(Widget) instead |
static void |
writeStyleFlag(Widget widget,
int style,
java.lang.String styleName)
Deprecated. Use getStyles(Widget, String[]) to obtain the list of
styles instead and set the result to the property
style |
static void |
writeToolTip(Widget widget,
java.lang.String toolTip)
Deprecated. Use renderToolTip(Widget, String) instead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Rectangle readBounds(Widget widget, Rectangle defaultValue)
widget
- the widget whose bounds to readdefaultValue
- the default bounds
public static Rectangle readBounds(java.lang.String widgetId, Rectangle defaultValue)
widgetId
- the widget id of the widget whose bounds to readdefaultValue
- the default bounds
public static void processHelp(Widget widget)
HelpEvent
if the current request specifies that
there occurred a help event for the given widget
.
widget
- the widget to processpublic static void preserveBounds(Widget widget, Rectangle bounds)
bounds
of the
specified widget.
widget
- the widget whose bounds property to preservebounds
- the value to preservewriteBounds(Widget, Control, Rectangle)
public static void preserveEnabled(Widget widget, boolean enabled)
enabled
of the specified
widget.
widget
- the widget whose enabled property to preserveenabled
- the value to preservewriteEnabled(Widget, boolean)
public static void preserveToolTipText(Widget widget, java.lang.String toolTip)
toolTipText
of the
specified widget.
widget
- the widget whose toolTip property to preservetoolTip
- the value to preservewriteToolTip(Widget, String)
public static void preserveFont(Widget widget, Font font)
font
of the specified
widget.
widget
- the widget whose font property to preservefont
- the value to preservewriteFont(Widget, Font)
public static void preserveForeground(Widget widget, Color foreground)
foreground
of the
specified widget.
widget
- the widget whose foreground property to preserveforeground
- the value to preservewriteForeground(Widget, Color)
public static void preserveBackground(Widget widget, Color background)
background
of the
specified widget.
widget
- the widget whose background property to preservebackground
- the value to preservewriteBackground(Widget, Color)
public static void preserveBackground(Widget widget, Color background, boolean transparency)
background
of the
specified widget.
widget
- the widget whose background property to preservebackground
- the background color to preservetransparency
- the background transparency to preservewriteBackground(Widget, Color, boolean)
public static void preserveBackgroundGradient(Widget widget)
widget
- the widget whose background gradient properties to preservewriteBackgroundGradient(Widget)
public static void preserveRoundedBorder(Widget widget)
widget
- the widget whose rounded border properties to preservewriteRoundedBorder(Widget)
public static void preserveCustomVariant(Widget widget)
widget
- the widget whose custom variant to preservewriteCustomVariant(Widget)
public static void preserveHelpListener(Widget widget)
widget
has one or more
HelpListener
s attached.
widget
- the widget to preservepublic static void renderBounds(Widget widget, Rectangle bounds)
Control
, use the method
ControlLCAUtil.renderBounds(Control)
instead.
widget
- the widget whose bounds to writebounds
- the new bounds of the widgetpublic static void renderEnabled(Widget widget, boolean enabled)
enabled
of the given widget
has changed during the processing of the current request and if so, writes
a protocol message to the response that updates the client-side enabled
property of the specified widget. For instances of Control
, use
the method ControlLCAUtil.writeEnabled(Control)
instead.
widget
- the widget whose enabled property to setenabled
- the new value of the propertypreserveEnabled(Widget, boolean)
public static void renderCustomVariant(Widget widget)
widget
- the widget whose custom variant to writepublic static void renderListenHelp(Widget widget)
widget
as necessary.
widget
- public static void renderMenu(Widget widget, Menu menu)
menu
of the given widget has
changed during the processing of the current request and if so, writes
a protocol message to the response that updates the client-side menu property
of the specified widget. For instances of Control
, use the method
ControlLCAUtil.writeMenu(Control)
instead.
widget
- the widget whose menu property to setmenu
- the new value of the propertypublic static void renderToolTip(Widget widget, java.lang.String toolTip)
toolTip
of the given widget
has changed during the processing of the current request and if so, writes
a protocol message to the response that updates the client-side toolTip
property of the specified widget. For instances of Control
, use
the method ControlLCAUtil.writeToolTip(Control)
instead.
widget
- the widget whose toolTip property to settoolTip
- the new value of the propertypreserveToolTipText(Widget, String)
public static void renderFont(Widget widget, Font font)
font
of the given widget has
changed during the processing of the current request and if so, writes
JavaScript code to the response that updates the client-side font property
of the specified widget. For instances of Control
, use the method
ControlLCAUtil.writeFont(Control)
instead.
widget
- the widget whose font property to setfont
- the new value of the propertypreserveFont(Widget, Font)
public static void renderForeground(Widget widget, Color newColor)
foreground
of the given
widget has changed during the processing of the current request and if so,
writes a protocol message to the response that updates the client-side
foreground property of the specified widget. For instances of
Control
, use the method
ControlLCAUtil.writeForeground(Control)
instead.
widget
- the widget whose foreground property to setnewColor
- the new value of the propertypreserveForeground(Widget, Color)
public static void renderBackground(Widget widget, Color newColor)
background
of the given
widget has changed during the processing of the current request and if so,
writes a protocol message to the response that updates the client-side
background property of the specified widget. For instances of
Control
, use the method
ControlLCAUtil.writeBackground(Control)
instead.
widget
- the widget whose background property to setnewColor
- the new value of the propertypreserveBackground(Widget, Color)
public static void renderBackground(Widget widget, Color background, boolean transparency)
background
of the given
widget has changed during the processing of the current request and if so,
writes a protocol message to the response that updates the client-side
background property of the specified widget. For instances of
Control
, use the method
ControlLCAUtil.writeBackground(Control)
instead.
widget
- the widget whose background property to setbackground
- the new background colortransparency
- the new background transparency, if true
,
the background
parameter is ignoredpreserveBackground(Widget, Color, boolean)
public static void renderBackgroundGradient(Widget widget)
widget
- the widget whose background gradient properties to setpreserveBackgroundGradient(Widget)
public static void renderRoundedBorder(Widget widget)
widget
- the widget whose rounded border properties to setpreserveRoundedBorder(Widget)
public static java.lang.String readPropertyValue(Widget widget, java.lang.String property)
null
is returned.
widget
- the widget whose property to readproperty
- the name of the property to read
null
if no value
was submitted for the given propertypublic static boolean wasEventSent(Widget widget, java.lang.String eventName)
widget
- the widget that should receive the eventeventName
- the name of the event to check for
true
if the event was sent for the widget, false
otherwise.public static void preserveProperty(Widget widget, java.lang.String property, java.lang.Object value)
widget
- the widget whose property to preserveproperty
- the name of the propertyvalue
- the value to preservepublic static void preserveProperty(Widget widget, java.lang.String property, int value)
widget
- the widget whose property to preserveproperty
- the name of the propertyvalue
- the value to preservepublic static void preserveProperty(Widget widget, java.lang.String property, boolean value)
widget
- the widget whose property to preserveproperty
- the name of the propertyvalue
- the value to preservepublic static void preserveListener(Widget widget, java.lang.String listener, boolean value)
widget
- the widget whose listener to preservelistener
- the type of the listenervalue
- the value to preservepublic static void renderProperty(Widget widget, java.lang.String property, java.lang.Object newValue, java.lang.Object defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, int newValue, int defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, boolean newValue, boolean defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, Image newValue, Image defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, Image[] newValue, Image[] defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, Color newValue, Color defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, Color[] newValue, Color[] defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, Font[] newValue, Font[] defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, Point newValue, Point defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, Rectangle newValue, Rectangle defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderProperty(Widget widget, java.lang.String property, Widget newValue, Widget defaultValue)
widget
- the widget whose property to setproperty
- the property namenewValue
- the new value of the propertydefaultValue
- the default value of the propertypublic static void renderListener(Widget widget, java.lang.String listener, boolean newValue, boolean defaultValue)
widget
- the widget whose property to setlistener
- the listener typenewValue
- the new value of the listener (true if listener is attached, false otherwise)defaultValue
- the default value of the listenerpublic static boolean hasChanged(Widget widget, java.lang.String property, java.lang.Object newValue)
If there is no preserved value, null
is assumed.
widget
- the widget whose property is to be compared, must not be
null
.property
- the name of the property under which the preserved value
can be looked up. Must not be null
.newValue
- the value to compare the preserved value with
true
if the property has changed, false
otherwisepublic static boolean hasChanged(Widget widget, java.lang.String property, java.lang.Object newValue, java.lang.Object defaultValue)
In case it is the first time that the widget is rendered (it is not yet
present on the client side) true
is only returned if the
newValue
differs from the defaultValue
.
Otherwise the decision is delegated to
hasChanged(Widget,String,Object)
.
widget
- the widget whose property is to be compared, must not be
null
.property
- the name of the property under which the preserved value
can be looked up. Must not be null
.newValue
- the value that is compared to the preserved valuedefaultValue
- the default value
true
if the property has changed or if the widget is
not yet initialized and the property is at its default value,
false
otherwisepublic static java.lang.String replaceNewLines(java.lang.String input, java.lang.String replacement)
input
- the string to processreplacement
- the string to replace line feeds with
public static java.lang.String[] getStyles(Widget widget, java.lang.String[] styles)
widget
- the widget to get the styles forstyles
- the names of the SWT style flags to check for, elements must
be valid SWT style flags
styles
parameter
that are present in the given widget, i.e. where
( widget.getStyle() & SWT.<STYLE> ) != 0
SWT
,
Widget.getStyle()
@Deprecated public static void writeBounds(Widget widget, Control parent, Rectangle bounds) throws java.io.IOException
renderBounds(Widget, Rectangle)
instead
Control
, use the method
ControlLCAUtil.writeBounds(Control)
instead.
widget
- the widget whose bounds to writeparent
- the parent of the widget or null
if the widget
does not have a parentbounds
- the new bounds of the widget
java.io.IOException
@Deprecated public static void writeMenu(Widget widget, Menu menu) throws java.io.IOException
renderMenu(Widget, Menu)
instead
menu
of the given widget has
changed during the processing of the current request and if so, writes
JavaScript code to the response that updates the client-side menu property
of the specified widget. For instances of Control
, use the method
ControlLCAUtil.writeMenu(Control)
instead.
widget
- the widget whose menu property to setmenu
- the new value of the property
java.io.IOException
@Deprecated public static void writeToolTip(Widget widget, java.lang.String toolTip) throws java.io.IOException
renderToolTip(Widget, String)
instead
toolTip
of the given widget
has changed during the processing of the current request and if so, writes
JavaScript code to the response that updates the client-side toolTip
property of the specified widget. For instances of Control
, use
the method ControlLCAUtil.writeToolTip(Control)
instead.
widget
- the widget whose toolTip property to settoolTip
- the new value of the property
java.io.IOException
preserveToolTipText(Widget, String)
@Deprecated public static void writeImage(Widget widget, Image image) throws java.io.IOException
renderProperty(Widget, String, Image, Image)
intead
image
of the given widget
has changed during the processing of the current request and if so, writes
JavaScript code to the response that updates the client-side image property
of the specified widget.
widget
- the widget whose image property to setimage
- the new value of the property
java.io.IOException
@Deprecated public static void writeImage(Widget widget, java.lang.String javaProperty, java.lang.String jsProperty, Image image) throws java.io.IOException
renderProperty(Widget, String, Image, Image)
intead
widget
- the widget whose property to setjavaProperty
- the key of the preserved value to compare the new value
withjsProperty
- the name of the JavaScript property to setimage
- the new value of the property
java.io.IOException
@Deprecated public static void writeImage(Widget widget, java.lang.String jsProperty, Image image) throws java.io.IOException
renderProperty(Widget, String, Image, Image)
intead
widget
- the widget whose property to setjsProperty
- the name of the JavaScript property to setimage
- the new value of the property
java.io.IOException
@Deprecated public static void writeFont(Widget widget, Font font) throws java.io.IOException
renderFont(Widget, Font)
instead
font
of the given widget has
changed during the processing of the current request and if so, writes
JavaScript code to the response that updates the client-side font property
of the specified widget. For instances of Control
, use the method
ControlLCAUtil.writeFont(Control)
instead.
widget
- the widget whose font property to setfont
- the new value of the property
java.io.IOException
preserveFont(Widget, Font)
@Deprecated public static void writeForeground(Widget widget, Color newColor) throws java.io.IOException
renderForeground(Widget, Color)
instead
foreground
of the given
widget has changed during the processing of the current request and if so,
writes JavaScript code to the response that updates the client-side
foreground property of the specified widget. For instances of
Control
, use the method
ControlLCAUtil.writeForeground(Control)
instead.
widget
- the widget whose foreground property to setnewColor
- the new value of the property
java.io.IOException
preserveForeground(Widget, Color)
@Deprecated public static void writeBackground(Widget widget, Color newColor) throws java.io.IOException
renderBackground(Widget, Color)
instead
background
of the given
widget has changed during the processing of the current request and if so,
writes JavaScript code to the response that updates the client-side
background property of the specified widget. For instances of
Control
, use the method
ControlLCAUtil.writeBackground(Control)
instead.
widget
- the widget whose background property to setnewColor
- the new value of the property
java.io.IOException
preserveBackground(Widget, Color)
@Deprecated public static void writeBackground(Widget widget, Color background, boolean transparency) throws java.io.IOException
renderBackground(Widget, Color)
instead
background
of the given
widget has changed during the processing of the current request and if so,
writes JavaScript code to the response that updates the client-side
background property of the specified widget. For instances of
Control
, use the method
ControlLCAUtil.writeBackground(Control)
instead.
widget
- the widget whose background property to setbackground
- the new background colortransparency
- the new background transparency, if true
,
the background
parameter is ignored
java.io.IOException
preserveBackground(Widget, Color, boolean)
@Deprecated public static void writeBackgroundGradient(Widget widget) throws java.io.IOException
renderBackgroundGradient(Widget)
instead
widget
- the widget whose background gradient properties to set
java.io.IOException
preserveBackgroundGradient(Widget)
@Deprecated public static void writeRoundedBorder(Widget widget) throws java.io.IOException
renderRoundedBorder(Widget)
instead
widget
- the widget whose rounded border properties to set
java.io.IOException
preserveRoundedBorder(Widget)
@Deprecated public static void writeEnabled(Widget widget, boolean enabled) throws java.io.IOException
renderEnabled(Widget, boolean)
instead
enabled
of the given widget
has changed during the processing of the current request and if so, writes
JavaScript code to the response that updates the client-side enabled
property of the specified widget. For instances of Control
, use
the method ControlLCAUtil.writeEnabled(Control)
instead.
widget
- the widget whose enabled property to setenabled
- the new value of the property
java.io.IOException
preserveEnabled(Widget, boolean)
@Deprecated public static void writeCustomVariant(Widget widget) throws java.io.IOException
renderCustomVariant(Widget)
instead
widget
- the widget whose custom variant to write
java.io.IOException
@Deprecated public static void writeHelpListener(Widget widget) throws java.io.IOException
renderListenHelp(Widget)
instead
widget
as necessary.
widget
-
java.io.IOException
@Deprecated public static void writeStyleFlag(Widget widget, int style, java.lang.String styleName) throws java.io.IOException
getStyles(Widget, String[])
to obtain the list of
styles instead and set the result to the property
style
widget
- the widget whose style to writestyle
- the SWT style flag in questionstyleName
- the uppercase name of the style
java.io.IOException
@Deprecated public static java.lang.String escapeText(java.lang.String text, boolean mnemonics)
<
,
>
, &
, and "
with their
corresponding HTML entities. This function is used for rendering texts to
the client. When the parameter mnemonic is set to true
, this
method handles ampersand characters in the text as mnemonics in the same
manner as SWT does.
Note: In contrast to SWT, the characters following an ampersand are currently not underlined, as RAP doesn't support key events yet.
text
- the input textmnemonics
- if true
, the function is mnemonic aware,
otherwise all ampersand characters are directly rendered.
|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.