Examples of AttributeSelector


Examples of br.com.starcode.parccser.model.AttributeSelector

                sb.append(id);
            } else if (current == '[') {
                //attribute selectors
                sb.append(current);
                next();
                AttributeSelector as = attribute();
                simpleSelectorList.add(as);
                parserListener.attributeSelector(as);
                sb.append(as);
                sb.append(']');
            } else if (current == ':') {
View Full Code Here

Examples of br.com.starcode.parccser.model.AttributeSelector

            throw new ParserException("Token ']' expected at position " + pos);
        }
        int endPos = pos;
        next();
       
        return new AttributeSelector(name, operator, value, new Context(content, sb.toString(), initialPos, endPos));
       
    }
View Full Code Here

Examples of br.com.starcode.parccser.model.AttributeSelector

            sb.append(id);
        } else if (current == '[') {
            //attribute selectors
            sb.append(current);
            next();
            AttributeSelector as = attribute();
            simpleSelector = as;
            parserListener.negationAttributeSelector(as);
            sb.append(as.getContext());
            sb.append(']');
        } else if (current == ':') {
            //pseudo-class only
            sb.append(current);
            next();
View Full Code Here

Examples of com.volantis.mcs.themes.AttributeSelector

        String attribute = attributeText.getText();
        AttributeSelectorActionEnum action =
                ACTIONS[actionsCombo.getSelectionIndex()];
        String value = valueText.getText();

        AttributeSelector selector = MODEL_FACTORY.createAttributeSelector();
        selector.setName(attribute);
        selector.setConstraint(action, value);
        return selector;
    }
View Full Code Here

Examples of com.volantis.mcs.themes.AttributeSelector

            attributeText.setText("");
            valueText.setText("");
            actionsCombo.select(0);
            updateValueEnabled();
        } else {
            AttributeSelector newSelector = (AttributeSelector) newValue;
            attributeText.setText(newSelector.getName());
            Constraint constraint = newSelector.getConstraint();
            valueText.setText(constraint.getValue());
            int selectedAction = -1;
            final AttributeSelectorActionEnum action =
                    AttributeSelectorActionEnum.
                    getAttributeSelectorActionEnum(constraint);
View Full Code Here

Examples of com.volantis.mcs.themes.AttributeSelector

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        AttributeSelector themeSelector = createAttributeSelector(constraint);
        SelectorSequence sequence = createSelectorSequence(themeSelector);

        MatcherBuilder builder = createMatcherBuilder();
        Matcher matcher = builder.getMatcher(sequence);
View Full Code Here

Examples of com.volantis.mcs.themes.AttributeSelector

    }

    private AttributeSelector createAttributeSelector(
            Constraint constraint) {

        AttributeSelector themeSelector =
                themeModelFactory.createAttributeSelector();

        themeSelector.setName("xyz");
        themeSelector.setConstraint(constraint);
        return themeSelector;
    }
View Full Code Here

Examples of com.volantis.mcs.themes.AttributeSelector

    private void initialiseSelectorSequence(
            StyleableFormat format, SelectorSequence sequence) {

        int instance = System.identityHashCode(format);
        AttributeSelector attributeSelector = factory.createAttributeSelector();
        attributeSelector.setName(FormatStylingConstants.FORMAT_IDENTIFIER);
        attributeSelector.setConstraint(AttributeSelectorActionEnum.EQUALS,
                String.valueOf(instance));

//        sequence.setElementSelector(typeSelector);
        sequence.addSelector(attributeSelector);
    }
View Full Code Here

Examples of jodd.csselly.selector.AttributeSelector

    assertEquals("div", cssSelector.getElement());
    assertEquals(1, cssSelector.selectorsCount());

    Selector selector = cssSelector.getSelector(0);
    assertEquals(Selector.Type.ATTRIBUTE, selector.getType());
    AttributeSelector attributeSelector = (AttributeSelector) selector;
    assertEquals("a1", attributeSelector.getName());
    assertEquals("=", attributeSelector.getMatch().getSign());
    assertEquals("123", attributeSelector.getValue());

    lexer = new CSSelly("div[ a1 = \"123\" ]");
    selectors = lexer.parse();
    assertEquals("div[a1=\"123\"]", CSSelly.toString(selectors));
  }
View Full Code Here

Examples of jodd.csselly.selector.AttributeSelector

    cssSelector = selectors.get(0);

    assertEquals("itunes:image", cssSelector.getElement());
    Selector selector = cssSelector.getSelector(0);

    AttributeSelector attributeSelector = (AttributeSelector)selector;

    assertEquals("foo:bar", attributeSelector.getValue());

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.