VerticalPanel vPanel = new VerticalPanel(); HorizontalPanel hPanel = new HorizontalPanel(); hPanel.add(ok); hPanel.add(cancel); textBox.setWidth("97%"); textBox.setText(text); vPanel.add(textBox); vPanel.add(hPanel);
@Override protected int initDetailsTableImpl() { int row = -1; Label schemaLabel = new Label(Utils.constants.schemaVersion()); detailsTable.setWidget(++row, 0, schemaLabel); if (create) { schemaLabel.addStyleName(Utils.avroUiStyle.requiredField()); schema = new VersionListBox(); schema.setWidth("80px"); VerticalPanel panel = new VerticalPanel(); panel.setWidth("100%"); panel.add(schema); panel.add(new HTML(" ")); detailsTable.setWidget(row, 1, panel); schema.addValueChangeHandler(this); } else { schemaVersion = new KaaAdminSizedTextBox(-1, false); schemaVersion.setWidth("100%"); detailsTable.setWidget(row, 1, schemaVersion); } return row; }
this.listener = listener; VerticalPanel dialogContents = new VerticalPanel(); dialogContents.setSpacing(4); setWidget(dialogContents); messageLabel.getElement().getStyle().setOverflowY(Overflow.AUTO); messageLabel.setMessage(message); dialogContents.add(messageLabel);
private void addWidget(Widget currentBox) { if (currentBox instanceof NewLine) { currentRow = new HorizontalPanel(); layout.add(currentRow); layout.setCellWidth(currentRow, "100%"); } else { currentRow.add(currentBox); } widgets.add(currentBox); }
public DSLSentenceWidget( RuleModeller modeller, EventBus eventBus, DSLSentence sentence, Boolean readOnly ) { super( modeller, eventBus ); widgets = new ArrayList<Widget>(); dropDownWidgets = new ArrayList<DSLDropDown>(); this.sentence = sentence; if ( readOnly == null ) { this.readOnly = false; } else { this.readOnly = readOnly; } this.layout = new VerticalPanel(); this.currentRow = new HorizontalPanel(); this.layout.add( currentRow ); this.layout.setCellWidth( currentRow, "100%" ); this.layout.setWidth( "100%" ); if ( this.readOnly ) { this.layout.addStyleName( "editor-disabled-widget" ); } init(); }
public void load(final VerticalPanel target, String file, final Successor success) { contentAsync.load(file, new AsyncCallback<String>() { public void onFailure(Throwable caught) { target.add(new HTML("<h1>FAIL</h1>something went wrong")); caught.printStackTrace(); } public void onSuccess(String result) { if (result == null) { target.add(new HTML( "Could not load content from server. (RPC returned null)")); return; } HTMLPanel panel = new HTMLPanel(result); success.onSuccess(panel); target.add(panel); EW.reloadMathJax(); } }); }
public TestLightboxContent() { super.initWidget(panel); panel.add(buttonPanel); panel.add(horizontalContent); panel.add(verticalContent); for (int i=0; i<50; i++) { horizontalContent.add(new HTML("<div style='padding-left: 1em'>item " + i + "</div>")); verticalContent.add(new Label("item " + i)); } buttonPanel.add(new KSButton("horizontal", new ClickHandler() { @Override public void onClick(ClickEvent event) { for (int i=0; i<10; i++) { horizontalContent.add(new HTML("<div style='padding-left: 1em'>item " + i + "</div>")); } } })); buttonPanel.add(new KSButton("vertical", new ClickHandler() { @Override public void onClick(ClickEvent event) { for (int i=0; i<10; i++) { verticalContent.add(new Label("item " + i)); } } })); } }
// doesn't necessarily have to be a vertical panel VerticalPanel container = new VerticalPanel(); HorizontalPanel buttons = new HorizontalPanel(); // add the buttons container.add(buttons); container.setCellHorizontalAlignment(buttons, HasHorizontalAlignment.ALIGN_RIGHT);
private VerticalPanel createDrow(final int hour) { final VerticalPanel drow = new VerticalPanel(); drow.setSpacing(2); drow.addStyleName(renderer.getStyle(JrsGxtDateCss.HOUR)); for (int i = 0; i < (showIntervalTimes ? intervalsPerHour : 1); i++) { drow.add(new Label(Dates.printTime(hour, i * intervalMinutes))); } return drow; }
public MenuSectionController() { super(); List<View> list = new ArrayList<View>(); menuViewMap.put("", list); menu.setStyleName("ks-menu-layout-menu"); rightPanel.setStyleName("ks-menu-layout-rightColumn"); collapsablePanel.addStyleName("ks-menu-layout-leftColumn"); layout.addStyleName("ks-menu-layout"); menu.setTopLevelItems(topLevelMenuItems); collapsablePanel.setContent(leftPanel); leftPanel.add(menu); leftPanel.add(sideBar); rightPanel.add(header); rightPanel.add(infoPanel); rightPanel.add(topButtonPanel); rightPanel.add(contentPanel); rightPanel.add(bottomButtonPanel); layout.add(collapsablePanel); layout.add(rightPanel); header.setVisible(false); this.showPrint(true); this.initWidget(layout); }
public WorkPanel() { setElement(vPanel.getElement()); vPanel.setWidth("100%"); SimplePanel title = new SimplePanel(); vPanel.add(title); vPanel.add(mainPanel); title.setHeight("25px"); vPanel.setCellHeight(title, "25px"); titleLabel.setStyleName("WS-WorkPanel-title-label"); title.setStyleName("WS-WorkPanel-title"); vPanel.setStyleName("WS-WorkPanel-area"); titleInternal.add(titleLabel); title.setWidget(titleInternal); getElement().getStyle().setProperty("overflow", "scroll"); }
VerticalPanel vPanel = new VerticalPanel(); HorizontalPanel hPanel = new HorizontalPanel(); hPanel.add(ok); hPanel.add(cancel); textBox.setWidth("97%"); textBox.setText(text); vPanel.add(textBox); vPanel.add(hPanel);
serverProfileSchema.setWidth("80px"); VerticalPanel panel = new VerticalPanel(); panel.setWidth("100%"); panel.add(endpointProfileSchema); panel.add(new HTML(" ")); detailsTable.setWidget(endpointProfileSchemaRow, 1, panel); panel = new VerticalPanel(); panel.setWidth("100%"); panel.add(serverProfileSchema); panel.add(new HTML(" ")); detailsTable.setWidget(serverProfileSchemaRow, 1, panel);
/** * Instantiates a new UnauthorizedSessionDialog. */ public UnauthorizedSessionDialog(final Listener listener) { super(false, true); setWidth("500px"); setTitle(Utils.constants.sessionExpired()); VerticalPanel dialogContents = new VerticalPanel(); dialogContents.setSpacing(4); add(dialogContents); AlertPanel warningPanel = new AlertPanel(AlertPanel.Type.WARNING); warningPanel.setMessage(Utils.messages.sessionExpiredMessage()); dialogContents.add(warningPanel); Button loginButton = new Button(Utils.constants.logInAgain(), new ClickHandler() { @Override public void onClick(ClickEvent event) { hide(); listener.onLogin(); } }); Button ignoreButton = new Button(Utils.constants.ignore(), new ClickHandler() { @Override public void onClick(ClickEvent event) { hide(); listener.onIgnore(); } }); addButton(loginButton); addButton(ignoreButton); }
private void addWidget( Widget currentBox ) { if ( currentBox instanceof NewLine ) { currentRow = new HorizontalPanel(); layout.add( currentRow ); layout.setCellWidth( currentRow, "100%" ); } else { currentRow.add( currentBox ); } widgets.add( currentBox ); }
public DSLSentenceWidget(RuleModeller modeller, EventBus eventBus, DSLSentence sentence, Boolean readOnly) { super(modeller, eventBus); widgets = new ArrayList<Widget>(); dropDownWidgets = new ArrayList<DSLDropDown>(); this.sentence = sentence; if (readOnly == null) { this.readOnly = false; } else { this.readOnly = readOnly; } this.layout = new VerticalPanel(); this.currentRow = new HorizontalPanel(); this.layout.add(currentRow); this.layout.setCellWidth(currentRow, "100%"); this.layout.setWidth("100%"); if (this.readOnly) { this.layout.addStyleName("editor-disabled-widget"); } init(); }
private Widget appendComment( final DiscussionRecord r ) { final SmallLabel hrd = new SmallLabel( MetadataConstants.INSTANCE.smallCommentBy0On1Small( r.getAuthor(), new Date( r.getTimestamp() ) ) ); hrd.addStyleName( "discussion-header" ); commentList.add( hrd ); final String[] parts = r.getNote().split( "\n" ); if ( parts.length > 0 ) { final StringBuilder txtBuilder = new StringBuilder(); for ( int i = 0; i < parts.length; i++ ) { txtBuilder.append( parts[ i ] ); if ( i != parts.length - 1 ) { txtBuilder.append( "<br/>" ); } } final HTML hth = new HTML( txtBuilder.toString() ); hth.setStyleName( "form-field" ); commentList.add( hth ); } else { final Label lbl = new Label( r.getNote() ); lbl.setStyleName( "form-field" ); commentList.add( lbl ); } commentList.add( new HTML( "<br/>" ) ); return hrd; }
protected Widget createUi() { VerticalPanel panel = new VerticalPanel(); legendPanel = new HorizontalPanel(); legendPanel.getElement().getStyle().setMarginBottom( 5, Unit.PX ); panel.add( legendPanel ); panel.add( plot ); return panel; }
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()); 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); secondRowPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); updateNorthSize(175); verticalPanel.add(secondRowPanel); firstRowPanel.add(titleLabel); firstRowPanel.setCellHeight(titleLabel, "100%");
protected Widget createWidget() { table = createTable(); tableProvider.addDataDisplay(table); HTML titleHtml = new HTML(); if ( displayerSettings.isTitleVisible() ) { titleHtml.setText( displayerSettings.getTitle() ); } VerticalPanel verticalPanel = new VerticalPanel(); verticalPanel.add(titleHtml); verticalPanel.add(table); return verticalPanel; }