Lines 11-22
Link Here
|
11 |
|
11 |
|
12 |
package org.eclipse.gmf.runtime.common.ui.services.properties.extended; |
12 |
package org.eclipse.gmf.runtime.common.ui.services.properties.extended; |
13 |
|
13 |
|
|
|
14 |
import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.CommonUiServicesPropertiesMessages; |
14 |
import org.eclipse.jface.viewers.ILabelProvider; |
15 |
import org.eclipse.jface.viewers.ILabelProvider; |
15 |
import org.eclipse.jface.viewers.LabelProvider; |
16 |
import org.eclipse.jface.viewers.LabelProvider; |
16 |
|
17 |
|
17 |
import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.PSFResourceManager; |
|
|
18 |
|
19 |
|
20 |
/** |
18 |
/** |
21 |
* @author Tauseef A. Israr |
19 |
* @author Tauseef A. Israr |
22 |
* Created on: Sep 9, 2002 |
20 |
* Created on: Sep 9, 2002 |
Lines 24-33
Link Here
|
24 |
public class ExtendedBooleanPropertyDescriptor |
22 |
public class ExtendedBooleanPropertyDescriptor |
25 |
extends ExtendedComboboxPropertyDescriptor { |
23 |
extends ExtendedComboboxPropertyDescriptor { |
26 |
|
24 |
|
27 |
private static final String TRUE = PSFResourceManager.getI18NString("ExtendedBooleanPropertyDescriptor.True"); //$NON-NLS-1$ |
|
|
28 |
|
29 |
private static final String FALSE = PSFResourceManager.getI18NString("ExtendedBooleanPropertyDescriptor.False"); //$NON-NLS-1$ |
30 |
|
31 |
/** |
25 |
/** |
32 |
* Constructor for ExtendedBooleanPropertyDescriptor. |
26 |
* Constructor for ExtendedBooleanPropertyDescriptor. |
33 |
* |
27 |
* |
Lines 35-41
Link Here
|
35 |
* @param displayName |
29 |
* @param displayName |
36 |
*/ |
30 |
*/ |
37 |
public ExtendedBooleanPropertyDescriptor(Object id, String displayName) { |
31 |
public ExtendedBooleanPropertyDescriptor(Object id, String displayName) { |
38 |
super(id, displayName, new String[] { FALSE, TRUE }); |
32 |
super(id, displayName, new String[] { |
|
|
33 |
CommonUiServicesPropertiesMessages.ExtendedBooleanPropertyDescriptor_False, |
34 |
CommonUiServicesPropertiesMessages.ExtendedBooleanPropertyDescriptor_True |
35 |
}); |
39 |
} |
36 |
} |
40 |
|
37 |
|
41 |
/** |
38 |
/** |
Lines 46-54
Link Here
|
46 |
public String getText(Object object) { |
43 |
public String getText(Object object) { |
47 |
if (object instanceof Integer) { |
44 |
if (object instanceof Integer) { |
48 |
if (((Integer) object).intValue() == 0) |
45 |
if (((Integer) object).intValue() == 0) |
49 |
return FALSE; |
46 |
return CommonUiServicesPropertiesMessages.ExtendedBooleanPropertyDescriptor_False; |
50 |
else if (((Integer) object).intValue() == 1) |
47 |
else if (((Integer) object).intValue() == 1) |
51 |
return TRUE; |
48 |
return CommonUiServicesPropertiesMessages.ExtendedBooleanPropertyDescriptor_True; |
52 |
} |
49 |
} |
53 |
return (String) getBlank(); |
50 |
return (String) getBlank(); |
54 |
} |
51 |
} |