Package nextapp.echo2.app

Examples of nextapp.echo2.app.Component


    class CrTblAddresses implements TableCellRenderer {

        private static final long serialVersionUID = -5623959513895038767L;

        public Component getTableCellRendererComponent(Table table, Object value, int column, int row) {
            Label label;
            if (value != null) {
                label = new Label(value.toString());
            } else {
                label = new Label("");
            }

            if (row % 2 == 0) {
                label.setStyleName("MessageListTable.EvenRowLabel");
            } else {
                label.setStyleName("MessageListTable.OddRowLabel");
            }
            return label;
        }
View Full Code Here


        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) {
            String[] lines = ((String) message).split("\n");

            if (lines.length > 1) {
                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) {
View Full Code Here

        this.getBtnMain().setBackground(Color.WHITE);
        this.getBtnMain().setBorder(BorderEx.NONE);
        this.getBtnMain().setRolloverBackground(Color.WHITE);
        this.getBtnMain().setRolloverBorder(BorderEx.NONE);

        this.setToggleIcon(new ResourceImageReference(IMG_DROPDOWN));
        this.setTogglePressedIcon(new ResourceImageReference(IMG_DROPDOWN));
        this.setToggleRolloverIcon(new ResourceImageReference(IMG_DROPDOWN));
       

        /*
        this.getBtnMain().addActionListener(new ActionListener() {

View Full Code Here

     * @param title The title of the button
     */
    public JbsAccPaneButton(String imgFileName, String title) {
        super();
        try {
            ResourceImageReference ref = new ResourceImageReference(Styles.getIconPath() + imgFileName);
            this.setIcon(ref);
        } catch (Exception e) {
            logger.debug(Styles.getIconPath() + imgFileName + " not found.");
        }
        this.setStyleName("Default");
View Full Code Here

        this.setBorder(BorderEx.NONE);
        this.setRolloverBorder(BorderEx.NONE);
        this.setTarget(this.getBtnMain());
        this.setPopUp(this.getMnuMain());
        this.setToggleIcon(new ResourceImageReference(IMG_DROPDOWN));
        this.setTogglePressedIcon(new ResourceImageReference(IMG_DROPDOWN));
        this.setToggleRolloverIcon(new ResourceImageReference(IMG_DROPDOWN));
    }
View Full Code Here

    private Logger logger = Logger.getLogger(BtnToolbar.class);
    private static final long serialVersionUID = 176100334500789000L;

    public BtnToolbar(String imgFileName) {
        super();
        ResourceImageReference ref = new ResourceImageReference(Styles.getIconPath() + imgFileName);
        if (ref != null) {
            this.setIcon(ref);
        } else {
            logger.warn("Image " + imgFileName + " not found.");
        }
View Full Code Here

                    break; // no icon
            }

            if (iconName != null) {
                final String imagePath = Styles.getIconPath(); //"../resource/images/";
                messageIcons[messageType] = new ResourceImageReference(
                        imagePath + iconName, new JbsExtent(ICON_HEIGHT), new JbsExtent(ICON_HEIGHT));
            }
        }

        return messageIcons[messageType];
View Full Code Here

    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

TOP

Related Classes of nextapp.echo2.app.Component

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.