com.google.gwt.user.client.ui.Label.setWidth()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中com.google.gwt.user.client.ui.Label.setWidth()方法的一些代码示例,展示了Label.setWidth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setWidth()方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Label
类名称:Label
方法名:setWidth

Label.setWidth介绍

暂无

代码示例

代码示例来源:origin: kaaproject/kaa

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");

代码示例来源:origin: stackoverflow.com

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);

代码示例来源:origin: stackoverflow.com

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;
}

代码示例来源:origin: stackoverflow.com

@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);
}

代码示例来源:origin: stackoverflow.com

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);

代码示例来源:origin: net.sf.javaprinciples.client/client-presentation

gap.setWidth("10px");
buttons.add(gap);
Button cancel = new Button("Cancel");

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

loader.setPadding(2);
requestCounter = new Label();
requestCounter.setWidth("150px");

相关文章