Package de.FeatureModellingTool.Customize

Examples of de.FeatureModellingTool.Customize.CustomizationVersion


        }

        public void actionPerformed(ActionEvent e) {
            if (!isEnabled()) return;
     
      CustomizationVersion cv = (CustomizationVersion)getContext().getValue(ConstantDefinition.CURRENT_CUSTOMIZATION_VERSION);
     
            List selection = getSelection();
            if (selection != null) {
              for (int i = 0; i < selection.size(); i++) {
                  String fID = (String) selection.get(i);
                  if (cv.isFeatureCustomizable(fID)) {
                Set set = (Set)idToFigureMap.get(fID);
                for (Iterator itFigure = set.iterator() ; itFigure.hasNext() ; ) {
                    Figure figure = (Figure)itFigure.next();
                    cv.setCustomization(fID, state);
                    figure.setAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION_CUSTOMIZABLE , new Boolean(cv.isFeatureCustomizable(fID)));
              figure.setAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION, state);
                   }
                  }
              }
             
View Full Code Here


        public boolean isEnabled() {
            if (!super.isEnabled()) return false;
            if (editorArea.getCurrentView() == null) return false;

      CustomizationVersion cv = (CustomizationVersion)getContext().getValue(ConstantDefinition.CURRENT_CUSTOMIZATION_VERSION);
            if (cv == null) {
              return false;
            }
           
            boolean result = false;
            List selection = getSelection();
            if (selection != null) {
              for (int i = 0; i < selection.size(); i++) {
                  String fID = (String) selection.get(i);
                  result = result || cv.isFeatureCustomizable(fID);
              }
            }

            return result;
        }
View Full Code Here

        }

        public void actionPerformed(ActionEvent e) {
            if (!isEnabled()) return;
     
      CustomizationVersion cv = (CustomizationVersion)getContext().getValue(ConstantDefinition.CURRENT_CUSTOMIZATION_VERSION);
     
            List selection = getSelection();
            if (selection != null) {
              for (int i = 0; i < selection.size(); i++) {
                  String fID = (String) selection.get(i);
                  if (cv.isFeatureCustomizable(fID)) {
                Set set = (Set)idToFigureMap.get(fID);
                for (Iterator itFigure = set.iterator() ; itFigure.hasNext() ; ) {
                    Figure figure = (Figure)itFigure.next();
                    cv.setCustomization(fID, state);
                    figure.setAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION_CUSTOMIZABLE , new Boolean(cv.isFeatureCustomizable(fID)));
              figure.setAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION, state);
                   }
                  }
              }
             
View Full Code Here

    }
   
    protected class CurrentCustomizationVersionChangeLisenter implements PropertyChangeListener {
         public void propertyChange(PropertyChangeEvent e) {
            if (de.FeatureModellingTool.Customize.ConstantDefinition.PROPERTYCHANGE_CURRENTCUSTOMIZATIONVERSION.equals(e.getPropertyName())) {
          CustomizationVersion cv = (CustomizationVersion)e.getNewValue();
                
          getContext().putValue(ConstantDefinition.CURRENT_CUSTOMIZATION_VERSION , cv);
              Set sFigureId = idToFigureMap.keySet();
              for (Iterator itSetId = sFigureId.iterator() ; itSetId.hasNext() ; ) {
                String id = (String)itSetId.next();
                Set set = (Set)idToFigureMap.get(id);
                for (Iterator itFigure = set.iterator() ; itFigure.hasNext() ; ) {
                  Figure figure = (Figure)itFigure.next();
                  if (figure instanceof FeatureFigure) {
                    figure.setAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION_CUSTOMIZABLE , new Boolean(cv == null ? true : cv.isFeatureCustomizable(id)));
                    figure.setAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION , cv == null ? null : cv.getCustomizationById(id));
                  }
                 }
              }
             
              updateEditActionsUI();
View Full Code Here

TOP

Related Classes of de.FeatureModellingTool.Customize.CustomizationVersion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.