@Override protected void constructTopPanel() { FlexTable flexTable = new FlexTable(); flexTable.setCellSpacing(0); flexTable.setCellPadding(0); flexTable.setHeight("100%"); topPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); topPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); topPanel.add(flexTable); topPanel.setCellHeight(flexTable, "100%"); HorizontalPanel backButtonPanel = new HorizontalPanel(); backButtonPanel.setHeight("100%"); backButtonPanel.addStyleName(Utils.kaaAdminStyle.bAppPaddedPanel()); backButtonPanel.setVisible(false); Button backButton = new Button(); backButton.addStyleName(Utils.kaaAdminStyle.bAppBackButton()); backButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); backButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); backButtonPanel.add(backButton); backButtonPanel.setCellHeight(backButton, "100%"); HorizontalPanel firstRowPanel = new HorizontalPanel(); firstRowPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); firstRowPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); verticalPanel.add(firstRowPanel); HorizontalPanel secondRowPanel = new HorizontalPanel(); secondRowPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
super(false); supportPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); supportPanel.setWidth("1000px"); resetButton = new Button(Utils.constants.reset()); supportPanel.add(resetButton); listBox.getElement().getStyle().setPropertyPx("minWidth", 100); HorizontalPanel groupPanel = new HorizontalPanel(); groupPanel.setSpacing(15); groupPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); groupPanel.add(endpointGroupButton); groupPanel.add(listBox); supportPanel.add(groupPanel); HorizontalPanel keyHashPanel = new HorizontalPanel(); keyHashPanel.setSpacing(15); keyHashPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); endpointKeyHashButton = new RadioButton("filter", Utils.constants.endpointKeyHash()); endpointKeyHash = new TextBox(); endpointKeyHash.setWidth("100%"); findButton = new Button(Utils.constants.find()); findButton.addStyleName(Utils.avroUiStyle.buttonSmall()); keyHashPanel.add(endpointKeyHashButton); keyHashPanel.add(endpointKeyHash); keyHashPanel.add(findButton); supportPanel.add(keyHashPanel);
protected void appendToolbarWidget(Widget widget) { buttonsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); buttonsPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); buttonsPanel.add(widget); buttonsPanel.setCellHeight(widget, "100%"); }
final HorizontalPanel hp = new HorizontalPanel(); final Button saveButton = new Button("save"); final Button cancelButton = new Button("cancel"); // just to see the bounds of the HorizontalPanel hp.setWidth("600px"); hp.setBorderWidth(2); // It only applies to widgets added after this property is set. hp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); hp.add(saveButton); hp.add(cancelButton); RootPanel.get().add(hp);
protected void constructTopPanel() { FlowPanel panel = new FlowPanel(); panel.setSize("100%", "100%"); topPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); topPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); topPanel.add(panel); topPanel.setCellHeight(panel, "100%"); HorizontalPanel horizontalPanel = new HorizontalPanel(); horizontalPanel.setHeight("100%"); panel.add(horizontalPanel); HorizontalPanel backButtonPanel = new HorizontalPanel(); backButtonPanel.setHeight("100%"); backButtonPanel.addStyleName(Utils.kaaAdminStyle.bAppPaddedPanel()); backButtonPanel.setVisible(false); horizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); horizontalPanel.add(backButtonPanel); horizontalPanel.setCellHeight(backButtonPanel, "100%"); Button backButton = new Button(); backButton.addStyleName(Utils.kaaAdminStyle.bAppBackButton()); backButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); backButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); backButtonPanel.add(backButton); backButtonPanel.setCellHeight(backButton, "100%"); horizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); horizontalPanel.add(titleLabel);
VerticalPanel mainPanel = new VerticalPanel(); mainPanel.setBorderWidth(1); mainPanel.getElement().getStyle().setBackgroundColor("white"); final HTML titleBar = new HTML("<center><b>Logging</b></center>"); mainPanel.add(titleBar); new WindowMoveHandler(titleBar); scrollPanel.setPixelSize(300, 200); HorizontalPanel bottomBar = new HorizontalPanel(); mainPanel.add(bottomBar); bottomBar.setWidth("100%"); bottomBar.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); final Button maxmin = new Button("Minimize"); bottomBar.add(maxmin); maxmin.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (maxmin.getText().equals("Minimize")) { new HTML("<div style='font-size:200%; line-height:75%'>\u21F2</div>"); resizeIcon.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); bottomBar.add(resizeIcon); new WindowResizeHandler(resizeIcon);
getElement().getStyle().setZIndex( Integer.MAX_VALUE ); setGlassEnabled( true ); checkInCommentTextBox ); final HorizontalPanel hp = new HorizontalPanel(); final Button create = new Button( CommonConstants.INSTANCE.DeletePopupDelete() ); create.addClickHandler( new ClickHandler() { public void onClick( ClickEvent arg0 ) { hp.add( create ); final Button cancel = new Button( "Cancel" ); cancel.addClickHandler( new ClickHandler() { public void onClick( final ClickEvent arg0 ) { hp.add( new HTML( " " ) ); hp.add( cancel ); addAttribute( "", hp );
setModal(false); final VerticalPanel panel = new VerticalPanel(); final HorizontalPanel titleBar = new HorizontalPanel(); titleBar.getElement().getStyle().setProperty("backgroundColor", "#A9A9A9"); titleBar.getElement().getStyle().setWidth(100, Style.Unit.PCT); titleBar.getElement().getStyle().setProperty("borderBottom", "1px solid black"); titleBar.getElement().getStyle().setProperty("marginBottom", "5px"); titleBarLabel.getElement().getStyle().setColor("white"); titleBar.add(titleBarLabel); titleBar.setCellVerticalAlignment(titleBarLabel, HasVerticalAlignment.ALIGN_MIDDLE); final HorizontalPanel buttonPanel = new HorizontalPanel(); buttonPanel.add(showFurtherErrors); buttonPanel.add(disconnectFromServer); buttonPanel.add(clearErrors); buttonPanel.add(closeButton); buttonPanel.setCellVerticalAlignment(showFurtherErrors, HasVerticalAlignment.ALIGN_MIDDLE); titleBar.add(buttonPanel); titleBar.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_RIGHT); panel.add(titleBar);
VerticalPanel dialogContents = new VerticalPanel(); dialogContents.setSpacing(4); setWidget(dialogContents); dialogContents.add(errorPanel); FlexTable table = new FlexTable(); table.setCellSpacing(6); table.addStyleName(Utils.avroUiStyle.fieldWidget()); HorizontalPanel versionPanel = new HorizontalPanel(); versionPanel.add(schemaVersionLabel); versionPanel.add(schemaBox); table.setWidget(0, 0, versionPanel); schemaRecordPanel.getElement().getStyle().setPropertyPx("minWidth", 750); schemaRecordPanel.getRecordWidget().setForceNavigation(true); schemaRecordPanel.setPreferredHeightPx(250); dialogContents.add(table); saveButton = new Button(Utils.constants.save(), new ClickHandler() { @Override public void onClick(ClickEvent event) { saveButton.setEnabled(false);
HorizontalPanel schemaNamePanel = new HorizontalPanel(); schemaNamePanel.setHeight("40px"); schemaNamePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); Label endpointProfSchemaLabel = new Label(Utils.constants.schemaName()); schemaNamePanel.add(endpointProfSchemaLabel); schemaNamePanel.add(endpointProfSchemaName); schemaNamePanel.setCellWidth(endpointProfSchemaName, "200px"); endpointProfSchemaName.getElement().getParentElement().getStyle().setPaddingLeft(10, Unit.PX); HorizontalPanel schemaButtonsPanel = new HorizontalPanel(); schemaButtonsPanel.setSpacing(6); downloadEndpointProfileJsonButton = new ImageTextButton( Utils.resources.download(), Utils.constants.downloadJson()); schemaButtonsPanel.add(downloadEndpointProfileJsonButton); schemaNamePanel.add(schemaButtonsPanel); schemaButtonsPanel.getElement().getParentElement().getStyle().setPaddingLeft(10, Unit.PX); schemaNamePanel = new HorizontalPanel(); schemaNamePanel.setHeight("40px"); schemaNamePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); Label serverProfSchemaLabel = new Label(Utils.constants.schemaName()); schemaNamePanel.add(serverProfSchemaLabel); schemaNamePanel.add(serverProfSchemaName); schemaNamePanel.setCellWidth(serverProfSchemaName, "200px"); schemaButtonsPanel = new HorizontalPanel(); schemaButtonsPanel.setSpacing(6); downloadServerProfileJsonButton = new ImageTextButton( Utils.resources.download(), Utils.constants.downloadJson());
HorizontalPanel pagingPanel = new HorizontalPanel(); initWidget(pagingPanel); pagingPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); pagingPanel.setWidth("100%"); setStyleName(resources.getStyle().css().defaultStyleName()); loadingImage = new Image("scrollTableLoading.gif"); loadingImage.setVisible(false); buttonPanel = new HorizontalPanel(); buttonPanel.setSpacing(3); buttonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); buttonPanel.add(firstPageButton); buttonPanel.add(previousPageButton); if (pageCountAvailable) { buttonPanel.add(pageSlider); buttonPanel.add(currentPageBox); buttonPanel.add(nextPageButton); if (pageCountAvailable) { buttonPanel.add(lastPageButton); buttonPanel.add(loadingImage); pagingPanel.add(buttonPanel); pagingPanel.add(errorLabel);
getColumnFormatter().getElement(2).setAttribute("width", "0px"); FlexTable dateTable = new FlexTable(); FlexTable userTable = new FlexTable(); dateTable.getColumnFormatter().setWidth(0, "200px"); dateTable.getColumnFormatter().setWidth(1, "200px"); detailsTable.getColumnFormatter().getElement(2).setAttribute("width", "0px"); description.getTextArea().getElement().getStyle().setPropertyPx("minHeight", 100); Label descriptionLabel = new Label(Utils.constants.description()); descriptionLabel.setWidth("200px"); buttonsPanel = new HorizontalPanel(); buttonsPanel.setSpacing(5); detailsTable.setWidget(2, 0, buttonsPanel); detailsTable.getFlexCellFormatter().setColSpan(2, 0, 2); saveButton = new Button(Utils.constants.save()); activateButton = new Button(Utils.constants.activate()); deactivateButton = new Button(Utils.constants.deactivate()); buttonsPanel.add(saveButton); buttonsPanel.add(activateButton); buttonsPanel.add(deactivateButton);
VerticalPanel vPanel = new VerticalPanel(); HorizontalPanel hPanel = new HorizontalPanel(); vPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); Button ok = new Button("OK"); ok.addClickHandler(new ClickHandler() { public void onClick (ClickEvent event) { TextInputDialogBox.this.onPositive(); Button cancel = new Button("Cancel"); cancel.addClickHandler(new ClickHandler() { public void onClick (ClickEvent event) { hPanel.add(ok); hPanel.add(cancel); textBox.setWidth("97%"); textBox.setText(text); vPanel.add(textBox); vPanel.add(hPanel);
public WSModalDialog(String title) { window = new WSWindowPanel(title); dockPanel = new DockPanel(); dockPanel.setWidth("400px"); dockPanel.add(new Image(imageBundle.redFlag()), DockPanel.WEST); dockPanel.add(message, DockPanel.CENTER); message.getElement().getStyle().setProperty("padding", "0px"); HorizontalPanel buttonPanel = new HorizontalPanel(); okButton = new Button("OK"); okListener = new ClickCallbackListener(this, AcceptsCallback.MESSAGE_OK); okButton.addClickHandler(okListener); buttonPanel.add(okButton); cancelButton = new Button("Cancel"); cancelListener = new ClickCallbackListener(this, AcceptsCallback.MESSAGE_CANCEL); cancelButton.addClickHandler(cancelListener); dockPanel.add(cancelButton, DockPanel.SOUTH); buttonPanel.add(cancelButton); dockPanel.add(buttonPanel, DockPanel.SOUTH); dockPanel.setCellHorizontalAlignment(buttonPanel, DockPanel.ALIGN_RIGHT); dockPanel.setCellHeight(buttonPanel, "45px"); window.add(dockPanel); }
private Widget getCharacteristics() { characteristicsPanel = new VerticalPanel(); characteristicsTables = new ArrayList<FlexTable>(); final HorizontalPanel toolbar = new HorizontalPanel(); btnAddCharacteristic = new Button(GuidedScoreCardConstants.INSTANCE.addCharacteristic(), new ClickHandler() { public void onClick(ClickEvent event) { addCharacteristic(null); } }); toolbar.add(btnAddCharacteristic); toolbar.setHeight("24"); characteristicsPanel.add(toolbar); final SimplePanel gapPanel = new SimplePanel(); gapPanel.add(new HTML("<br/>")); characteristicsPanel.add(gapPanel); return characteristicsPanel; }
dialogBox.setGlassEnabled(true); VerticalPanel dialogVPanel = new VerticalPanel(); dialogVPanel.addStyleName("dialogVPanel"); dialogVPanel.add(new HTML("<b>" + title + "</b>")); dialogVPanel.add(new HTML("<br><b>" + message + "</b><br><br>")); dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER); HorizontalPanel buttons = new HorizontalPanel(); dialogVPanel.add(buttons); Button ok = new Button("OK"); buttons.add(ok); ok.addClickHandler(new ClickHandler() buttons.add(gap); Button cancel = new Button("Cancel"); buttons.add(cancel); cancel.addClickHandler(new ClickHandler()
createdUsername = new KaaAdminSizedTextBox(-1, false); createdUsername.setWidth("100%"); detailsTable.setWidget(1, 0, authorLabel); detailsTable.setWidget(1, 1, createdUsername); description.getTextArea().getElement().getStyle().setPropertyPx("minHeight", 80); Label descriptionLabel = new Label(Utils.constants.description()); detailsTable.setWidget(5, 0, descriptionLabel); detailsTable.getCellFormatter().setVerticalAlignment(5, 0, HasVerticalAlignment.ALIGN_TOP); HorizontalPanel ctlSwitchPanel = new HorizontalPanel(); detailsTable.setWidget(6, 0, ctlSwitchPanel); detailsTable.getFlexCellFormatter().setColSpan(6, 0, 2); ctlSwitchPanel.getElement().getStyle().setPaddingTop(10, Unit.PX); ctlSwitchPanel.getElement().getStyle().setPaddingBottom(10, Unit.PX); existingCtlButton = new ToggleButton(Utils.constants.selectExistingType()); newCtlButton = new ToggleButton(Utils.constants.createNewType()); newCtlButton.getElement().getStyle().setMarginLeft(10, Unit.PX); existingCtlButton.setValue(true); ctlSwitchPanel.add(existingCtlButton); ctlSwitchPanel.add(newCtlButton); ctlSwitchPanel.setVisible(create);
@Override public void addItemException(String item) { HorizontalPanel panel = new HorizontalPanel(); Label l = createLabel("- " + item, null); panel.add(l); panel.getElement().getStyle().setMarginLeft(15, Style.Unit.PX); nodePermissions.add(panel); } }
Button ok = new Button( "OK" ); HorizontalPanel hp = new HorizontalPanel(); hp.add( pats ); hp.add( ok ); new HTML( Constants.INSTANCE.ORwithEmphasis() ) ); Button createPattern = new Button( Constants.INSTANCE.CreateNewFactPattern() ); createPattern.addClickHandler( new ClickHandler() { public void onClick( ClickEvent w ) { pop.hide();