Search in sources :

Example 26 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project pentaho-platform by pentaho.

the class UserRolesAdminPanel method createSystemRolesPanel.

private Widget createSystemRolesPanel() {
    HorizontalPanel mainSystemRolesPanel = new HorizontalPanel();
    mainSystemRolesPanel.getElement().setId("admin-system-roles-panel");
    SimplePanel hSpacer = new SimplePanel();
    hSpacer.setWidth("15px");
    mainSystemRolesPanel.add(hSpacer);
    VerticalPanel availablePanel = new VerticalPanel();
    mainSystemRolesPanel.add(availablePanel);
    hSpacer = new SimplePanel();
    hSpacer.setHeight("15px");
    availablePanel.add(hSpacer);
    HorizontalPanel labelAndButtonsPanel = new HorizontalPanel();
    availablePanel.add(labelAndButtonsPanel);
    labelAndButtonsPanel.add(new Label(Messages.getString("rolesColon")));
    labelAndButtonsPanel.setStyleName("pentaho-fieldgroup-minor");
    systemRolesListBox = new ListBoxTitle(true);
    HorizontalScrollWrapper systemRolesListBoxWrapper = new HorizontalScrollWrapper(systemRolesListBox);
    availablePanel.add(systemRolesListBoxWrapper);
    availablePanel.setCellHeight(systemRolesListBoxWrapper, "100%");
    systemRolesListBox.setVisibleItemCount(20);
    systemRolesListBox.addStyleName("users-roles-list");
    hSpacer = new SimplePanel();
    hSpacer.setWidth("24px");
    mainSystemRolesPanel.add(hSpacer);
    VerticalPanel detailsPanel = new VerticalPanel();
    detailsPanel.getElement().setId("details-panel");
    mainSystemRolesPanel.add(detailsPanel);
    mainSystemRolesPanel.setCellWidth(detailsPanel, "100%");
    hSpacer = new SimplePanel();
    hSpacer.setHeight("15px");
    detailsPanel.add(hSpacer);
    // todo check if replacement required
    systemRolesPermissionsPanel = new PermissionsPanel(systemRolesListBox);
    detailsPanel.add(systemRolesPermissionsPanel);
    detailsPanel.setCellHeight(systemRolesPermissionsPanel, "100%");
    return mainSystemRolesPanel;
}
Also used : VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) Label(com.google.gwt.user.client.ui.Label) SimplePanel(com.google.gwt.user.client.ui.SimplePanel) ListBoxTitle(org.pentaho.mantle.client.ui.custom.ListBoxTitle) HorizontalScrollWrapper(org.pentaho.mantle.client.ui.custom.HorizontalScrollWrapper)

Example 27 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project pentaho-platform by pentaho.

the class ChangePasswordDialog method getDialogContents.

public Panel getDialogContents() {
    VerticalPanel vp = new VerticalPanel();
    Label nameLabel = new Label(Messages.getString("newPassword") + ":");
    vp.add(nameLabel);
    vp.add(newPasswordTextBox);
    SimplePanel separatorSpacer = new SimplePanel();
    separatorSpacer.setStylePrimaryName("spacer");
    vp.add(separatorSpacer);
    Label passwordLabel = new Label(Messages.getString("retypePassword") + ":");
    vp.add(passwordLabel);
    vp.add(reTypePasswordTextBox);
    separatorSpacer = new SimplePanel();
    separatorSpacer.setStylePrimaryName("spacer");
    vp.add(separatorSpacer);
    separatorSpacer = new SimplePanel();
    separatorSpacer.setStylePrimaryName("spacer");
    separatorSpacer.addStyleDependentName("border-top");
    vp.add(separatorSpacer);
    Label administratorLabel = new Label(Messages.getString("administratorPassword") + ":");
    vp.add(administratorLabel);
    vp.add(administratorPasswordTextBox);
    return vp;
}
Also used : VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) Label(com.google.gwt.user.client.ui.Label) SimplePanel(com.google.gwt.user.client.ui.SimplePanel)

Example 28 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project pentaho-platform by pentaho.

the class EmailAdminPanel method createEmailPanel.

private Widget createEmailPanel() {
    VerticalPanel mailPanel = new VerticalPanel();
    Label mailServerLabel = new Label(Messages.getString("mailServer"));
    mailServerLabel.setStyleName("pentaho-fieldgroup-major");
    mailPanel.add(mailServerLabel);
    SimplePanel vSpacer = new SimplePanel();
    vSpacer.setHeight("20px");
    mailPanel.add(vSpacer);
    Label serverSettingsLabel = new Label(Messages.getString("serverSettings"));
    serverSettingsLabel.setStyleName("pentaho-fieldgroup-minor");
    mailPanel.add(serverSettingsLabel);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("20px");
    mailPanel.add(vSpacer);
    mailPanel.add(new Label(Messages.getString("smtpHost") + ":"));
    smtpHostTextBox = new TextBox();
    smtpHostTextBox.setWidth("220px");
    mailPanel.add(smtpHostTextBox);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("10px");
    mailPanel.add(vSpacer);
    mailPanel.add(new Label(Messages.getString("port") + ":"));
    portTextBox = new TextBox();
    portTextBox.setWidth("220px");
    mailPanel.add(portTextBox);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("10px");
    mailPanel.add(vSpacer);
    authenticationCheckBox = new CheckBox(Messages.getString("useAuthentication"));
    mailPanel.add(authenticationCheckBox);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("10px");
    mailPanel.add(vSpacer);
    authenticationPanel = new VerticalPanel();
    mailPanel.add(authenticationPanel);
    authenticationPanel.add(new Label(Messages.getString("userName") + ":"));
    userNameTextBox = new TextBox();
    userNameTextBox.setWidth("220px");
    authenticationPanel.add(userNameTextBox);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("10px");
    authenticationPanel.add(vSpacer);
    authenticationPanel.add(new Label(Messages.getString("password") + ":"));
    HorizontalPanel hPanel = new HorizontalPanel();
    passwordTextBox = new PasswordTextBox();
    passwordTextBox.setWidth("220px");
    hPanel.add(passwordTextBox);
    SimplePanel hSpacer = new SimplePanel();
    hSpacer = new SimplePanel();
    hSpacer.setWidth("15px");
    hPanel.add(hSpacer);
    authenticationPanel.add(hPanel);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("10px");
    mailPanel.add(vSpacer);
    HorizontalPanel protocolHbox = new HorizontalPanel();
    protocolHbox.add(new Label(Messages.getString("protocol") + ":"));
    protocolHbox.getElement().setId("protocolPanel");
    hSpacer = new SimplePanel();
    hSpacer.setWidth("15px");
    protocolHbox.add(hSpacer);
    protocolsListBox = new ListBox();
    protocolsListBox.addItem(Messages.getString("smtp"));
    protocolsListBox.addItem(Messages.getString("smtps"));
    protocolHbox.add(protocolsListBox);
    mailPanel.add(protocolHbox);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("10px");
    mailPanel.add(vSpacer);
    Label emailOrginLabel = new Label(Messages.getString("emailOriginLabel"));
    mailPanel.add(emailOrginLabel);
    fromAddressTextBox = new TextBox();
    fromAddressTextBox.setWidth("220px");
    mailPanel.add(fromAddressTextBox);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("10px");
    mailPanel.add(vSpacer);
    Label emailFromName = new Label(Messages.getString("emailFromNameLabel"));
    mailPanel.add(emailFromName);
    fromNameTextBox = new TextBox();
    fromNameTextBox.setWidth("220px");
    mailPanel.add(fromNameTextBox);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("10px");
    mailPanel.add(vSpacer);
    useStartTLSCheckBox = new CheckBox(Messages.getString("useStartTLS"));
    mailPanel.add(useStartTLSCheckBox);
    useSSLCheckBox = new CheckBox(Messages.getString("useSSL"));
    mailPanel.add(useSSLCheckBox);
    // debuggingCheckBox = new CheckBox(Messages.getString("enableDebugging"));
    // mailPanel.add(debuggingCheckBox);
    vSpacer = new SimplePanel();
    vSpacer.setHeight("20px");
    mailPanel.add(vSpacer);
    HorizontalPanel buttonsPanel = new HorizontalPanel();
    mailPanel.add(buttonsPanel);
    testButton = new Button(Messages.getString("connectionTest.label"));
    testButton.setStylePrimaryName("pentaho-button");
    buttonsPanel.add(testButton);
    hSpacer = new SimplePanel();
    hSpacer.setWidth("10px");
    buttonsPanel.add(hSpacer);
    saveButton = new Button(Messages.getString("save"));
    saveButton.setStylePrimaryName("pentaho-button");
    buttonsPanel.add(saveButton);
    return mailPanel;
}
Also used : VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) Button(com.google.gwt.user.client.ui.Button) CheckBox(com.google.gwt.user.client.ui.CheckBox) Label(com.google.gwt.user.client.ui.Label) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) SimplePanel(com.google.gwt.user.client.ui.SimplePanel) TextBox(com.google.gwt.user.client.ui.TextBox) PasswordTextBox(com.google.gwt.user.client.ui.PasswordTextBox) PasswordTextBox(com.google.gwt.user.client.ui.PasswordTextBox) ListBox(com.google.gwt.user.client.ui.ListBox)

Example 29 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project che by eclipse.

the class NotificationContainerItem method createCloseWidget.

/**
     * Create close icon widget that contains an close notification icon.
     *
     * @return {@link SimplePanel} as close icon wrapper
     */
private SimplePanel createCloseWidget() {
    SimplePanel closeWrapper = new SimplePanel();
    SVGImage closeImage = new SVGImage(resources.closeIcon());
    closeImage.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onClose(notification);
        }
    });
    closeWrapper.add(closeImage);
    closeWrapper.setStyleName(resources.notificationCss().notificationCloseButtonWrapper());
    closeImage.ensureDebugId(CLOSE_ICON_DBG_ID + notification.getId());
    return closeWrapper;
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SimplePanel(com.google.gwt.user.client.ui.SimplePanel) SVGImage(org.vectomatic.dom.svg.ui.SVGImage)

Example 30 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project che by eclipse.

the class NotificationContainerItem method createIconWidget.

/**
     * Create icon wrapper that contains an icon.
     *
     * @return {@link SimplePanel} as icon wrapper
     */
private SimplePanel createIconWidget() {
    SimplePanel iconWrapper = new SimplePanel();
    iconWrapper.setStyleName(resources.notificationCss().notificationIconWrapper());
    iconWrapper.ensureDebugId(ICON_DBG_ID + notification.getId());
    return iconWrapper;
}
Also used : SimplePanel(com.google.gwt.user.client.ui.SimplePanel)

Aggregations

SimplePanel (com.google.gwt.user.client.ui.SimplePanel)60 Label (com.google.gwt.user.client.ui.Label)19 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)14 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)9 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)7 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)7 HTML (com.google.gwt.user.client.ui.HTML)7 Test (org.junit.Test)5 Element (com.google.gwt.dom.client.Element)4 Style (com.google.gwt.dom.client.Style)4 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)4 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)4 Button (com.google.gwt.user.client.ui.Button)4 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)4 ListHandler (com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler)3 Image (com.google.gwt.user.client.ui.Image)3 Widget (com.google.gwt.user.client.ui.Widget)3 HorizontalScrollWrapper (org.pentaho.mantle.client.ui.custom.HorizontalScrollWrapper)3 ListBoxTitle (org.pentaho.mantle.client.ui.custom.ListBoxTitle)3 Context (com.google.gwt.cell.client.Cell.Context)2