> Hey,
> could you guys give me some feedback why you want to use it?
> Regards,
> Martin
> [...]
Hi again,
once I have been able to get me some time for a migration tryout, the samples
pop up ;)
Here's for example a CheckBox derived class that extends the normal behavior
by allowing toggle through tristate. Normal checkbox can have a tristate, but
you can only 'click it' to <true> or <false>. This CheckBox can toggle through
<false>,<true> and <null> (tristate).
How do I migrate this kind of Class? Or do I really have to repeat all the code
from qx.ui.form.CheckBox without deriving from it...
Thanks in advance,
Peter
------------------------------------------------------------------------------
/**
* A tristate check box widget that can toggle through "tristate" state.
*/
qx.Class.define("app.ui.form.TristateCheckBox",
{
extend : qx.ui.form.CheckBox,
/*
*****************************************************************************
CONSTRUCTOR
*****************************************************************************
*/
/**
* @param label {String?null} An optional label for the check box.
*/
construct : function (label)
{
this.base(arguments, label);
this.setTriState(true);
},
/*
*****************************************************************************
PROPERTIES
*****************************************************************************
*/
properties :
{
/**
* Whether the {@link #toggleValue} method also switches through the
* "tristate" state.
*/
toggleThruTriState :
{
check : "Boolean",
init : false
}
},
/*
*****************************************************************************
MEMBERS
*****************************************************************************
*/
members :
{
/**
* State transition table.
* Note: Keys must be Strings, else 'null' could not be a source-state.
*
* @lint ignoreReferenceField(__transitions)
*/
__transitions :
{
"null" : false,
"false" : true,
"true" : null // <= if you set this value to false, you will have a
// 'normal' check-box behavior again
},
/**
* Same as {@link qx.ui.form.ToggleButton#toggleValue}, but reacts
* different depending on value of {@link #toggleThruTriState}.
*/
//overwritten
toggleValue : function ()
{
if (this.isToggleThruTriState()) {
this.setValue( this.__transitions[ String(this.getValue()) ] );
} else {
this.base(arguments);
}
}
}
});
***********************************************
Achtung, wir sind umgezogen!
Unsere neue Adresse:
TIS GmbH
Müller-Armack-Str. 8
46397 Bocholt
***********************************************
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel