Package nextapp.echo2.app

Examples of nextapp.echo2.app.Window


    public void addControl(String groupName, Component control) {
        this.addControl(groupName, groupName, control);
    }

    public void addSeparator(String groupName) {
        Row row = new Row();
        ColumnLayoutData layout = new ColumnLayoutData();
        layout.setHeight(new JbsExtent(15, JbsExtent.PX));
        row.setLayoutData(layout);
        this.addControl(groupName, row);
    }
View Full Code Here


        spMain.add(pnMain);
    }

    protected JbsContentPane initPnButtons() {
        pnButtons = new JbsContentPane();
        Row mainRow = new Row();
        mainRow.setAlignment(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
        mainRow.setInsets(new Insets(new JbsExtent(5), new JbsExtent(5)));

        btnOK = new JbsButton(JbsL10N.getString("Generic.ok"));
        btnOK.setAlignmentHorizontal(Alignment.CENTER);
        btnOK.setWidth(new JbsExtent(80));
        btnOK.addActionListener(new ActionListener() {

            private static final long serialVersionUID = 1L;

            public void actionPerformed(ActionEvent arg0) {
                postDialog();
            }
        });
        mainRow.add(btnOK);

        btnCancel = new JbsButton(JbsL10N.getString("Generic.cancel"));
        btnCancel.setAlignmentHorizontal(Alignment.CENTER);
        btnCancel.setWidth(new JbsExtent(80));
        btnCancel.addActionListener(new ActionListener() {

            private static final long serialVersionUID = 1L;

            public void actionPerformed(ActionEvent arg0) {
                cancelDialog();
            }
        });
        mainRow.add(btnCancel);

        /*
        KeyStrokeListener ks = new KeyStrokeListener();
        ks.addKeyCombination(KeyStrokeListener.VK_RETURN,"OK");
        ks.addKeyCombination(KeyStrokeListener.VK_ESCAPE,"CANCEL");
        ks.addActionListener(new ActionListener() {
        private static final long serialVersionUID = 1L;
        public void actionPerformed(ActionEvent arg0) {
        if (arg0.getActionCommand().equals("OK"))
        postDialog();
        else if (arg0.getActionCommand().equals("CANCEL"))
        cancelDialog();
        }
        });
        mainRow.add(ks);
        mainRow.add(this.createKeyStrokeListener());
         */
        mainRow.add(this.getKeystrokeListener());
        pnButtons.add(mainRow);
        return pnButtons;
    }
View Full Code Here

        JbsLabel label = new JbsLabel(str);
        colMain.add(label);
    }
   
    public void addBlankLine() {
        Row row = new Row();
        ColumnLayoutData layout = new ColumnLayoutData();
        layout.setHeight(new JbsExtent(15,JbsExtent.PX));
        row.setLayoutData(layout);
        colMain.add(row);
    }
View Full Code Here

    protected void initForm() {
        super.initForm();

        ButtonGroup radioGroup = new ButtonGroup();
        Column colMain = new Column();
        Row row1 = new Row();
        row1.setAlignment(Alignment.ALIGN_TOP);
        rbNoDate = new JbsRadioButton();
        rbNoDate.setText(JbsL10N.getString("FmSelectDate.noDate"));
        rbNoDate.setGroup(radioGroup);
        row1.add(rbNoDate);
        colMain.add(row1);
        Row row2 = new Row();
        row2.setAlignment(Alignment.ALIGN_TOP);
        rbDate = new JbsRadioButton();
        rbDate.setText(JbsL10N.getString("FmSelectDate.selectDate") + ":");
        rbDate.setGroup(radioGroup);
        row2.add(rbDate);
        colMain.add(row2);
        //Row row3 = new Row();
        dtMain = new DateChooser();
        row2.add(dtMain);
        //colMain.add(row3);
        this.getPnMain().add(colMain);
    }
View Full Code Here

        textField = new JbsTextField();

        this.getTextField().setDisabledBackground(this.getTextField().getBackground());
        this.getTextField().setDisabledForeground(this.getTextField().getForeground());

        Row row = new Row();
        row.add(textField);
        row.add(btnSelect);
        this.add(row);
    }
View Full Code Here

                }
            });
        }


        Row topRow = new Row();
        topRow.setCellSpacing(new JbsExtent(DIALOG_INSETS));
        topRow.add(iconLabel);
        topRow.add(messageColumn);

        KeyStrokeListener ks = new KeyStrokeListener();

        ArrayList<JbsButton> buttons = new ArrayList<JbsButton>();

        if (optionType == DEFAULT_OPTION) {
            buttons.add(defaultButton = createButton(JbsL10N.getString("Generic.ok"), OK_OPTION));
            ks.addKeyCombination(KeyStrokeListener.VK_RETURN, OK_OPTION);
        } else if (optionType == YES_NO_OPTION) {
            buttons.add(defaultButton = createButton(JbsL10N.getString("Generic.yes"), YES_OPTION));
            ks.addKeyCombination(KeyStrokeListener.VK_RETURN, YES_OPTION);
            buttons.add(createButton(JbsL10N.getString("Generic.no"), NO_OPTION));
            ks.addKeyCombination(KeyStrokeListener.VK_ESCAPE, NO_OPTION);
        } else if (optionType == YES_NO_CANCEL_OPTION) {
            buttons.add(defaultButton = createButton(JbsL10N.getString("Generic.yes"), YES_OPTION));
            ks.addKeyCombination(KeyStrokeListener.VK_RETURN, YES_OPTION);
            buttons.add(createButton(JbsL10N.getString("Generic.no"), NO_OPTION));
            buttons.add(createButton(JbsL10N.getString("Generic.cancel"), CANCEL_OPTION));
            ks.addKeyCombination(KeyStrokeListener.VK_ESCAPE, CANCEL_OPTION);
        } else if (optionType == OK_CANCEL_OPTION) {
            buttons.add(defaultButton = createButton(JbsL10N.getString("Generic.ok"), OK_OPTION));
            ks.addKeyCombination(KeyStrokeListener.VK_RETURN, OK_OPTION);
            buttons.add(createButton(JbsL10N.getString("Generic.cancel"), CANCEL_OPTION));
            ks.addKeyCombination(KeyStrokeListener.VK_ESCAPE, CANCEL_OPTION);
        }
       
        if (btnDetails!=null)
            buttons.add(btnDetails);
       
        ks.addActionListener(this);
        topRow.add(ks);

        ButtonPanel buttonPanel = new ButtonPanel();
        ColumnLayoutData buttonPanelLayout = new ColumnLayoutData();
        buttonPanelLayout.setAlignment(new Alignment(Alignment.CENTER, Alignment.TOP));
        buttonPanel.setLayoutData(buttonPanelLayout);
View Full Code Here

        this.setMaximizable(false);
        this.setKeystrokeListener(this.createKeyStrokeListener());
        this.setPostOnEnterKey(true);
        this.setCancelOnEscKey(true);

        SplitPane spMain = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new JbsExtent(45));

        this.add(spMain);
        spMain.add(initPnButtons());

        pnMain = new JbsContentPane();
        spMain.add(pnMain);
    }
View Full Code Here

        ContainerContext cc = (ContainerContext) this.getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
        logger.debug("Servlet-URI: "+cc.getServletUri());
        cc.setServerDelayMessage(Styles.getServerDelayMsg());   
       

        mainWindow = new Window();
        mainWindow.setTitle("openJBS");
        //mainWindow.setContent(new PnMain());
        mainWindow.setContent(new PnLogin(mainWindow));
        return mainWindow;
    }
View Full Code Here

    /**
     * @see nextapp.echo2.app.ApplicationInstance#init()
     */
    public Window init() {
        setStyleSheet(Styles.DEFAULT_STYLE_SHEET);
        Window window = new Window();
        window.setTitle(Messages.getString("Application.Title.Window"));
        window.setContent(new LoginScreen());
        return window;
    }
View Full Code Here

   
    /**
     * @see nextapp.echo2.app.ApplicationInstance#init()
     */
    public Window init() {
        Window window = new Window();
        window.setTitle("Thousand Monkeys (Start)");
        ContentPane contentPane = new ContentPane();
        window.setContent(contentPane);
        monkey = new Monkey(contentPane);
        startGhostTask();
        return window;
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Window

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.