Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 143878 Details for
Bug 286073
[Toolbar] RADIO items are completely broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Temporary solution
ToolbarRadioQuickFix.txt (text/plain), 5.77 KB, created by
Tim Buschtoens
on 2009-08-10 05:32:29 EDT
(
hide
)
Description:
Temporary solution
Filename:
MIME Type:
Creator:
Tim Buschtoens
Created:
2009-08-10 05:32:29 EDT
Size:
5.77 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: src/org/eclipse/swt/internal/widgets/displaykit/QooxdooResourcesUtil.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/displaykit/QooxdooResourcesUtil.java,v >retrieving revision 1.20 >diff -u -r1.20 QooxdooResourcesUtil.java >--- src/org/eclipse/swt/internal/widgets/displaykit/QooxdooResourcesUtil.java 3 Aug 2009 20:15:40 -0000 1.20 >+++ src/org/eclipse/swt/internal/widgets/displaykit/QooxdooResourcesUtil.java 10 Aug 2009 09:32:21 -0000 >@@ -143,6 +143,8 @@ > = "org/eclipse/swt/widgets/Slider.js"; > private static final String RADIOBUTTONUTIL_JS > = "org/eclipse/rwt/RadioButtonUtil.js"; >+ private static final String BUTTONUTIL_JS >+ = "org/eclipse/swt/ButtonUtil.js"; > private static final String LINK_JS > = "org/eclipse/swt/widgets/Link.js"; > private static final String HTMLUTIL_JS >@@ -233,6 +235,7 @@ > register( EXPAND_ITEM_JS, compress ); > register( SLIDER_JS, compress ); > register( RADIOBUTTONUTIL_JS, compress ); >+ register( BUTTONUTIL_JS, compress ); > register( LINK_JS, compress ); > register( HTMLUTIL_JS, compress ); > register( MULTICELLWIDGET, compress ); >Index: js/org/eclipse/swt/ButtonUtil.js >=================================================================== >RCS file: js/org/eclipse/swt/ButtonUtil.js >diff -N js/org/eclipse/swt/ButtonUtil.js >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ js/org/eclipse/swt/ButtonUtil.js 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,109 @@ >+/******************************************************************************* >+ * Copyright (c) 2002, 2009 Innoopract Informationssysteme GmbH. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Innoopract Informationssysteme GmbH - initial API and implementation >+ * EclipseSource - ongoing development >+ ******************************************************************************/ >+ >+ >+/** >+ * This class contains static functions for radio buttons and check boxes. >+ */ >+qx.Class.define( "org.eclipse.swt.ButtonUtil", { >+ >+ statics : { >+ >+ setLabelMode : function( button ) { >+ // Note: called directly after creating the menuItem instance, therefore >+ // it is not necessary to check getLabelObject and/or preserve its label >+ button.setLabel( "(empty)" ); >+ button.getLabelObject().setMode( "html" ); >+ button.getLabelObject().setAppearance( "label-graytext" ); >+ button.setLabel( "" ); >+ }, >+ >+ /** >+ * Registers the given button at the RadioManager of the first sibling >+ * radio button. If there is not sibing radio button, a new RadioManager >+ * is created. >+ */ >+ registerRadioButton : function( button ) { >+ var radioManager = null; >+ var parent = button.getParent(); >+ var siblings = parent.getChildren(); >+ for( var i = 0; radioManager == null && i < siblings.length; i++ ) { >+ if( siblings[ i ] != button >+ && siblings[ i ].classname == button.classname ) >+ { >+ radioManager = siblings[ i ].getManager(); >+ } >+ } >+ if( radioManager == null ) { >+ radioManager = new qx.ui.selection.RadioManager(); >+ } >+ radioManager.add( button ); >+ }, >+ >+ /** >+ * Removes the given button from its RadioManager and disposes of the >+ * RadioManager if there are no more radio buttons that use this >+ * RadioManager. >+ */ >+ unregisterRadioButton : function( button ) { >+ var radioManager = button.getManager(); >+ if( radioManager != null ) { >+ radioManager.remove( button ); >+ if( radioManager.getItems().length == 0 ) { >+ radioManager.dispose(); >+ } >+ } >+ }, >+ >+ radioSelected : function( evt ) { >+ var radioManager = evt.getTarget(); >+ var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); >+ var req = org.eclipse.swt.Request.getInstance(); >+ var radioButtons = radioManager.getItems(); >+ for( var i=0; i<radioButtons.length; i++ ) { >+ var selected = radioButtons[ i ] == radioManager.getSelected(); >+ var id = widgetManager.findIdByWidget( radioButtons[ i ] ); >+ req.addParameter( id + ".selection", selected ); >+ } >+ }, >+ >+ radioSelectedAction : function( evt ) { >+ if( !org_eclipse_rap_rwt_EventUtil_suspend ) { >+ org.eclipse.swt.ButtonUtil.radioSelected( evt ); >+ var radioManager = evt.getTarget(); >+ var radio = radioManager.getSelected(); >+ if( radio != null ) { >+ var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); >+ var id = widgetManager.findIdByWidget( radio ); >+ org.eclipse.swt.EventUtil.doWidgetSelected( id, 0, 0, 0, 0 ); >+ } >+ } >+ }, >+ >+ /* Called when a TOGGLE button is executed */ >+ onToggleExecute : function( evt ) { >+ if( !org_eclipse_rap_rwt_EventUtil_suspend ) { >+ var button = evt.getTarget(); >+ var checked = !button.hasState( "checked" ); >+ if( checked ) { >+ button.addState( "checked" ); >+ } else { >+ button.removeState( "checked" ); >+ } >+ var widgetManager = org.eclipse.swt.WidgetManager.getInstance(); >+ var id = widgetManager.findIdByWidget( button ); >+ var req = org.eclipse.swt.Request.getInstance(); >+ req.addParameter( id + ".selection", checked ); >+ } >+ } >+ } >+});
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 286073
: 143878 |
143880