Package nextapp.echo2.app

Examples of nextapp.echo2.app.LayoutDirection


        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


    return this.getTabSheets().size();
  }

  public Component getTabAt(int index, boolean isSelected) {
    if ((index>=0) && (index<this.getTabSheets().size())) {
      Label lblTitle = new Label(this.getTabSheets().get(index).getTitle());
      return lblTitle;
    } else
      return null;
  }
View Full Code Here

    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

        JbsGrid grdMain = new JbsGrid(2);
        grdMain.setInsets(new Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));

        grdMain.add(new Label(JbsL10N.getString("Permissions.user")));
        grdMain.add(cbbUsers);
        grdMain.add(new Label(JbsL10N.getString("Permissions.read")));
        grdMain.add(cbReadUser);
       
        grdMain.add(new Label(JbsL10N.getString("Permissions.write")));
        grdMain.add(cbWriteUser);

        grdMain.add(new Label(JbsL10N.getString("Permissions.group")));
        grdMain.add(cbbGroups);
        grdMain.add(new Label(JbsL10N.getString("Permissions.read")));
        grdMain.add(cbReadGroup);
        grdMain.add(new Label(JbsL10N.getString("Permissions.write")));
        grdMain.add(cbWriteGroup);

        grdMain.add(new Label(JbsL10N.getString("Permissions.others")));
        grdMain.add(new Label(""));
        grdMain.add(new Label(JbsL10N.getString("Permissions.read")));
        grdMain.add(cbReadOther);
        grdMain.add(new Label(JbsL10N.getString("Permissions.write")));
        grdMain.add(cbWriteOther);
       
        this.add(grdMain);
    }
View Full Code Here

        JbsGrid grdMain = new JbsGrid(2);
        grdMain.setInsets(new Insets(5, 5));
        //grdMain.setColumnWidth(0,new JbsExtent(200));

        grdMain.add(new Label(JbsL10N.getString("JbsCompany.company")));
        grdMain.add(cbbCompanies);

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

        JbsGrid grdMain = new JbsGrid(2);
        grdMain.setInsets(new Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));

        grdMain.add(new Label(JbsL10N.getString("JbsUser.userName")));
        grdMain.add(txUserName);
        grdMain.add(new Label(JbsL10N.getString("JbsUser.password")));
        grdMain.add(txPassword);
        grdMain.add(new Label(JbsL10N.getString("JbsUser.addInfo")));
        grdMain.add(txAddInfo);
        grdMain.add(new Label(JbsL10N.getString("JbsUser.mainGroup")));
        grdMain.add(cbbMainGroup);

        grdMain.add(new Label(JbsL10N.getString("JbsUser.groupList")));
        grdMain.add(groupEditor);
        if (ClientGlobals.getUser().isRoot()) { //No other person is allowed to set companies for a user
            grdMain.add(new Label(JbsL10N.getString("JbsUser.companyList")));
            grdMain.add(companyEditor);
        }

        grdMain.add(new Label(JbsL10N.getString("JbsUser.contact")));
        grdMain.add(this.contactSelectField);
       
        grdMain.add(new Label(JbsL10N.getString("JbsUser.canChangePassword")));
        grdMain.add(this.cbCanChangePassword);

        grdMain.add(new Label(JbsL10N.getString("JbsUser.startModule")));
        grdMain.add(this.selStartModule);
       
        cpStdData.add(grdMain);
        this.add(cpStdData);
    }
View Full Code Here

        JbsGrid grdMain = new JbsGrid(2);
        grdMain.setInsets(new Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));

        grdMain.add(new Label(JbsL10N.getString("JbsCompany.name1")));
        grdMain.add(txName1);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.name2")));
        grdMain.add(txName2);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.name3")));
        grdMain.add(txName3);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.street")));
        grdMain.add(txStreet);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.zip")));
        grdMain.add(txZip);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.city")));
        grdMain.add(txCity);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.phone")));
        grdMain.add(txPhone);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.fax")));
        grdMain.add(txFax);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.email")));
        grdMain.add(txEmail);
        grdMain.add(new Label(JbsL10N.getString("JbsCompany.website")));
        grdMain.add(txWebsite);

        grdMain.add(new Label(JbsL10N.getString("JbsCompany.logo")));
        grdMain.add(usCompanyLogo);
        grdMain.add(new Label(""));
        grdMain.add(this.logoImage);

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

        Integer orientationValue = (Integer) splitPane.getRenderProperty(SplitPane.PROPERTY_ORIENTATION);
        int orientation = orientationValue == null ? SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING
                : orientationValue.intValue();
        if (orientation == SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING
                || orientation == SplitPane.ORIENTATION_HORIZONTAL_TRAILING_LEADING) {
            LayoutDirection layoutDirection = splitPane.getRenderLayoutDirection();
            if (orientation == SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING) {
                orientation = layoutDirection.isLeftToRight() ? SplitPane.ORIENTATION_HORIZONTAL_LEFT_RIGHT
                        : SplitPane.ORIENTATION_HORIZONTAL_RIGHT_LEFT;
            } else {
                orientation = layoutDirection.isLeftToRight() ? SplitPane.ORIENTATION_HORIZONTAL_RIGHT_LEFT
                        : SplitPane.ORIENTATION_HORIZONTAL_LEFT_RIGHT;
            }
        }
        return orientation;
    }
View Full Code Here

     * @param alignment the <code>Alignment</code> to analyze
     * @param component the <code>Component</code> to analyze
     * @return the horizontal alignment constant
     */
    public static int getRenderedHorizontal(Alignment alignment, Component component) {
        LayoutDirection layoutDirection;
        if (component == null) {
            layoutDirection = LayoutDirection.LTR;
        } else {
            layoutDirection = component.getRenderLayoutDirection();
        }
        switch (alignment.getHorizontal()) {
        case Alignment.LEADING:
            return layoutDirection.isLeftToRight() ? Alignment.LEFT : Alignment.RIGHT;
        case Alignment.TRAILING:
            return layoutDirection.isLeftToRight() ? Alignment.RIGHT : Alignment.LEFT;
        default:
            return alignment.getHorizontal();
        }
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.LayoutDirection

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.