zk
Class AuCmd1

java.lang.Object
  extended by zk.AuCmd1

public class AuCmd1
extends java.lang.Object

The AU command handler for processes commands related to widgets, sent from the server.

See Also:
zAu.cmd1

Method Summary
 void addAft(Widget wgt, String... codes)
          Adds the widget(s) generated by evaluating the specified JavaScript code snippet after the specified widget (as sibling).
 void addAft(Widget wgt, String code)
          Adds the widget(s) generated by evaluating the specified JavaScript code snippet after the specified widget (as sibling).
 void addBfr(Widget wgt, String... codes)
          Adds the widget(s) generated by evaluating the specified JavaScript code snippet before the specified widget (as sibling).
 void addChd(Widget wgt, String... codes)
          Adds the widget(s) generated by evaluating the specified JavaScript code snippet as the last child of the specified widget.
 void echo2(Widget wgt, String evtnm, Object data)
          Ask the client to echo back an AU request with the specified evant name and the target widget.
 void focus(Widget wgt)
          Set the focus to the specified widget.
 void invoke(Widget wgt, String func, Object... vararg)
          Invokes the specifed method of the specified widget.
 void outer(Widget wgt, String code)
          Replaces the widget with the widget(s) generated by evaluating the specified JavaScript code snippet.
 void resizeWgt(Widget wgt)
          Ask the client to re-cacluate the size of the given widget.
 void rm(Widget wgt)
          Removes the widget.
 void select(Widget wgt, int start, int end)
          Selects all text of the specified widget.
 void setAttr(Widget wgt, String name, Object value)
          Sets the attribute of a widget.
 void uuid(Widget wgt, String newId)
          Rename UUID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setAttr

public void setAttr(Widget wgt,
                    String name,
                    Object value)
Sets the attribute of a widget.

Parameters:
wgt - the widget
name - the name of the attribute
value - the value of the attribute.

outer

public void outer(Widget wgt,
                  String code)
Replaces the widget with the widget(s) generated by evaluating the specified JavaScript code snippet.

Parameters:
wgt - the old widget to be replaced
code - the JavaScript code snippet to generate new widget(s).

addAft

public void addAft(Widget wgt,
                   String... codes)
Adds the widget(s) generated by evaluating the specified JavaScript code snippet after the specified widget (as sibling).

Parameters:
wgt - the existent widget that new widget(s) will be inserted after
codes - the JavaScript code snippet to generate new widget(s).

addAft

public void addAft(Widget wgt,
                   String code)
Adds the widget(s) generated by evaluating the specified JavaScript code snippet after the specified widget (as sibling).

Parameters:
wgt - the existent widget that new widget(s) will be inserted after
code - the JavaScript code snippet to generate new widget(s).

addBfr

public void addBfr(Widget wgt,
                   String... codes)
Adds the widget(s) generated by evaluating the specified JavaScript code snippet before the specified widget (as sibling).

Parameters:
wgt - the existent widget that new widget(s) will be inserted before
codes - the JavaScript code snippet to generate new widget(s).

addChd

public void addChd(Widget wgt,
                   String... codes)
Adds the widget(s) generated by evaluating the specified JavaScript code snippet as the last child of the specified widget.

Parameters:
wgt - the existent widget that will become the parent of new widget(s)
codes - the JavaScript code snippet to generate new widget(s).

rm

public void rm(Widget wgt)
Removes the widget.

Parameters:
wgt - the widget to remove

uuid

public void uuid(Widget wgt,
                 String newId)
Rename UUID.

Parameters:
wgt - the widget to rename
newId - the new UUID
Since:
5.0.3

focus

public void focus(Widget wgt)
Set the focus to the specified widget. It invokes Widget.focus(int). Not all widgets support this method. In other words, it has no effect if the widget doesn't support it.

Parameters:
wgt - the widget.

select

public void select(Widget wgt,
                   int start,
                   int end)
Selects all text of the specified widget. It invokes the select method, if any, of the widget. It does nothing if the method doesn't exist.

Parameters:
wgt - the widget.
start - the starting index of the selection range
end - the ending index of the selection range (excluding). In other words, the text between start and (end-1) is selected.

echo2

public void echo2(Widget wgt,
                  String evtnm,
                  Object data)
Ask the client to echo back an AU request with the specified evant name and the target widget.

Parameters:
wgt - the target widget to which the AU request will be sent
evtnm - the name of the event, such as onUser
data - any data
See Also:
AuCmd0.echo(_global_.String), AuCmd0.echoGx(_global_.String, _global_.String, _global_.String...)

resizeWgt

public void resizeWgt(Widget wgt)
Ask the client to re-cacluate the size of the given widget.

Parameters:
wgt - the widget to resize
Since:
5.0.8

invoke

public void invoke(Widget wgt,
                   String func,
                   Object... vararg)
Invokes the specifed method of the specified widget. In other words, it is similar to execute the following:
wgt[func].apply(wgt, vararg);

Parameters:
wgt - the widget to invoke
func - the function name
vararg - any number of arguments passed to the function invocation.


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo