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


Java IconPosition類代碼示例

本文整理匯總了Java中gwt.material.design.client.constants.IconPosition的典型用法代碼示例。如果您正苦於以下問題:Java IconPosition類的具體用法?Java IconPosition怎麽用?Java IconPosition使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IconPosition類屬於gwt.material.design.client.constants包,在下文中一共展示了IconPosition類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: UnitWidget

import gwt.material.design.client.constants.IconPosition; //導入依賴的package包/類
protected UnitWidget() {

		addStyleName(res.style().view());
		
		titlePanel = new MaterialPanel();
		titlePanel.addStyleName(res.style().titlePanel());
			title = new Heading(HeadingSize.H4);
			title.addStyleName(res.style().title());
		titlePanel.add(title);
		add(titlePanel);
		
		contentRow = new MaterialRow();
		contentRow.addStyleName(res.style().content());
		add(contentRow);

		nextRow = new MaterialRow();
		nextRow.addStyleName(res.style().next());
		nextRow.setVisible(false);
		add(nextRow);

//			MaterialIcon nextIcon = new MaterialIcon(IconType.NAVIGATE_NEXT);
//			nextIcon.setIconPosition(IconPosition.LEFT);
//			nextIcon.setMarginRight(0);
		nextLink = new MaterialLink(IconType.NAVIGATE_NEXT);
		nextLink.setIconPosition(IconPosition.LEFT);
		nextLink.setWaves(WavesType.DEFAULT);
		nextLink.addStyleName(res.style().nextLink());

		nextLink.addClickHandler(e -> onNext());

	}
 
開發者ID:vsite-hr,項目名稱:mentor,代碼行數:32,代碼來源:UnitWidget.java

示例2: createNavBarOptions

import gwt.material.design.client.constants.IconPosition; //導入依賴的package包/類
MaterialButton createNavBarOptions() {
    MaterialButton moreButton = new MaterialButton();

    moreButton.add(createDropDown());

    moreButton.setType(ButtonType.FLAT);
    moreButton.setIconColor(Color.WHITE);
    moreButton.setIconPosition(IconPosition.LEFT);
    moreButton.setIconType(IconType.MORE_VERT);
    moreButton.getElement().addClassName(NAV_OPTIONS_CSS_CLASS);

    return moreButton;
}
 
開發者ID:baldram,項目名稱:tristar-eye,代碼行數:14,代碼來源:ContextMenu.java

示例3: createLinkLeft

import gwt.material.design.client.constants.IconPosition; //導入依賴的package包/類
protected MaterialLink createLinkLeft() {
    final MaterialLink linkLeft = new MaterialLink(IconType.CHEVRON_LEFT);
    linkLeft.setIconPosition(IconPosition.NONE);
    return linkLeft;
}
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material,代碼行數:6,代碼來源:MaterialPager.java

示例4: createLinkRight

import gwt.material.design.client.constants.IconPosition; //導入依賴的package包/類
protected MaterialLink createLinkRight() {
    final MaterialLink linkRight = new MaterialLink(IconType.CHEVRON_RIGHT);
    linkRight.setIconPosition(IconPosition.NONE);
    return linkRight;
}
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material,代碼行數:6,代碼來源:MaterialPager.java

示例5: setIconPosition

import gwt.material.design.client.constants.IconPosition; //導入依賴的package包/類
@Override
public void setIconPosition(IconPosition position) {
    icon.setIconPosition(position);
}
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material,代碼行數:5,代碼來源:MaterialHelpBlock.java

示例6: testIcon

import gwt.material.design.client.constants.IconPosition; //導入依賴的package包/類
public void testIcon() {
    // UiBinder
    // given
    T widget = getWidget(false);

    // when / then
    MaterialIcon icon = widget.getIcon();
    assertNotNull(icon);

    icon.setIconType(IconType.POLYMER);
    assertEquals(IconType.POLYMER, icon.getIconType());

    icon.setIconSize(IconSize.LARGE);
    assertEquals(IconSize.LARGE, icon.getIconSize());
    icon.setIconSize(IconSize.MEDIUM);
    assertEquals(IconSize.MEDIUM, icon.getIconSize());
    icon.setIconSize(IconSize.SMALL);
    assertEquals(IconSize.SMALL, icon.getIconSize());
    icon.setIconSize(IconSize.TINY);
    assertEquals(IconSize.TINY, icon.getIconSize());

    icon.setIconPosition(IconPosition.RIGHT);
    icon.setIconPosition(IconPosition.LEFT);
    icon.setIconColor(Color.AMBER);

    icon.setIconPrefix(true);
    assertTrue(icon.isIconPrefix());
    icon.setIconPrefix(false);
    assertFalse(icon.isIconPrefix());

    icon.setIconFontSize(2, Style.Unit.PX);

    // Standard
    // given
    attachWidget();

    // when / then
    icon.setIconType(IconType.POLYMER);
    assertEquals(IconType.POLYMER.getCssName(), icon.getElement().getInnerHTML());

    icon.setIconSize(IconSize.LARGE);
    assertTrue(icon.getElement().hasClassName(IconSize.LARGE.getCssName()));
    icon.setIconSize(IconSize.MEDIUM);
    assertTrue(icon.getElement().hasClassName(IconSize.MEDIUM.getCssName()));
    icon.setIconSize(IconSize.SMALL);
    assertTrue(icon.getElement().hasClassName(IconSize.SMALL.getCssName()));
    icon.setIconSize(IconSize.TINY);
    assertTrue(icon.getElement().hasClassName(IconSize.TINY.getCssName()));

    icon.setIconPosition(IconPosition.RIGHT);
    assertTrue(icon.getElement().hasClassName(IconPosition.RIGHT.getCssName()));
    icon.setIconPosition(IconPosition.LEFT);
    assertTrue(icon.getElement().hasClassName(IconPosition.LEFT.getCssName()));
    icon.setIconColor(Color.AMBER);
    assertTrue(icon.getElement().hasClassName(Color.AMBER.getCssName() + "-text"));

    icon.setIconPrefix(true);
    assertTrue(icon.isIconPrefix());
    assertTrue(icon.getElement().hasClassName("prefix"));
    icon.setIconPrefix(false);
    assertFalse(icon.getElement().hasClassName("prefix"));

    icon.setIconFontSize(2, Style.Unit.PX);
    assertEquals("2px", icon.getElement().getStyle().getFontSize());
}
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material,代碼行數:66,代碼來源:AbstractIconButtonTest.java

示例7: setIconPosition

import gwt.material.design.client.constants.IconPosition; //導入依賴的package包/類
/**
 * Set the position of the icon.
 */
void setIconPosition(IconPosition position);
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material,代碼行數:5,代碼來源:HasIcon.java


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