Package com.volantis.mcs.model.path

Examples of com.volantis.mcs.model.path.Step


    public Step removeStep() {
        if (steps == null || steps.isEmpty()) {
            throw new IllegalStateException("Cannot remove step as list is empty");
        }

        Step step = (Step) steps.remove(steps.size() - 1);
        return step;
    }
View Full Code Here


    public Path getCurrentPath() {
        return pathBuilder.getPath();
    }

    public void popStep(Step step) {
        Step removed = pathBuilder.removeStep();
        if (removed != step) {
            throw new IllegalStateException(
                    "Expected to remove " + step + " but removed " + removed);
        }
    }
View Full Code Here

        // The design page only displays the content for a variant. If the path
        // contains content, then focus the design page and display it.
        boolean seekingContent = true;
        for (int i = 0; i < path.getStepCount() && seekingContent; i++) {
            Step step = path.getStep(i);
            if (step instanceof PropertyStep) {
                PropertyStep property = (PropertyStep) step;
                if (PolicyModel.CONTENT.getName().equals(property.getProperty())) {
                    layoutDesignPart.setFocus(path);
                    setActivePage(indexOfDesignPart);
View Full Code Here

    // Javadoc inherited
    public void setFocus(Path path) {
        boolean seekingRules = true;
        int stepCount = path.getStepCount();
        for (int i = 0; i < stepCount && seekingRules; i++) {
            Step step = path.getStep(i);
            if (step instanceof PropertyStep) {
                PropertyStep property = (PropertyStep) step;
                if (ThemeModel.RULES.getName().equals(property.getProperty())) {
                    if ((i + 1) < stepCount) {
                        Step deviceIndexStep = path.getStep(i + 1);
                        if (deviceIndexStep instanceof IndexedStep) {
                            int deviceThemeIndex = ((IndexedStep) deviceIndexStep).getIndex();
                            ISelection newSelection = new StructuredSelection(ruleTable.getElementAt(deviceThemeIndex));
                            ruleTable.setSelection(newSelection, true);
                        }
View Full Code Here

    // Javadoc inherited
    public void setFocus(Path path) {
        boolean seekingVariants = true;
        int stepCount = path.getStepCount();
        for (int i = 0; i < stepCount && seekingVariants; i++) {
            Step step = path.getStep(i);
            if (step instanceof PropertyStep) {
                PropertyStep property = (PropertyStep) step;
                if (PolicyModel.VARIANTS.getName().equals(
                        property.getProperty())) {
                    if ((i + 1) < stepCount) {
                        Step variantIndexStep = path.getStep(i + 1);
                        if (variantIndexStep instanceof IndexedStep) {
                            int variantIndex =
                                    ((IndexedStep) variantIndexStep).getIndex();
                            ISelection newSelection = new StructuredSelection(
                                    viewer.getElementAt(variantIndex));
View Full Code Here

        // The design page only displays the content for a variant. If the path
        // contains content, then focus the design page and display it.
        boolean seekingContent = true;
        for (int i = 0; i < path.getStepCount() && seekingContent; i++) {
            Step step = path.getStep(i);
            if (step instanceof PropertyStep) {
                PropertyStep property = (PropertyStep) step;
                if (PolicyModel.CONTENT.getName().equals(property.getProperty())) {
                    design.setFocus(path);
                    setActivePage(designIndex);
View Full Code Here

    // Javadoc inherited
    public void setFocus(Path path) {
        boolean seekingStyleProperties = true;
        int stepCount = path.getStepCount();
        for (int i = 0; i < stepCount && seekingStyleProperties; i++) {
            Step step = path.getStep(i);
            if (step instanceof PropertyStep) {
                PropertyStep property = (PropertyStep) step;
                if (Rule.STYLE_PROPERTIES.getName().equals(property.getProperty())) {
                    if ((i + 1) < stepCount) {
                        Step stylePropertyStep = path.getStep(i + 1);
                        if (stylePropertyStep instanceof PropertyStep) {
                            String propertyName = ((PropertyStep) stylePropertyStep).getProperty();
                            focusStyleProperty(propertyName);
                        }
                    }
View Full Code Here

    // Javadoc inherited
    public void setFocus(Path path) {
        boolean seekingMetadata = true;
        int stepCount = path.getStepCount();
        for (int i = 0; i < stepCount && seekingMetadata; i++) {
            Step step = path.getStep(i);
            if (step instanceof PropertyStep) {
                PropertyStep property = (PropertyStep) step;
                if (PolicyModel.META_DATA.getName().equals(property.getProperty())) {
                    if ((i + 1) < stepCount) {
                        Step stylePropertyStep = path.getStep(i + 1);
                        if (stylePropertyStep instanceof PropertyStep) {
                            String propertyName = ((PropertyStep) stylePropertyStep).getProperty();
                            focusMetadata(propertyName);
                        }
                    }
View Full Code Here

    public void setAddress(Address address) {
        this.address = address;
    }

    public void validate(ValidationContext context) {
        Step step;

        step = context.pushPropertyStep(FIRST_NAME);
        checkIsSet(context, firstName, FIRST_NAME);
        context.popStep(step);
View Full Code Here

            Path path, boolean enclosing, final List proxies) {
        int count = path.getStepCount();

        AbstractProxy proxy = this;
        for (int s = 0; s < count && proxy != null; s += 1) {
            Step step = path.getStep(s);
            proxy = (AbstractProxy) proxy.traverse(step, enclosing, proxies);

            // For base proxies, get the concrete proxy if possible
            if (proxy instanceof BaseProxy) {
                Proxy concreteProxy = ((BaseProxy) proxy).getConcreteProxy();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.model.path.Step

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.