comparison dwtx/jface/viewers/CheckboxCellEditor.d @ 70:46a6e0e6ccd4

Merge with d-fied sources of 3.4M7
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 01:36:46 +0200
parents ea8ff534f622
children 7ffeace6c47f
comparison
equal deleted inserted replaced
69:07b9d96fd764 70:46a6e0e6ccd4
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2000, 2007 IBM Corporation and others. 2 * Copyright (c) 2000, 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
101 } 101 }
102 102
103 /** 103 /**
104 * The <code>CheckboxCellEditor</code> implementation of 104 * The <code>CheckboxCellEditor</code> implementation of
105 * this <code>CellEditor</code> framework method returns 105 * this <code>CellEditor</code> framework method returns
106 * the checkbox setting wrapped as a <code>bool</code>. 106 * the checkbox setting wrapped as a <code>Boolean</code>.
107 * 107 *
108 * @return the bool checkbox value 108 * @return the Boolean checkbox value
109 */ 109 */
110 protected override Object doGetValue() { 110 protected override Object doGetValue() {
111 return new ValueWrapperBool( value ); 111 return value ? Boolean.TRUE : Boolean.FALSE;
112 } 112 }
113 113
114 /* (non-Javadoc) 114 /* (non-Javadoc)
115 * Method declared on CellEditor. 115 * Method declared on CellEditor.
116 */ 116 */
119 } 119 }
120 120
121 /** 121 /**
122 * The <code>CheckboxCellEditor</code> implementation of 122 * The <code>CheckboxCellEditor</code> implementation of
123 * this <code>CellEditor</code> framework method accepts 123 * this <code>CellEditor</code> framework method accepts
124 * a value wrapped as a <code>bool</code>. 124 * a value wrapped as a <code>Boolean</code>.
125 * 125 *
126 * @param value a bool value 126 * @param value a Boolean value
127 */ 127 */
128 protected override void doSetValue(Object value) { 128 protected override void doSetValue(Object value) {
129 Assert.isTrue( null !is cast(ValueWrapperBool)value ); 129 Assert.isTrue( null !is cast(Boolean)value );
130 this.value = (cast(ValueWrapperBool) value).value; 130 this.value = (cast(Boolean) value).booleanValue();
131 } 131 }
132 132
133 public override void activate(ColumnViewerEditorActivationEvent activationEvent) { 133 public override void activate(ColumnViewerEditorActivationEvent activationEvent) {
134 if (activationEvent.eventType !is ColumnViewerEditorActivationEvent.TRAVERSAL) { 134 if (activationEvent.eventType !is ColumnViewerEditorActivationEvent.TRAVERSAL) {
135 super.activate(activationEvent); 135 super.activate(activationEvent);