input
stringlengths
10
828
output
stringlengths
5
107
protected boolean is listening final string eln if events to listen null for final event listener el events to listen if el get name equals ignore case eln return true return false
test if object listening on event name
protected boolean is close return true
test if element has close token
protected boolean is inner html return true
test if element process inner html injection
protected boolean was paint return painted
test if element was paint
protected void add remove attribute final string attribute add script if painted remove attribute constants js quotation mark utils escape script attribute constants js quotation mark
calls remove attribute java script on this element if element was paint
protected void do script final string script final boolean notify server string js utils encode script script call script engine prus constants js quotation mark get id constants js quotation mark constants js quotation mark js constants js quotation mark notify server 1 0
executing java script on browser
public string get id if id null id constants object prefix integer to hex string hash code return id
creates server object id which is constants
public fire web application get application return utils get parent fire web application class this
obtain in object tree the application object
public boolean is listening final class extends event listener elc if events to listen null for final event listener el events to listen if elc is instance el return true return false
test if object listening on event
public boolean is listening final event listener instance return events to listen null false events to listen contains instance
test if object listening on event instance
public integer get tab index return tab index
specifies the tab order of an element
public integer get button return button
returns an integer value indicating the button that changed state
public integer get client x return client x
returns the horizontal coordinate of the mouse pointer when an event was
public integer get client y return client y
returns the vertical coordinate of the mouse pointer when an event was
public integer get screen x return screen x
returns the horizontal coordinate of the mouse pointer when an event was
public integer get screen y return screen y
returns the vertical coordinate of the mouse pointer when an event was
public integer get page x return page x
provide the left and top coordinates of the elements content relative to
public string get loading indicator return loading indicator
gets string which contains html code of loading indicator
public resource bundle get resource bundle if resource bundle defult name null return null else if locale null return resource bundle get bundle resource bundle defult name else return resource bundle get bundle resource bundle defult name locale
gets current application resources pointed by
public integer get page y return page y
provide the left and top coordinates of the elements content relative to
public integer get layer x return layer x
provide the horizontal x coordinate of the mouse at the moment the
public integer get layer y return layer y
provide the vertical y coordinate of the mouse at the moment the
public integer get offset x return offset x
provide the left and top coordinates of the mouse pointer relative to the
public integer get offset y return offset y
provide the left and top coordinates of the mouse pointer relative to the
public void destroy jquery uihelper exec command this destroy
remove the tab functionality completely
public void disable jquery uihelper exec command this disable this disabled true
disable the tab
public void disable tab final int idx get tab idx set disabled true jquery uihelper exec command this disable string value of idx
disable a tab
public string get which return which
contains the numeric code for a particular key pressed depending on
public void enable jquery uihelper exec command this enable this disabled false
enable the tab
public void rotate final int ms final boolean continuing jquery uihelper exec command this rotate ms string value of continuing
set up an automatic rotation through tabs of a tab pane
public void add tab final tab tab tab get header set parent tabs panel tab set parent this if tabs panel get elements size 1 select tab 0
adds tab to tab set
public void insert tab final int index final tab tab tabs panel insert index tab get header this insert index 1 tab if tabs panel get elements size 1 select tab 0
insert tab to tab set
public void remove tab final int idx tab tab get tab idx if tab null tab get header remove parent tab remove parent if tabs panel get elements is empty this selected 0 else if this selected idx idx 0 this selected idx 1
after remove tab from painted tab set you have to call
public tab get tab final int idx final element w get elements get idx 1 if w instanceof tab return tab get elements get idx 1 else return null
retrieves tab from container
public void select tab final int idx this selected idx if was paint jquery uihelper exec command this select string value of this selected
select a tab as if it were clicked
public void show this hidden false call script jquery uihelper get indicator this show
show tab set
public void disable jquery uihelper exec command this disable
disable the progressbar
public void enable jquery uihelper exec command this enable
enable the progressbar
public void set value int value this value value if this value value jquery uihelper set option value this value this value
the value of the progressbar
public void add section final accordion section section section get header set parent this section set parent this
adds section to accordion
public void insert section final int index final accordion section section this insert index 2 section get header this insert index 2 1 section
insert section to accordion
public void remove section final int idx accordion section section get section idx section get header remove parent section remove parent if get elements is empty this active 0 else if this active idx idx 0 this active idx 1
after remove section from painted accordion you have to call
public accordion section get section final int index return accordion section this get elements get index 2
retrieves section from container
public void disable jquery uihelper exec command this disable set disabled true
disable the button
public void enable jquery uihelper exec command this enable set disabled false
enable the button
public void assign value int value this value value
sets values without sending changes to browser
public void set values int values this values values jquery uihelper set option value this values this values
the length of values should be 2
public void assign values int values this values values
the length of values should be 2
public void add option final menu option option option set parent this
add option to menu group
public void inset option final menu option option final int index insert index option
insert option at given position in the list of otions
public void event values final event we throws parse exception if range jsonarray vals jsonarray new jsonparser parse we get value this values 0 integer vals get 0 values 1 integer vals get 1
loads from event value slider values
public void hide jquery uihelper exec command this hide
close a previously opened date picker
public void show jquery uihelper exec command this show
call up a previously attached date picker
public void applay date final string date jquery uihelper exec command this set date date
sets the current date for the datepicker
protected void set up f empty new frame queue f test new frame queue f full new frame queue f full add new frame f full add new frame f full add new frame
initializes the variables
public void test add remove f full remove f full remove f full remove assert true f full get null
tests adding and removing frames from the queue
public void test empty assert true f empty remove null
tests the behaviour of the empty queue
public void print if head null system out println empty else frame first head tmp head get next system out println n head id while tmp id head id system out println tmp id tmp tmp get next while tmp head system out println tmp id tmp tmp get next system out println n
prints the ids of messages contained in this queue
public void test5 int i 0 frame fr for i 0 i 5 i fr new frame fr id i f test add fr assert false f test empty for i 0 i 5 i fr f test remove assert true fr id i assert true f test empty repeat the procedure again for i 0 i 5 i fr new frame fr id i f test add fr assert false f test empty for i 0 i 5 i fr f test remove assert true fr id i assert true f test empty
adds 5 frames to the queue and removes them
protected void set up req new request
initializes the variables
private void log string msg system out println twp msg
adds the message to the console output logs for debugging
public void test lookup qcf m r new mobile protocol request m r code lookup m r id 1 object data new object 1 data 0 new string nazwa qcf m r set data data byte msg m r serialize p r new proxy protocol request m r code 1 1 1 msg assert true string p r get data 0 equals new string nazwa qcf
a serialization tests of a request with the lookup code
protected void set up simple new prepared messages
prepare environment for each test case
public void test simple input output byte m1 1 2 prepared message pm new prepared message 1 1 m1 client identifier ci new client identifier 5 6 simple put ci pm prepared message rm simple get ci this assert equals pm rm
first test check if one message is properly put and got
public int owner return owner
accesor for application identifier
public int code return this code
accesor for code
protected void log string s synchronized log log println twm s log flush
print to the log file
private void parse header string s header clear string header fields new string buf split r n for int hfcount 0 hfcount header fields length hfcount if header fields hfcount length 0 string one field header fields hfcount split 2 if one field length 2 header put one field 0 one field 1 parse header
parser header and answers with map of pairs field value
public void put acknowledge int owner int mobile int ackn arr my prepared messages put acknowledges new client identifier mobile owner ackn arr
if some message received from one mobile application was procesed
public void forward from mobile client identifier ci prepared message pm system out println msg from ci mobile new string pm msg synchronized system out system out println d ugo pm msg length for int i 0 i pm msg length i system out print pm msg i system out println for int i 0 i pm msg length i system out print char pm msg i system out println for testing only my prepared messages put ci pm request req new request pm code ci owner pm id ci mobile pm msg my proxy request manager process request req
forward message received from mobile to reqest manager
private void do error print stream ps throws ioexception log unsuported method type ps print http 1 0 http bad method not found ps write eol ps print server jms4j2me proxy by pk jk tm lp ps write eol ps print date new date ps write eol ps print content type text html ps write eol heder finished ps write eol ps print unsupported method type ps write buf 0 5 ps write eol ps println
answers for the client bad method request
private void do head print stream ps throws ioexception log doing head int mobile string header get mobilefield hash code int owner integer parse int string header get ownerfield int id integer parse int string header get idfield log got id id client identifier ci new client identifier mobile owner my prepared messages delete ci id ps print http 1 0 http ok ok ps write eol
with head method type mobile acknowledges receiving message
public void perform work object data throws instantiation exception worker thread w null synchronized waiting if waiting empty try w new worker thread additional worker worker worker class new instance this w start catch exception e throw new instantiation exception problem creating instance of worker class e get message else w worker thread waiting pop w wake data
request the pool to perform some work
public boolean push worker thread w boolean stay around false synchronized waiting if waiting size max stay around true waiting push w return stay around
convience method used by worker thread to put thread back on the stack
public boolean get is closed tag return closedtag
gets whether the end tag has been encountered for the vhml element
public void set closed tag boolean ct closedtag ct
sets whether the end tag has been encountered for the vhml element
public boolean get is expression return expression
gets whether the speech element is expressive rather thatn prosodic
public void set duration int t duration duration t duration
sets the duration attribute of the speech element
public void set attribute int i string attr attrs i new string attr
sets an attribute of the speech element
public void set value int i string val values i new string val
sets a value of the speech element
public int get num elements return elements
gets the num of attributes for the speech element
protected void set frames vector frames faps frames
sets the mpeg 4 fap frames of the meta face service
public string get attribute int i return attrs i
gets an attribute of the speech element
public boolean is duration set if duration 0 return false return true
gets whether the duration has been set for the vhml element
public void set to frame int t toframe toframe t toframe duration toframe fromframe if wait 0 duration duration wait
sets the to frame attribute of the vhml element
protected void set phonemes vector phs phonemes phs
sets the phoneme information of the meta face service
protected digital signal processor get dsp return dsp
gets the server dsp
protected void set text string txt speechtext txt
sets the speech text of the meta face service
public string get vhmlfile path return vhmlfilepath
gets the path to vhml files
public int get to frame return toframe
gets the to frame attribute of the vhml element
protected void set browser updates hashtable updates browserupdates updates
sets the browser updates urls and targets of the meta face service
public int get from frame return fromframe
gets the from frame attribute of the vhml element
protected interaction manager get interaction manager return im
gets the interaction manager of the meta face httpserver
public void set frame rate int framespersecond framerate framespersecond
sets the frame rate attribute of the meta face service
public void add http server listener httpserver listener l throws too many listeners exception if listener null listener l else throw new too many listeners exception
adds a new http server listener
public vector get frames return vhmlparser get frames
allows access to the mpeg 4 faps retrieved
public int get frame rate return framerate
gets the frame rate attribute of the meta face service
public vector get phonemes return vhmlparser get phonemes
allows access to the phonemes retrieved
public string get text return vhmlparser get text
allows access to the plain text retrieved
public hashtable get browser updates return vhmlparser get browser updates
allows access to the urls and targets retrieved