Changeset 2247

Show
Ignore:
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
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/EntryPointShape.java

    r2204 r2247  
    4040        extends Shape 
    4141{ 
    42         private IPropertyDescriptor[] descriptors; 
    4342        private static final Image ENTRYPOINT_ICON_ENABLED = createImage(FRAMEWORKImageRegistry.ENTRYPOINT_ICON_ENABLED); 
    4443        private static final Image ENTRYPOINT_ICON_DISABLED = createImage(FRAMEWORKImageRegistry.ENTRYPOINT_ICON_DISABLED); 
     
    121120        public IPropertyDescriptor [] getPropertyDescriptors() 
    122121        { 
    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); 
    137127                        nameProp.setCategory(PROP_SECTION_BASE); 
    138                          
    139128                        //Set validator to be used by cell editor.  When value not valid, message will be returned 
    140129                        nameProp.setValidator (new NameValidator()); 
    141130                        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 (); 
    167146        } 
    168147         
     
    308287        } 
    309288         
    310         //TODO::arp::customize 
    311289        public boolean hasCustomization () 
    312290        {