Mercurial > projects > dwt-addons
diff dwtx/jface/dialogs/ControlEnableState.d @ 104:04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 07 Aug 2008 15:01:33 +0200 |
parents | 7615869f89e6 |
children |
line wrap: on
line diff
--- a/dwtx/jface/dialogs/ControlEnableState.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/jface/dialogs/ControlEnableState.d Thu Aug 07 15:01:33 2008 +0200 @@ -12,13 +12,12 @@ *******************************************************************************/ module dwtx.jface.dialogs.ControlEnableState; -import tango.util.collection.ArraySeq; -import tango.util.collection.model.Seq; import dwt.widgets.Composite; import dwt.widgets.Control; import dwt.dwthelper.utils; +import dwtx.dwtxhelper.Collection; /** * Helper class to save the enable/disable state of a control including all its @@ -29,12 +28,12 @@ * List of exception controls (element type: <code>Control</code>); * <code>null</code> if none. */ - private Seq!(Control) exceptions = null; + private List exceptions = null; /** * List of saved states (element type: <code>ItemState</code>). */ - private Seq!(Object) states; + private List states; /** * Internal class for recording the enable/disable state of a single @@ -93,9 +92,9 @@ * the list of controls to not disable (element type: * <code>Control</code>), or <code>null</code> if none */ - protected this(Control w, Seq!(Control) exceptions) { + protected this(Control w, List exceptions) { // super(); - states = new ArraySeq!(Object); + states = new ArrayList(); this.exceptions = exceptions; readStateForAndDisable(w); } @@ -124,7 +123,7 @@ * <code>Control</code>) * @return an object capturing the enable/disable state */ - public static ControlEnableState disable(Control w, Seq!(Control) exceptions) { + public static ControlEnableState disable(Control w, List exceptions) { return new ControlEnableState(w, exceptions); } @@ -145,7 +144,7 @@ } // XXX: Workaround for 1G2Q8SS: ITPUI:Linux - Combo box is not enabled // in "File->New->Solution" - states.append(new ItemState(control, control.getEnabled())); + states.add(new ItemState(control, control.getEnabled())); control.setEnabled(false); }