Changeset 1224

Show
Ignore:
Timestamp:
02/20/10 15:53:29 (5 months ago)
Author:
gregor
Message:

property sheet definitions can be generated by code and passed on

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/mlframework/src/eu/moonlight3d/common/ui/propertysheet/PropertySheet.java

    r1195 r1224  
    246246 
    247247                                // build editors for definitions 
    248                                 for(PropertySheetDefinition.EditorDefinition editorDefinition : editorGroup.editors) { 
     248                                for(EditorDefinition editorDefinition : editorGroup.editors) { 
    249249                                        for(PropertyEditorFactory factory : propertyEditorFactories) { 
    250250                                                if(factory.getName().equals(editorDefinition.editor)) { 
  • trunk/mlframework/src/eu/moonlight3d/common/ui/propertysheet/PropertySheetDefinition.java

    r891 r1224  
    6464        } 
    6565         
     66        public static void addPropertySheetDefinition(PropertySheetDefinition propertySheetDefinition) { 
     67                propertySheetDefinitions.add(propertySheetDefinition); 
     68        } 
     69         
    6670        public static ArrayList<PropertySheetDefinition> getPropertySheetDefinitions() { 
    6771                return (ArrayList<PropertySheetDefinition>) propertySheetDefinitions.clone(); 
    6872        } 
    69          
    70         class EditorDefinition { 
    71                 public ArrayList<String> properties; 
    72                 public String editor; 
    73                 public Object additionalParameters; 
    74         }; 
    7573         
    7674        class EditorGroup { 
     
    8886        } 
    8987         
    90         public PropertySheetDefinition() { 
    91                 editorGroups=new ArrayList<EditorGroup>();               
     88        public PropertySheetDefinition(String typeName, String instanceName) { 
     89                editorGroups=new ArrayList<EditorGroup>(); 
     90                this.typeName=typeName; 
     91                this.instanceName=instanceName; 
    9292        } 
    9393         
     
    130130                                 
    131131                                EditorDefinition definition=new EditorDefinition(); 
    132                                 definition.properties=new ArrayList<String>(); 
    133132                                 
    134133                                NodeList propertyNames=editorElement.getElementsByTagName("property");