Changeset 2247
- Timestamp:
- 06/27/08 13:47:04
(4 months ago)
- Author:
- apatel
- Message:
ticket:191, entrypoint property sheet is updated. I don't think there is anything modifiable for the customized access and enter shapes.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2204 |
r2247 |
|
| 40 | 40 | extends Shape |
|---|
| 41 | 41 | { |
|---|
| 42 | | private IPropertyDescriptor[] descriptors; |
|---|
| 43 | 42 | private static final Image ENTRYPOINT_ICON_ENABLED = createImage(FRAMEWORKImageRegistry.ENTRYPOINT_ICON_ENABLED); |
|---|
| 44 | 43 | private static final Image ENTRYPOINT_ICON_DISABLED = createImage(FRAMEWORKImageRegistry.ENTRYPOINT_ICON_DISABLED); |
|---|
| … | … | |
| 121 | 120 | public IPropertyDescriptor [] getPropertyDescriptors() |
|---|
| 122 | 121 | { |
|---|
| 123 | | //TODO::arp::customize I think we need to look at the all the connections that |
|---|
| 124 | | // this entry point shape is connected to. |
|---|
| 125 | | if( hasCustomization () ) |
|---|
| 126 | | return new IPropertyDescriptor[]{}; |
|---|
| 127 | | |
|---|
| 128 | | // if (descriptors == null) |
|---|
| 129 | | { |
|---|
| 130 | | IPropertyDescriptor [] parentDescriptors = super.getPropertyDescriptors(); |
|---|
| 131 | | |
|---|
| 132 | | PathPropertyDescriptor paths = new PathPropertyDescriptor (PATH_PROP, DISPLAY_NAME_PATH); |
|---|
| 133 | | |
|---|
| 134 | | TextPropertyDescriptor nameProp = new TextPropertyDescriptor(NAME_PROP, DISPLAY_NAME_NAME); |
|---|
| 135 | | |
|---|
| 136 | | paths.setCategory(PROP_SECTION_BASE); |
|---|
| | 122 | final ArrayList descriptors = new ArrayList(); |
|---|
| | 123 | |
|---|
| | 124 | if( !hasCustomization () ) |
|---|
| | 125 | { |
|---|
| | 126 | final TextPropertyDescriptor nameProp = new TextPropertyDescriptor(NAME_PROP, DISPLAY_NAME_NAME); |
|---|
| 137 | 127 | nameProp.setCategory(PROP_SECTION_BASE); |
|---|
| 138 | | |
|---|
| 139 | 128 | //Set validator to be used by cell editor. When value not valid, message will be returned |
|---|
| 140 | 129 | nameProp.setValidator (new NameValidator()); |
|---|
| 141 | 130 | nameProp.setAlwaysIncompatible(true); |
|---|
| 142 | | |
|---|
| 143 | | |
|---|
| 144 | | ComboBoxPropertyDescriptor mlsProperty = null; |
|---|
| 145 | | int nStatPropCount = 2; |
|---|
| 146 | | |
|---|
| 147 | | MLSSupport mlsSupport = getMLSSupport (); |
|---|
| 148 | | if (mlsSupport != null) |
|---|
| 149 | | { |
|---|
| 150 | | mlsProperty = new ComboBoxPropertyDescriptor(MLS_PROP, DISPLAY_NAME_MLS, mlsSupport.getLevelNames ()); |
|---|
| 151 | | mlsProperty.setCategory (PROP_SECTION_BASE); |
|---|
| 152 | | nStatPropCount ++; |
|---|
| 153 | | } |
|---|
| 154 | | |
|---|
| 155 | | descriptors = new IPropertyDescriptor [parentDescriptors.length + nStatPropCount]; |
|---|
| 156 | | System.arraycopy(parentDescriptors, 0, descriptors, 0, parentDescriptors.length); |
|---|
| 157 | | |
|---|
| 158 | | int nIndex = parentDescriptors.length; |
|---|
| 159 | | descriptors[nIndex ++] = nameProp; |
|---|
| 160 | | descriptors[nIndex ++] = paths; |
|---|
| 161 | | |
|---|
| 162 | | if (mlsProperty != null) |
|---|
| 163 | | descriptors[nIndex ++] = mlsProperty; |
|---|
| 164 | | } |
|---|
| 165 | | |
|---|
| 166 | | return descriptors; |
|---|
| | 131 | descriptors.add (nameProp); |
|---|
| | 132 | } |
|---|
| | 133 | |
|---|
| | 134 | final PathPropertyDescriptor paths = new PathPropertyDescriptor (PATH_PROP, DISPLAY_NAME_PATH); |
|---|
| | 135 | paths.setCategory(PROP_SECTION_BASE); |
|---|
| | 136 | descriptors.add (paths); |
|---|
| | 137 | |
|---|
| | 138 | final MLSSupport mlsSupport = getMLSSupport (); |
|---|
| | 139 | if (mlsSupport != null) |
|---|
| | 140 | { |
|---|
| | 141 | final ComboBoxPropertyDescriptor mlsProperty = new ComboBoxPropertyDescriptor(MLS_PROP, DISPLAY_NAME_MLS, mlsSupport.getLevelNames ()); |
|---|
| | 142 | mlsProperty.setCategory (PROP_SECTION_BASE); |
|---|
| | 143 | descriptors.add (mlsProperty); |
|---|
| | 144 | } |
|---|
| | 145 | return (IPropertyDescriptor[])descriptors.toArray (); |
|---|
| 167 | 146 | } |
|---|
| 168 | 147 | |
|---|
| … | … | |
| 308 | 287 | } |
|---|
| 309 | 288 | |
|---|
| 310 | | //TODO::arp::customize |
|---|
| 311 | 289 | public boolean hasCustomization () |
|---|
| 312 | 290 | { |
|---|
Download in other formats:
* Generating other formats may take time.