Package com.volantis.mcs.model.property

Examples of com.volantis.mcs.model.property.PropertyIdentifier


        addDescriptor(propertyDescriptor);
    }

    private PropertyIdentifier addDescriptor(PropertyDescriptor descriptor) {
        PropertyIdentifier identifier = descriptor.getIdentifier();
        PropertyDescriptor old = (PropertyDescriptor)
                propertyId2Descriptor.get(identifier);
        if (old != null) {
            throw new IllegalStateException(
                    "Duplicate property " + identifier);
        }

        // Make sure that the names do not clash either as the names will be
        // used within a path.
        String name = identifier.getName();
        if (propertyNames.contains(name)) {
            throw new IllegalStateException("Duplicate property name " + name);
        }
        propertyNames.add(name);
View Full Code Here


        this.propertyId2Descriptor = new HashMap();
        this.propertyName2Id = new HashMap();
        for (int i = 0; i < propertyList.size(); i++) {
            PropertyDescriptor descriptor = (PropertyDescriptor)
                    propertyList.get(i);
            PropertyIdentifier identifier = descriptor.getIdentifier();
            propertyId2Descriptor.put(identifier, descriptor);
            propertyName2Id.put(identifier.getName(), identifier);

        }
        this.complete = true;
    }
View Full Code Here

                    while (categories.hasNext()) {
                        StyleCategory category = (StyleCategory) categories.next();
                        Iterator it = category.getProperties().iterator();
                        while (it.hasNext()) {
                            StyleProperty details = (StyleProperty) it.next();
                            PropertyIdentifier identifier = ThemeModel.
                                getPropertyIdentifierForStyleProperty(details);
                            Proxy propertyProxy =
                                    stylePropertiesProxy.getPropertyProxy(identifier);
                            PropertyValue value =
                                ThemeFactory.getDefaultInstance().
                                    createPropertyValue(
                                        details, THEME_FACTORY.getInherit());
                            propertyProxy.setModelObject(value);
                        }
                    }
                    stylePropertiesProxyReceiver.setProxy(stylePropertiesProxy);
                }
            }
        };

        priorityAction = new ResourceAction(
                    ThemesMessages.getResourceBundle(),
                    RESOURCE_PREFIX + "allToImportant.") {
            // Javadoc inherited
            public void run() {
                ISelection selection = categoryTreeViewer.getSelection();
                if (selection instanceof IStructuredSelection) {
                    BeanProxy stylePropertiesProxy =
                            (BeanProxy) stylePropertiesProxyProvider.getProxy();
                    IStructuredSelection structuredSelection =
                            (IStructuredSelection) selection;
                    Iterator categories = structuredSelection.iterator();
                    while (categories.hasNext()) {
                        StyleCategory category = (StyleCategory) categories.next();
                        Iterator it = category.getProperties().iterator();
                        while (it.hasNext()) {
                            StyleProperty details = (StyleProperty) it.next();
                            PropertyIdentifier identifier = ThemeModel.
                                getPropertyIdentifierForStyleProperty(details);
                            Proxy propertyProxy =
                                    stylePropertiesProxy.getPropertyProxy(identifier);
                            PropertyValue value = (PropertyValue) propertyProxy.getModelObject();
                            if (value != null) {
View Full Code Here

     *
     * @param descriptor The descriptor for the property to add
     */
    private void addCheckbox(final PropertyDescriptor descriptor) {

        PropertyIdentifier identifier = descriptor.getIdentifier();

        final Button checkBox = new Button(this, SWT.CHECK);

        GridData data = new GridData();
        data.horizontalSpan = 2;
View Full Code Here

     *
     * @param descriptor The descriptor for the property to add
     */
    private void addText(final PropertyDescriptor descriptor) {

        PropertyIdentifier identifier = descriptor.getIdentifier();
        final Text text = addTextBasedProperty(descriptor);

        text.addModifyListener(
            new ModifyListener() {
                public void modifyText(ModifyEvent event) {
View Full Code Here

     * @param descriptor The property descriptor.
     */
    private Text addTextBasedProperty(
            final PropertyDescriptor descriptor) {

        PropertyIdentifier identifier = descriptor.getIdentifier();
        Label label = new Label(this, SWT.NONE);
        label.setText(getLabel(descriptor));

        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
        label.setLayoutData(data);
View Full Code Here

     */
    private void addCombo(final PropertyDescriptor descriptor,
                          final List comboValues,
                          ILabelProvider labelProvider) {

        PropertyIdentifier identifier = descriptor.getIdentifier();
        Label label = new Label(this, SWT.NONE);
        label.setText(getLabel(descriptor));

        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
        label.setLayoutData(data);
View Full Code Here

     */
    private void addPolicyReference(
            final PropertyDescriptor descriptor,
            final PolicyType policyType) {

        PropertyIdentifier identifier = descriptor.getIdentifier();
        Label label = new Label(this, SWT.NONE);
        label.setText(getLabel(descriptor));

        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
        label.setLayoutData(data);
View Full Code Here

     *
     * @param descriptor The descriptor for the property to add
     */
    private void addInteger(final PropertyDescriptor descriptor) {

        final PropertyIdentifier identifier = descriptor.getIdentifier();
        final Text text = addTextBasedProperty(descriptor);

        text.addModifyListener(
            new ModifyListener() {
                public void modifyText(ModifyEvent event) {
View Full Code Here

     */
    private void addStyleValue(final PropertyDescriptor descriptor,
                               SynchronizationGroup synchronizationGroup,
                               boolean isSpecialSynchronization) {
     
        PropertyIdentifier identifier = descriptor.getIdentifier();
        final StyleProperty styleProperty =
                ThemeModel.getStylePropertyForPropertyIdentifier(identifier);       
        if (StylePropertyMetadata.editAsPair(styleProperty)) {
            if (synchronizationGroup != null) {
                throw new UnsupportedOperationException(
View Full Code Here

TOP

Related Classes of com.volantis.mcs.model.property.PropertyIdentifier

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.