1 /* ************************************************************************
3 qooxdoo - the new era of web development
8 2004-2007 1&1 Internet AG, Germany, http://www.1and1.org
11 LGPL: http://www.gnu.org/licenses/lgpl.html
12 EPL: http://www.eclipse.org/org/documents/epl-v10.php
13 See the LICENSE file in the project's top-level directory for details.
16 * Sebastian Werner (wpbasti)
17 * Andreas Ecker (ecker)
19 ************************************************************************ */
21 /* ************************************************************************
25 ************************************************************************ */
27 qx.OO.defineClass("qx.ui.toolbar.RadioButton", qx.ui.toolbar.CheckBox,
28 function(vText, vIcon, vChecked) {
29 qx.ui.toolbar.CheckBox.call(this, vText, vIcon, vChecked);
36 ---------------------------------------------------------------------------
38 ---------------------------------------------------------------------------
42 The assigned qx.manager.selection.RadioManager which handles the switching between registered buttons
44 qx.OO.addProperty({ name : "manager", type : "object", instance : "qx.manager.selection.RadioManager", allowNull : true });
47 The name of the radio group. All the radio elements in a group (registered by the same manager)
48 have the same name (and could have a different value).
50 qx.OO.addProperty({ name : "name", type : "string" });
53 Prohibit the deselction of the checked radio button when clicked on it.
55 qx.OO.addProperty({ name : "disableUncheck", type : "boolean", defaultValue : false });
63 ---------------------------------------------------------------------------
65 ---------------------------------------------------------------------------
68 qx.Proto._modifyChecked = function(propValue, propOldValue, propData)
70 qx.ui.toolbar.CheckBox.prototype._modifyChecked.call(this, propValue, propOldValue, propData);
72 var vManager = this.getManager();
74 vManager.handleItemChecked(this, propValue);
80 qx.Proto._modifyManager = function(propValue, propOldValue, propData)
83 propOldValue.remove(this);
98 ---------------------------------------------------------------------------
100 ---------------------------------------------------------------------------
103 qx.Proto._onmouseup = function(e)
105 this.setCapture(false);
107 if (!this.hasState("abandoned"))
109 this.addState("over");
110 this.setChecked(this.getDisableUncheck() || !this.getChecked());
114 this.removeState("abandoned");
115 this.removeState("pressed");