Examples of SplitPane


Examples of nextapp.echo2.app.SplitPane

        loginWindow.setTitle("Welcome to the NextApp Echo2 Test Application");
        loginWindow.setStyleName("WelcomePane");
        loginWindow.setClosable(false);
        add(loginWindow);
       
        SplitPane splitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new Extent(32));
        loginWindow.add(splitPane);
       
        Row controlRow = new Row();
        controlRow.setStyleName("ControlPane");
        splitPane.add(controlRow);
       
        Button button = new Button("Continue", Styles.ICON_24_YES);
        button.setRenderId("WelcomePaneEnter");
        button.setId("EnterTestApplication");
        button.setStyleName("ControlPane.Button");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                InteractiveApp.getApp().displayTestPane();
            }
        });
        controlRow.add(button);
       
        Column infoColumn = new Column();
        infoColumn.setInsets(new Insets(20, 5));
        infoColumn.setCellSpacing(new Extent(10));
        splitPane.add(infoColumn);
       
        label = new Label("Please read the following before using the test application:");
        label.setFont(new Font(null, Font.BOLD, null));
        infoColumn.add(label);
       
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

            public void windowPaneClosing(WindowPaneEvent e) {
                processDiscard();
            }
        });
       
        SplitPane mainPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL, new Extent(32));
        add(mainPane);
       
        Row controlPane = new Row();
        controlPane.setStyleName("ControlPane");
        mainPane.add(controlPane);
       
        Button sendButton = new Button(Messages.getString("ComposeWindow.SendButton"),
                Styles.ICON_24_YES);
        sendButton.setStyleName("ControlPane.Button");
        sendButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (sendMessage()) {
                    ((EmailApp) getApplicationInstance()).getDefaultWindow().getContent().remove(ComposeWindow.this);
                }
            }
        });
        controlPane.add(sendButton);

        Button cancelButton = new Button(Messages.getString("ComposeWindow.DiscardButton"),
                Styles.ICON_24_NO);
        cancelButton.setStyleName("ControlPane.Button");
        cancelButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                processDiscard();
            }
        });
        controlPane.add(cancelButton);

        Column layoutColumn = new Column();
        layoutColumn.setCellSpacing(new Extent(10));
        layoutColumn.setInsets(new Insets(10));
        mainPane.add(layoutColumn);
       
        Grid headerGrid = new Grid();
        headerGrid.setInsets(new Insets(0, 2));
        layoutColumn.add(headerGrid);
       
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

    public MessageDialog(String title, String message, int type, int controlConfiguration) {
        super(title, new Extent(320), new Extent(240));
        setStyleName("Default");
        setModal(true);

        SplitPane splitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new Extent(32));
        add(splitPane);
       
        Row controlsRow = new Row();
        controlsRow.setStyleName("ControlPane");
        splitPane.add(controlsRow);

        Button button;
        switch (controlConfiguration) {
        case CONTROLS_OK:
            button = new Button(Messages.getString("Generic.Ok"), Styles.ICON_24_YES);
            button.setStyleName("ControlPane.Button");
            button.setActionCommand(COMMAND_OK);
            button.addActionListener(actionProcessor);
            controlsRow.add(button);
            break;
        case CONTROLS_YES_NO:
            button = new Button(Messages.getString("Generic.Yes"), Styles.ICON_24_YES);
            button.setStyleName("ControlPane.Button");
            button.setActionCommand(COMMAND_OK);
            button.addActionListener(actionProcessor);
            controlsRow.add(button);
            button = new Button(Messages.getString("Generic.No"), Styles.ICON_24_NO);
            button.setStyleName("ControlPane.Button");
            button.setActionCommand(COMMAND_CANCEL);
            button.addActionListener(actionProcessor);
            controlsRow.add(button);
            break;
        }
       
        Label contentLabel = new Label(message);
        contentLabel.setStyleName("MessageDialog.ContentLabel");
        splitPane.add(contentLabel);
       
        setModal(true);
    }
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

    /**
     * Test empty constructor and verify default state.
     */
    public void testEmptyConstructor() {
        SplitPane splitPane = new SplitPane();
        assertNull(splitPane.getSeparatorPosition());
        assertFalse(splitPane.isResizable());
    }
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

   
    /**
     * Test receiving input from client.
     */
    public void testInput() {
        SplitPane splitPane = new SplitPane();
        splitPane.add(new Label("one label"));
        splitPane.add(new Label("one more label"));
        splitPane.setSeparatorPosition(new Extent(80));
        splitPane.processInput(SplitPane.PROPERTY_SEPARATOR_POSITION, new Extent(212));
        assertEquals(new Extent(212), splitPane.getSeparatorPosition());
    }
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

   
    /**
     * Attempt to illegally add more than two children, tests for failure.
     */
    public void testOverload() {
        SplitPane splitPane = new SplitPane();
        splitPane.add(new Label("one label"));
        splitPane.add(new Label("one more label"));
        boolean exceptionThrown = false;
        try {
            splitPane.add(new Label("one label too many"));
        } catch (IllegalChildException ex) {
            exceptionThrown = true;
        }
        assertTrue(exceptionThrown);
    }
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

    /**
     * Test primary constructor.
     */
    public void testPrimaryConstructor() {
        SplitPane splitPane;
        splitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL, TestConstants.EXTENT_200_PX);
        assertEquals(SplitPane.ORIENTATION_VERTICAL, splitPane.getOrientation());
        assertEquals(TestConstants.EXTENT_200_PX, splitPane.getSeparatorPosition());
       
        splitPane = new SplitPane(SplitPane.ORIENTATION_HORIZONTAL, TestConstants.EXTENT_500_PX);
        assertEquals(SplitPane.ORIENTATION_HORIZONTAL, splitPane.getOrientation());
        assertEquals(TestConstants.EXTENT_500_PX, splitPane.getSeparatorPosition());
    }
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

   
    /**
     * Test property accessors and mutators.
     */
    public void testProperties() {
        SplitPane splitPane = new SplitPane();
        splitPane.setOrientation(SplitPane.ORIENTATION_VERTICAL);
        assertEquals(SplitPane.ORIENTATION_VERTICAL, splitPane.getOrientation());
        splitPane.setSeparatorPosition(TestConstants.EXTENT_200_PX);
        assertEquals(TestConstants.EXTENT_200_PX, splitPane.getSeparatorPosition());
        splitPane.setSeparatorHeight(TestConstants.EXTENT_30_PX);
        assertEquals(TestConstants.EXTENT_30_PX, splitPane.getSeparatorHeight());
        splitPane.setSeparatorWidth(TestConstants.EXTENT_100_PX);
        assertEquals(TestConstants.EXTENT_100_PX, splitPane.getSeparatorWidth());
        splitPane.setSeparatorColor(Color.RED);
        assertEquals(Color.RED, splitPane.getSeparatorColor());
        splitPane.setResizable(true);
        assertEquals(true, splitPane.isResizable());
        splitPane.setSeparatorHorizontalImage(TestConstants.BACKGROUND_IMAGE);
        assertEquals(TestConstants.BACKGROUND_IMAGE, splitPane.getSeparatorHorizontalImage());
        splitPane.setSeparatorVerticalImage(TestConstants.BACKGROUND_IMAGE);
        splitPane.setSeparatorHorizontalImage(null);
        assertEquals(TestConstants.BACKGROUND_IMAGE, splitPane.getSeparatorVerticalImage());
    }
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

   
    /**
     * Attempt to illegally add WindowPane to SplitPane, test for failure.
     */
    public void testInvalidParent() {
        SplitPane splitPane = new SplitPane();
        WindowPane windowPane = new WindowPane();
        boolean exceptionThrown = false;
        try {
            splitPane.add(windowPane);
        } catch (IllegalChildException ex) {
            exceptionThrown = true;
        }
        assertTrue(exceptionThrown);
    }
View Full Code Here

Examples of nextapp.echo2.app.SplitPane

    public ConsoleWindowPane() {
        super();
        setTitle("Console");
        setStyleName("Default");
       
        SplitPane splitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new Extent(32));
        add(splitPane);
       
        Row controlRow = new Row();
        controlRow.setStyleName("ControlPane");
        splitPane.add(controlRow);
       
        Button button = new Button("Clear", Styles.ICON_24_NO);
        button.setStyleName("ControlPane.Button");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                column.removeAll();
            }
        });
        controlRow.add(button);
       
        SplitPaneLayoutData splitPaneLayoutData;
        logPane = new ContentPane();
        logPane.setFont(new Font(Font.MONOSPACE, Font.PLAIN, new Extent(10)));
        logPane.setForeground(Color.GREEN);
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(Color.BLACK);
        logPane.setLayoutData(splitPaneLayoutData);
        splitPane.add(logPane);
       
        column = new Column();
        column.setInsets(new Insets(5));
        logPane.add(column);
    }
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.