Examples of LayoutSequence


Examples of org.flexdock.perspective.LayoutSequence

    /**
     * @see org.flexdock.perspective.persist.xml.ISerializer#serialize(org.w3c.dom.Document, java.lang.Object)
     */
    public Element serialize(Document document, Object object) {
        LayoutSequence layoutSequence = (LayoutSequence) object;

        Element layoutSequenceElement = document.createElement(PersistenceConstants.LAYOUT_SEQUENCE_ELEMENT_NAME);

        List dockingStates = layoutSequence.getDockingStates();
        ISerializer dockableStateSerializer = SerializerRegistry.getSerializer(DockingState.class);
        for (int i = 0; i < dockingStates.size(); i++) {
            DockingState dockingState = (DockingState) dockingStates.get(i);
            Element dockingStateElement = dockableStateSerializer.serialize(document, dockingState);

View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

        return layoutSequenceElement;
    }

    public Object deserialize(Element element) {
        LayoutSequence layoutSequence = new LayoutSequence();

        NodeList dockingStateNodeList = element.getElementsByTagName(PersistenceConstants.DOCKING_STATE_ELEMENT_NAME);
        ISerializer dockingStateSerializer = SerializerRegistry.getSerializer(DockingState.class);
        for (int i=0; i<dockingStateNodeList.getLength(); i++) {
            Node dockingStateNode = dockingStateNodeList.item(i);
            if (dockingStateNode instanceof Element) {
                Element dockingStateElement = (Element) dockingStateNode;
                DockingState dockingState = (DockingState) dockingStateSerializer.deserialize(dockingStateElement);
                layoutSequence.add(dockingState);
            }
        }

        return layoutSequence;
    }
View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

        NodeList layoutSequenceNodeList = element.getElementsByTagName(PersistenceConstants.LAYOUT_SEQUENCE_ELEMENT_NAME);
        ISerializer layoutSequenceSerializer = SerializerRegistry.getSerializer(LayoutSequence.class);
        if (layoutSequenceNodeList.getLength() > 0 && layoutSequenceNodeList.item(0) instanceof Element) {
            Element layoutSequenceElement = (Element) layoutSequenceNodeList.item(0);
            LayoutSequence layoutSequence = (LayoutSequence) layoutSequenceSerializer.deserialize(layoutSequenceElement);
            perspective.setInitialSequence(layoutSequence);
        }

        return perspective;
    }
View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

            return null;
        }

        private Perspective createPerspective1() {
            Perspective perspective = new Perspective(P1, "Perspective1");
            LayoutSequence sequence = perspective.getInitialSequence(true);

            sequence.add(MAIN_VIEW);
            sequence.add(BIRD_VIEW, MAIN_VIEW, EAST_REGION, .3f);
            sequence.add(MESSAGE_VIEW, MAIN_VIEW, WEST_REGION, .3f);
            sequence.add(PROBLEM_VIEW, MESSAGE_VIEW);
            sequence.add(CONSOLE_VIEW, MESSAGE_VIEW);

            return perspective;
        }
View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

            return perspective;
        }

        private Perspective createPerspective2() {
            Perspective perspective = new Perspective(P2, "Perspective2");
            LayoutSequence sequence = perspective.getInitialSequence(true);

            sequence.add(MAIN_VIEW);
            sequence.add(BIRD_VIEW, MAIN_VIEW, WEST_REGION, .3f);
            sequence.add(MESSAGE_VIEW, BIRD_VIEW, SOUTH_REGION, .5f);
            sequence.add(PROBLEM_VIEW, MESSAGE_VIEW);
            sequence.add(CONSOLE_VIEW, MESSAGE_VIEW, EAST_REGION, .5f);

            return perspective;
        }
View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

            return perspective;
        }

        private Perspective createPerspective3() {
            Perspective perspective = new Perspective(P3, "Perspective3");
            LayoutSequence sequence = perspective.getInitialSequence(true);
            sequence.add(MAIN_VIEW);

            return perspective;
        }
View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

            return perspective;
        }

        private Perspective createPerspective2() {
            Perspective perspective = new Perspective(P2, "Perspective2");
            LayoutSequence sequence = perspective.getInitialSequence(true);

            sequence.add(MAIN_VIEW);
            sequence.add(BIRD_VIEW, MAIN_VIEW, WEST_REGION, .3f);
            sequence.add(MESSAGE_VIEW, BIRD_VIEW, SOUTH_REGION, .5f);
            sequence.add(PROBLEM_VIEW, MESSAGE_VIEW);
            sequence.add(CONSOLE_VIEW, MESSAGE_VIEW, EAST_REGION, .5f);

            return perspective;
        }
View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

            return perspective;
        }

        private Perspective createPerspective3() {
            Perspective perspective = new Perspective(P3, "Perspective3");
            LayoutSequence sequence = perspective.getInitialSequence(true);
            sequence.add(MAIN_VIEW);

            return perspective;
        }
View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

            return null;
        }

        private Perspective createPerspective1() {
            Perspective perspective = new Perspective(P1, "Perspective1");
            LayoutSequence sequence = perspective.getInitialSequence(true);

            sequence.add("main.view");
            sequence.add(BIRD_VIEW, "main.view", EAST_REGION, .3f);
            sequence.add(MESSAGE_VIEW, "main.view", WEST_REGION, .3f);
            sequence.add(PROBLEM_VIEW, MESSAGE_VIEW);
            sequence.add(CONSOLE_VIEW, MESSAGE_VIEW);

            return perspective;
        }
View Full Code Here

Examples of org.flexdock.perspective.LayoutSequence

            return null;
        }

        private Perspective createPerspective1() {
            Perspective perspective = new Perspective(P1, "Perspective1");
            LayoutSequence sequence = perspective.getInitialSequence(true);

            sequence.add(MAIN_VIEW);
            sequence.add(BIRD_VIEW, MAIN_VIEW, EAST_REGION, .3f);
            sequence.add(MESSAGE_VIEW, MAIN_VIEW, WEST_REGION, .3f);
            sequence.add(PROBLEM_VIEW, MESSAGE_VIEW);
            sequence.add(CONSOLE_VIEW, MESSAGE_VIEW);

            return perspective;
        }
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.