dateTimeCreatedLabel.setWidth("200px"); createdDateTime = new KaaAdminSizedTextBox(-1, false, false); createdDateTime.setWidth("200px"); dateTimeModifiedLabel.setWidth("200px"); modifiedDateTime = new KaaAdminSizedTextBox(-1, false, false); modifiedDateTime.setWidth("200px"); dateTimeActivatedLabel.setWidth("200px"); activatedDateTime = new KaaAdminSizedTextBox(-1, false, false); activatedDateTime.setWidth("200px"); dateTimeDeactivatedLabel.setWidth("200px"); deactivatedDateTime = new KaaAdminSizedTextBox(-1, false, false); deactivatedDateTime.setWidth("200px"); authorLabel.setWidth("200px"); createdUsername = new KaaAdminSizedTextBox(-1, false, false); createdUsername.setWidth("200px"); modifiedByLabel.setWidth("200px"); modifiedUsername = new KaaAdminSizedTextBox(-1, false, false); modifiedUsername.setWidth("200px"); activatedByLabel.setWidth("200px"); activatedUsername = new KaaAdminSizedTextBox(-1, false, false); activatedUsername.setWidth("200px"); deactivatedByLabel.setWidth("200px");
flexTable.setWidget(row, col, image); Label lblYMname = new Label (youthMember.getSurname() + ", " + youthMember.getFirstname()); lblYMname.setStyleName("gwt-Label-Login"); lblYMname.setWidth("151px"); flexTable.setWidget(row + 1, col, lblYMname);
public Label createLabel() { // Create label and set wrap Label label = new Label("Some long string here...", skin); label.setWrap(true); // Pack label label.pack(); // This might not be necessary, unless you're changing other attributes such as font scale. // Manual sizing label.setWidth(textWidth); // Set the width directly label.pack(); // Label calculates it's height here, but resets width to 0 (bug?) label.setWidth(textWidth); // Set width again return label; }
@Override protected void init(VaadinRequest request) { Container cont = new IndexedContainer(); // create a container cont.addContainerProperty("caption", String.class, ""); cont.getContainerProperty(cont.addItem(), "caption").setValue("first"); cont.getContainerProperty(cont.addItem(), "caption").setValue("second"); cont.getContainerProperty(cont.addItem(), "caption").setValue("third"); FlexibleOptionGroup fog = new FlexibleOptionGroup(cont); fog.setItemCaptionPropertyId("caption"); fog.setMultiSelect(true); // force using CheckBoxes VerticalLayout fogLayout = new VerticalLayout(); Iterator<FlexibleOptionGroupItemComponent> iter; iter = fog.getItemComponentIterator(); while(iter.hasNext()) { // OptionGroupItem part (CheckBox or RadioButton) FlexibleOptionGroupItemComponent fogItemComponent = iter.next(); // CustomComponent part Label caption = new Label(fogItemComponent.getCaption()); caption.setWidth(50, Unit.PIXELS); Slider slider = new Slider(1, 100); fogLayout.addComponent( new HorizontalLayout(fogItemComponent, caption, slider) ); } setContent(fogLayout); }
for (int i=0; i<labels.length; i++) { Label label = new Label(labels[i], Label.CONTENT_XHTML); label.setWidth(null); // Set width as undefined grid.addComponent(label);
gap.setWidth("10px"); buttons.add(gap); Button cancel = new Button("Cancel");
loader.setPadding(2); requestCounter = new Label(); requestCounter.setWidth("150px");