當前位置: 首頁>>代碼示例>>Java>>正文


Java Anchor.setWidth方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.Anchor.setWidth方法的典型用法代碼示例。如果您正苦於以下問題:Java Anchor.setWidth方法的具體用法?Java Anchor.setWidth怎麽用?Java Anchor.setWidth使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.Anchor的用法示例。


在下文中一共展示了Anchor.setWidth方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: appendChilds

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private void appendChilds(TreeWidget rootEnt, JSONArray children) {
	for (int i = 0; i < children.size(); ++i) {
		nextEntityName = children.get(i).isString().stringValue();
		Anchor a = new Anchor(nextEntityName + " (" + entities.get(nextEntityName).getLeft() + ")");
		a.setWidth("100%");
		a.setStyleName("font");
		a.addClickHandler(new ClickHandler() {
			String name = nextEntityName;
			@Override
			public void onClick(ClickEvent event) {
				module.setSelectedEntity(name);
			}
		});
		HorizontalPanel cPanel = new HorizontalPanel();
		cPanel.setStyleName("tree");
		cPanel.setWidth("100%");
		cPanel.add(a);
		TreeWidget c = new TreeWidget(cPanel);
		rootEnt.addChild(c);
		if (children.size() > 0) appendChilds(c, entities.get(nextEntityName).getRight());
	}
}
 
開發者ID:RISCOSS,項目名稱:riscoss-corporate,代碼行數:23,代碼來源:EntitiesListBox.java

示例2: generateTree

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private void generateTree(TreeWidget c, JSONValue entity) {
	nextEntityName = entity.isObject().get("entity").isString().stringValue();
	Anchor a = new Anchor(nextEntityName);
	a.setWidth("100%");
	a.setStyleName("font");
	a.addClickHandler(new ClickHandler() {
		String name = nextEntityName;
		@Override
		public void onClick(ClickEvent event) {
			setSelectedEntity(name);
		}
	});
	HorizontalPanel cPanel = new HorizontalPanel();
	cPanel.setStyleName("tree");
	cPanel.setWidth("100%");
	cPanel.add(a);
	TreeWidget cc = new TreeWidget(cPanel);
	c.addChild(cc);
	results.put(nextEntityName, entity.isObject().get("results").isArray());
	entities.add(nextEntityName);
	for (int i = 0; i < entity.isObject().get("children").isArray().size(); ++i) {
		generateTree(cc, entity.isObject().get("children").isArray().get(i));
	}
}
 
開發者ID:RISCOSS,項目名稱:riscoss-corporate,代碼行數:25,代碼來源:RiskAnalysisResults.java

示例3: appendChilds

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private void appendChilds(TreeWidget rootEnt, JSONArray children) {
	for (int i = 0; i < children.size(); ++i) {
		nextEntityName = children.get(i).isString().stringValue();
		Anchor a = new Anchor(nextEntityName + " (" + entities.get(nextEntityName).getLeft() + ")");
		a.setWidth("100%");
		a.setStyleName("font");
		a.addClickHandler(new ClickHandler() {
			String name = nextEntityName;
			@Override
			public void onClick(ClickEvent event) {
				setSelectedEntity(name);
			}
		});
		HorizontalPanel cPanel = new HorizontalPanel();
		cPanel.setStyleName("tree");
		cPanel.setWidth("100%");
		cPanel.add(a);
		TreeWidget c = new TreeWidget(cPanel);
		rootEnt.addChild(c);
		if (children.size() > 0) appendChilds(c, entities.get(nextEntityName).getRight());
	}
}
 
開發者ID:RISCOSS,項目名稱:riscoss-corporate,代碼行數:23,代碼來源:RiskAnalysisWizard.java

示例4: initDetailsTable

import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
@Override
protected void initDetailsTable() {
  getSaveButtonWidget().removeFromParent();
  getCancelButtonWidget().removeFromParent();
  requiredFieldsNoteLabel.setVisible(false);

  int row = 0;
  Label sdkTokenLabel = new Label(Utils.constants.sdkToken());
  sdkProfileToken = new KaaAdminSizedTextBox(-1, false);
  sdkProfileToken.setWidth("100%");
  detailsTable.setWidget(row, 0, sdkTokenLabel);
  detailsTable.setWidget(row++, 1, sdkProfileToken);

  Label sdkNameLabel = new Label(Utils.constants.sdkName());
  sdkName = new KaaAdminSizedTextBox(-1, false);
  sdkName.setWidth("100%");
  detailsTable.setWidget(row, 0, sdkNameLabel);
  detailsTable.setWidget(row++, 1, sdkName);

  Label sdkAuthorLabel = new Label(Utils.constants.author());
  sdkAuthor = new KaaAdminSizedTextBox(-1, false);
  sdkAuthor.setWidth("100%");
  detailsTable.setWidget(row, 0, sdkAuthorLabel);
  detailsTable.setWidget(row++, 1, sdkAuthor);

  Label sdkDateCreatedLabel = new Label(Utils.constants.dateCreated());
  sdkDateCreated = new KaaAdminSizedTextBox(-1, false);
  sdkDateCreated.setWidth("100%");
  detailsTable.setWidget(row, 0, sdkDateCreatedLabel);
  detailsTable.setWidget(row++, 1, sdkDateCreated);

  sdkConfigurationVersion = new Anchor();
  sdkConfigurationVersion.getElement().getStyle().setCursor(Style.Cursor.POINTER);
  sdkConfigurationVersion.setWidth("100%");
  detailsTable.getFlexCellFormatter().setHeight(row, 0, "40px");
  Label sdkConfigurationVersionLabel = new Label(Utils.constants.configurationSchema());
  detailsTable.setWidget(row, 0, sdkConfigurationVersionLabel);
  detailsTable.setWidget(row++, 1, sdkConfigurationVersion);

  sdkProfileVersion = new Anchor();
  sdkProfileVersion.getElement().getStyle().setCursor(Style.Cursor.POINTER);
  sdkProfileVersion.setWidth("100%");
  detailsTable.getFlexCellFormatter().setHeight(row, 0, "40px");
  Label sdkProfileVersionLabel = new Label(Utils.constants.profileSchema());
  detailsTable.setWidget(row, 0, sdkProfileVersionLabel);
  detailsTable.setWidget(row++, 1, sdkProfileVersion);

  sdkNotificationVersion = new Anchor();
  sdkNotificationVersion.getElement().getStyle().setCursor(Style.Cursor.POINTER);
  sdkNotificationVersion.setWidth("100%");
  detailsTable.getFlexCellFormatter().setHeight(row, 0, "40px");
  Label sdkNotificationVersionLabel = new Label(Utils.constants.notificationSchema());
  detailsTable.setWidget(row, 0, sdkNotificationVersionLabel);
  detailsTable.setWidget(row++, 1, sdkNotificationVersion);

  sdkLoggingVersion = new Anchor();
  sdkLoggingVersion.getElement().getStyle().setCursor(Style.Cursor.POINTER);
  sdkLoggingVersion.setWidth("100%");
  detailsTable.getFlexCellFormatter().setHeight(row, 0, "40px");
  Label sdkLoggingVersionLabel = new Label(Utils.constants.logSchema());
  detailsTable.setWidget(row, 0, sdkLoggingVersionLabel);
  detailsTable.setWidget(row++, 1, sdkLoggingVersion);

  sdkAefMapsGrid = new AefMapsGrid();
  sdkAefMapsGrid.setSize("700px", "200px");
  Label sdkAefMapsGridLabel = new Label(Utils.constants.aefMaps());
  detailsTable.setWidget(++row, 0, sdkAefMapsGridLabel);
  sdkAefMapsGridLabel.getElement()
      .getParentElement()
      .getStyle()
      .setPropertyPx("paddingBottom", 10);
  detailsTable.setWidget(++row, 0, sdkAefMapsGrid);
  sdkAefMapsGrid.getElement().getParentElement().getStyle().setPropertyPx("paddingBottom", 10);
  detailsTable.getFlexCellFormatter().setColSpan(row, 0, 3);
}
 
開發者ID:kaaproject,項目名稱:kaa,代碼行數:76,代碼來源:SdkProfileViewImpl.java


注:本文中的com.google.gwt.user.client.ui.Anchor.setWidth方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。