From: <san...@us...> - 2011-10-03 21:51:12
|
Revision: 21492 http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21492&view=rev Author: sandersson Date: 2011-10-03 21:51:06 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Modified Paths: -------------- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 20:53:45 UTC (rev 21491) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/form/ButtonPane.js 2011-10-03 21:51:06 UTC (rev 21492) @@ -21,12 +21,6 @@ #asset(qx/icon/${qx.icontheme}/16/actions/dialog-cancel.png) #asset(qx/icon/${qx.icontheme}/16/actions/dialog-apply.png) #asset(qx/icon/${qx.icontheme}/16/actions/help-about.png) -//submit -# asset(qx/icon/${qx.icontheme}/16/actions/document-send.png) -// yes -// no -// clean -# asset(qx/icon/${qx.icontheme}/16/actions/document-revert.png) ************************************************************************ */ @@ -45,11 +39,14 @@ ***************************************************************************** */ + /** + * @param orientation {String} Orientation of the button pane + * @param spacing {Integer} The spacing between buttons of the button pane + */ construct : function(orientation, spacing) { this.base(arguments); - // Configure orientation if(orientation != null) { this.setOrientation(orientation); @@ -75,49 +72,49 @@ statics : { // Buttons + /** The OK button */ OK : { -// name : "OK", label : qx.locale.Manager.marktr("OK"), - icon : "qx/icon/16/actions/dialog-ok.png", + icon : "icon/16/actions/dialog-ok.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipIcon : "icon/16/actions/help-about.png", toolTipText : qx.locale.Manager.marktr("Accept the dialog.") }, + /** The Cancel button */ CANCEL : { -// name : "CANCEL", label : qx.locale.Manager.marktr("Cancel"), - icon : "qx/icon/16/actions/dialog-cancel.png", + icon : "icon/16/actions/dialog-cancel.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipIcon : "icon/16/actions/help-about.png", toolTipText : qx.locale.Manager.marktr("Cancel the dialog.") }, + /** The Help button */ HELP : { -// name : "HELP", label : qx.locale.Manager.marktr("Help"), - icon : "qx/icon/16/actions/help-about.png", + icon : "icon/16/actions/help-about.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", + toolTipIcon : "icon/16/actions/help-about.png", toolTipText : qx.locale.Manager.marktr("Get help about the dialog.") }, + /** The YES button */ YES : { -// name : "YES", label : qx.locale.Manager.marktr("Yes"), - icon : "", + icon : "icon/16/actions/dialog-ok.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", - toolTipText : qx.locale.Manager.marktr("Accept the dialog.") + toolTipIcon : "icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Answer yes to the dialog.") }, + /** The NO button */ NO : { -// name : "NO", - label : qx.locale.Manager.marktr("NO"), - icon : "", + label : qx.locale.Manager.marktr("No"), + icon : "icon/16/actions/dialog-cancel.png", toolTip : null, - toolTipIcon : "qx/icon/16/actions/help-about.png", - toolTipText : qx.locale.Manager.marktr("Accept the dialog.") + toolTipIcon : "icon/16/actions/help-about.png", + toolTipText : qx.locale.Manager.marktr("Answer no to the dialog.") } }, @@ -138,7 +135,7 @@ }, /** - * The button pane orientation + * The orientation. */ orientation : { @@ -185,7 +182,12 @@ --------------------------------------------------------------------------- */ - // property apply + /** + * Apply method for the orientation. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ _applyOrientation : function(value, old) { // Dispose old layout @@ -215,13 +217,25 @@ } }, + /** + * Apply method for spacing between buttons. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ _applySpacing : function(value, old) { var layout = this._getLayout(); value == null ? layout.resetSpacing() : layout.setSpacing(value); }, - _applySizeConstraint : function() + /** + * Apply method for size constraint. + * + * @param value {boolean} The new value. + * @param old {boolean} The old value. + */ + _applySizeConstraint : function(value, old) { }, @@ -240,7 +254,8 @@ * Windows, affirmative button appears on the right hand side of cancel button. * On Mac OS X, affirmative button will appear on the left hand side of cancel button. * - * @param button {[ "affirmative" | "cancel" | "help" | "other" ]} The constraint used for the button. + * @param button {qx.ui.form.Button} The button to add. + * @param constraint {[ "affirmative" | "cancel" | "help" | "other" ]} The constraint used for the button. */ add : function(button, constraint) { @@ -302,17 +317,19 @@ * Windows, affirmative button appears on the right hand side of cancel button. * On Mac OS X, affirmative button will appear on the left hand side of cancel button. * - * @param constraint {qx.ui.form.Button} The button to be removed. + * @param constraint {[ "affirmative" | "cancel" | "help" | "other" ]} The constraint for buttons. */ _constrainButtons : function(constraint) { var item = 0; // Windows versions + // affirm button to the right of the cancel button. if(qx.core.Environment.get("os.name") == "win") { } // All others osx, linux etc. + // affirm button to the left of the cancel button. else { } @@ -373,31 +390,9 @@ addSpacer : function() { var spacer = new qx.ui.core.Spacer; - this._add(spacer, {flex:1}); + this._add(spacer, {flex : 1}); return spacer; - }, - - /** - * Read button resource. - * - * @return {qx.core.Object} The button resource object. - */ - getResources : function(bitValue) - { - var buttons = []; - - for(var key in this.BUTTONS) - { - var button = this.BUTTONS[key]; - - if(bitValue & button.bit) - { - buttons.push(button); - } - } - - return buttons; } } }); Modified: trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js =================================================================== --- trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-03 20:53:45 UTC (rev 21491) +++ trunk/qooxdoo-contrib/qxe/trunk/source/class/qxe/ui/wizard/Wizard.js 2011-10-03 21:51:06 UTC (rev 21492) @@ -20,6 +20,12 @@ #asset(qx/icon/${qx.icontheme}/16/actions/go-previous.png) #asset(qx/icon/${qx.icontheme}/16/actions/go-next.png) +#asset(qx/icon/${qx.icontheme}/16/actions/document-send.png) +#asset(qx/icon/${qx.icontheme}/16/actions/document-revert.png) +#asset(qx/icon/${qx.icontheme}/16/actions/dialog-cancel.png) + +#asset(qx/icon/${qx.icontheme}/16/actions/help-about.png) + ************************************************************************ */ /** @@ -41,6 +47,20 @@ * - Pages can be validated as the user interacts, or when the user presses next. * - Support for long running operations with progress indication. * - Support for end-of-wizard summary panels + * + * @childControl statusbar {qx.ui.container.Composite} statusbar container which shows the statusbar text + * + * @childControl stack-pane {qx.ui.container.Stack} stack container keeping all the pages + * @childControl navigation-pane {qx.ui.container.Composite} container for navigation buttons + * @childControl previous-button {qx.ui.form.Button} button to navigate to previous page + * @childControl step-navigation {qx.ui.container.Composite} container for step navigation + * @childControl current-step {qx.ui.form.TextField} textfield containing current step + * @childControl num-steps {qx.ui.form.TextField} textfield containing total number of steps + * @childControl next-button {qx.ui.form.Button} button to navigate to next page + * @childControl button-pane {qxe.ui.form.ButtonPane} button pane for wizard actions + * @childControl affirm-button {qx.ui.form.Button} button for finishing the wizard + * @childControl reset-button {qx.ui.form.Button} button to reset fields of the wizard + * @childControl cancel-button {qx.ui.form.Button} button to cancel the wizard */ qx.Class.define("qxe.ui.wizard.Wizard", { @@ -283,8 +303,8 @@ control = new qx.ui.form.Button(); control.setUserData("name", "FINISH"); control.setLabel(this.tr("Finish")); - control.setIcon(""), - control.setToolTipIcon("qx/icon/16/actions/help-about.png"); + control.setIcon("icon/16/actions/document-send.png"), + control.setToolTipIcon("icon/16/actions/help-about.png"); control.setToolTipText(this.tr("Finish wizard.")); control.setEnabled(false); break; @@ -293,8 +313,8 @@ control = new qx.ui.form.Button(); control.setUserData("name", "RESET"); control.setLabel(this.tr("Reset")); - control.setIcon(""), - control.setToolTipIcon("qx/icon/16/actions/help-about.png"); + control.setIcon("icon/16/actions/document-revert.png"), + control.setToolTipIcon("icon/16/actions/help-about.png"); control.setToolTipText(this.tr("Reset the fields of the wizard.")); control.setEnabled(false); break; @@ -427,17 +447,16 @@ /* --------------------------------------------------------------------------- - EVENT LISTENERS + BASIC EVENT HANDLERS --------------------------------------------------------------------------- */ - /** * Event handler for <code>onappear</code>. * * @param e {qx.event.type.Data} Data event. */ - _onAppearOnce : function() + _onAppearOnce : function(e) { var model = qx.data.marshal.Json.createModel(this.__skeleton, true); @@ -568,6 +587,9 @@ } }, + /** + * Destruct function. + */ destruct : function() { this.__skeleton = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |