Package nextapp.echo2.app

Examples of nextapp.echo2.app.Row


    protected JbsLangEntryHelper createTextField(JbsLanguage language) {
        return new JbsLangEntryTextArea(language);
    }

    protected void initPanel() {
        Column colMain = new Column();
        colMain.setInsets(new Insets(5, 5));

        Iterator<JbsLangEntryHelper> it = this.getTextFields().iterator();
        while (it.hasNext()) {
            JbsLangEntryTextArea txtField = (JbsLangEntryTextArea) it.next();
            txtField.setWidth(new JbsExtent(400, JbsExtent.PX));
            txtField.setHeight(new JbsExtent(300, JbsExtent.PX));
            colMain.add(new Label(txtField.getLanguage().getName()));
            colMain.add(txtField);
        }

        this.getPnMain().add(colMain);
    }
View Full Code Here


                editTexts();
            }

        });

        Column column = new Column();
        column.add(this.getTextArea());
        column.add(this.getBtnSelect());
        this.add(column);
    }
View Full Code Here

    /**
     * Adds a button to the toolbar
     * @param button
     */
    public void addButton(BtnToolbar button) {
        Column colButton = new Column();
        colButton.setInsets(new Insets(5));
        colButton.add(button);
        this.add(colButton);
    }
View Full Code Here

    /**
     * Adds a component to the Toolbar
     * @param comp
     */
    public void addComponent(Component comp) {
        Column colButton = new Column();
        colButton.setInsets(new Insets(5));
        colButton.add(comp);
        this.add(colButton);
    }
View Full Code Here

                message = lines;
            }
        }


        Column messageColumn = new Column();

        if (message.getClass().isArray()) {
            Object[] messageList = (Object[]) message;
            for (int i = 0; i < messageList.length; i++) {
                messageColumn.add(new Label(messageList[i].toString()));
            }
        } else {
            messageColumn.add(new Label(message.toString()));
        }
        final int labelCount = messageColumn.getComponentCount();
       
        JbsButton btnDetails = null;
        if (exception!=null) {
            btnDetails = new JbsButton("Details...");
            btnDetails.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent arg0) {
                    showException(exception);
                }
            });
        }


        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);
        for (int i = 0; i < buttons.size(); i++) {
            buttonPanel.add((AbstractButton) buttons.get(i));
        }

        Column mainColumn = new Column();
        mainColumn.setCellSpacing(new JbsExtent(COMMAND_SEPARATION));
        mainColumn.add(topRow);
        mainColumn.add(buttonPanel);

        add(mainColumn);

        int dialogHeight = /*titleHeight*/ 60 + DIALOG_INSETS * 2 +
                Math.max(LABEL_HEIGHT * labelCount, iconHeight) +
View Full Code Here

    /**
     * Adds all controls to the panel
     */
    protected void addControls() {
        super.addControls();
        colMain = new Column();
        colMain.add(this.getTbMain());
       
        initKeyStrokeListener();

        //this.add(colMain);
View Full Code Here

*/
public class CrTblTransactions extends CrTblJbsBaseObject {

    @Override
    public Component getTableCellRendererComponent(Table table, Object value, int column, int row) {
        Component component = super.getTableCellRendererComponent(table, value, column, row);
       
        if (component instanceof Label) {
            //TableLayoutData layoutData = new TableLayoutData();
            int align;
            switch (column) {
View Full Code Here

     */
    @Override
    protected void createControls() throws Exception {
        super.createControls();
        this.tbMain = new JbsToolbar();
        this.pnMain = new ContentPane();
       
        this.btnNew = new JbsObjectToolPaneButton("add.png",JbsL10N.getString("StdList.newCaption"),false);
        this.btnNew.setToolTipText(JbsL10N.getString("StdList.newTooltip"));
        this.btnNew.addActionListener(new ActionListener() {
       
View Full Code Here

    protected JbsLangEntryHelper createTextField(JbsLanguage language) {
        return new JbsLangEntryTextField(language);
    }

    protected void initPanel() {
        Grid grdMain = new Grid(2);
        grdMain.setInsets(new nextapp.echo2.app.Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));

        Iterator<JbsLangEntryHelper> it = this.getTextFields().iterator();
        while (it.hasNext()) {
            JbsLangEntryTextField txtField = (JbsLangEntryTextField) it.next();
            grdMain.add(new Label(txtField.getLanguage().getName()));
            grdMain.add(txtField);
        }

        this.getPnMain().add(grdMain);
    }
View Full Code Here

        this.setStyleName("Default");
        this.setMaximizable(false);
        this.setMinimizable(false);
        this.setResizable(false);
        this.setModal(true);
        ImageReference icon = getMessageIcon(messageType);
        Label iconLabel = new Label("");
        int iconHeight = 0;
        if (icon != null) {
            iconLabel.setIcon(icon);
            iconHeight = icon.getHeight().getValue();
        }


        // Split newlines into multiple labels
        if (message instanceof String) {
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Row

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.