Package com.volantis.styling.properties

Examples of com.volantis.styling.properties.StyleProperty


    public void mergePropertyValues(MutablePropertyValues result,
                                    MutablePropertyValues winner,
                                    MutablePropertyValues luser) {

        for (Iterator i = result.stylePropertyIterator(); i.hasNext();) {
            StyleProperty property = (StyleProperty) i.next();
            StyleValue initial = property.getStandardDetails().getInitialValue();

            boolean specified = false;
            StyleValue mergedValue = winner.getComputedValue(property);
            boolean ignored = winner.shouldExcludeFromCSS(property);
View Full Code Here


        // =====================================================================
        //   Set Expectations
        // =====================================================================

        StyleProperty property = StylePropertyDetails.FONT_SIZE;

        detailsMock.expects.isInherited().returns(true).any();
        detailsMock.expects.getProperty().returns(property).any();

        // =====================================================================
View Full Code Here

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        StyleProperty property = StylePropertyDetails.FONT_SIZE;

        detailsMock.expects.isInherited().returns(true).any();
        detailsMock.expects.getProperty().returns(property).any();

        // =====================================================================
View Full Code Here

                    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 =
                                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();
View Full Code Here

                new MutablePropertyValuesMock("values", expectations);

        for (Iterator i = StylePropertyDetails.getDefinitions().stylePropertyIterator();
             i.hasNext();) {
           
            StyleProperty prop = (StyleProperty) i.next();
            StyleValue value = properties.getStyleValue(prop);
            values.expects.getComputedValue(prop).returns(value).any();
//            values.expects.getSpecifiedValue(prop).returns(value).any();
            values.expects.getComputedValue(prop).returns(value).any();
        }
View Full Code Here

    private void assertStylesEqual(Styles sparseStyles, StylingEngine engine) {
        PropertyValues expectedValues = sparseStyles.getPropertyValues();
        PropertyValues actualValues = engine.getStyles().getPropertyValues();
        Iterator iterator = expectedValues.stylePropertyIterator();
        while (iterator.hasNext()) {
            StyleProperty property = (StyleProperty) iterator.next();
            StyleValue specified = expectedValues.getSpecifiedValue(property);
            if (specified != null) {
                // Only interested in the specified values.
                StyleValue expected = expectedValues.getComputedValue(property);
                StyleValue actual = actualValues.getComputedValue(property);
                assertEquals(property.getName(), expected, actual);
            }
        }
    }
View Full Code Here

    protected void outputDeclarationBody(MutablePropertyValues values) {
        Iterator iterator = values.stylePropertyIterator();
        boolean appended = false;
        while (iterator.hasNext()) {
            StyleProperty property = (StyleProperty) iterator.next();
            if (isOutputtable(values, property)) {
                StyleValue value = values.getComputedValue(property);
                if (value != null) {
                    if (appended) {
                        debug.append("; ");
                    } else {
                        appended = true;
                    }
                    debug.append(property.getName()).append(": ")
                            .append(value.getStandardCSS());
                    if (explicitlySpecifiedMarked &&
                            values.wasExplicitlySpecified(property)) {
                        debug.append("*");
                    }
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(
                        "Synchronisation is not supported for style pairs.");
View Full Code Here

        // Or is it a property element
        } else if (localName.equals(PROPERTY_ELEMENT_NAME)) {

            // Get the StylePropertyDetails object named by the element
            // (this is guaranteed to be non-null)
            final StyleProperty details = createStylePropertyDetails(attributes);

            // Get the list of StylePropertyDetails objects from the
            // category currently being processed (which may be empty
            // but may not be null) and add it in
            if (currentCategory != null) {
View Full Code Here

                "Missing attribute: " + NAME_ATTRIBUTE_NAME,
                null);
        }

        // Use the name to look up the details
        final StyleProperty details =
            StylePropertyDetails.getStyleProperty(nameValue);
        if (details == null) {
            throw new ExtendedSAXParseException(
                "Unknown StylePropertyDetails: " + nameValue,
                null);
View Full Code Here

TOP

Related Classes of com.volantis.styling.properties.StyleProperty

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.