当前位置: 首页>>代码示例>>Java>>正文


Java IconType类代码示例

本文整理汇总了Java中gwt.material.design.client.constants.IconType的典型用法代码示例。如果您正苦于以下问题:Java IconType类的具体用法?Java IconType怎么用?Java IconType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IconType类属于gwt.material.design.client.constants包,在下文中一共展示了IconType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
@PostConstruct
public void init() {
    navBar.setActivates("sideNav");
    navBar.setType(NavBarType.FIXED);
    navBrand.setText("Chat App");
    navBar.add(navBrand);
    navSection.setFloat(Style.Float.RIGHT);
    navSection.setHideOn(HideOn.NONE);
    iconUsers.setIconType(IconType.ACCOUNT_CIRCLE);
    badgeUsers.setText("0");
    badgeUsers.setBackgroundColor("pink");
    badgeUsers.setRight(16);
    badgeUsers.setCircle(true);
    iconUsers.add(badgeUsers);

    navSection.add(iconUsers);
    navBar.add(navSection);
}
 
开发者ID:kevzlou7979,项目名称:gwt-material-chat,代码行数:19,代码来源:Header.java

示例2: testSetRendererCopyProperties

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
public void testSetRendererCopyProperties() throws Exception {
    // given
    T table = attachTableWithConstructor();
    AbstractDataView<Person> dataView = (AbstractDataView<Person>)table.getView();

    Renderer<Person> oldRenderer = dataView.getRenderer();
    BaseRenderer<Person> renderer = new BaseRenderer<>();

    // when
    oldRenderer.setExpectedRowHeight(80);
    oldRenderer.setSortAscIcon(IconType.FULLSCREEN);
    oldRenderer.setSortDescIcon(IconType.KEYBOARD);
    oldRenderer.setSortIconSize(IconSize.LARGE);
    dataView.setRenderer(renderer);

    // then
    assertEquals(renderer, dataView.getRenderer());
    assertEquals(renderer.getExpectedRowHeight(), oldRenderer.getExpectedRowHeight());
    assertEquals(renderer.getCalculatedRowHeight(), oldRenderer.getCalculatedRowHeight());

    assertNotSame(renderer.getSortIconSize(), oldRenderer.getSortIconSize());
    assertNotSame(renderer.getSortAscIcon(), oldRenderer.getSortAscIcon());
    assertNotSame(renderer.getSortDescIcon(), oldRenderer.getSortDescIcon());
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:25,代码来源:AbstractDataViewTest.java

示例3: testStructure

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
public void testStructure() {
    // given
    final String TEXT = "text";
    MaterialChip chip = getWidget();

    // when / then
    chip.setText(TEXT);
    assertEquals(TEXT, chip.getText());
    assertEquals(TEXT, chip.getChipLabel().getText());

    // given
    final IconType icon = IconType.POLYMER;

    // when / then
    chip.setIconType(icon);
    chip.setIconColor(Color.RED);
    assertEquals(icon, chip.getIcon().getIconType());
    assertEquals(Color.RED, chip.getIconColor());

    assertEquals(chip.getChipLabel(), chip.getWidget(0));
    assertEquals(chip.getIcon(), chip.getWidget(1));
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:23,代码来源:MaterialChipTest.java

示例4: CustomTextBox

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
public CustomTextBox(boolean hasButton) {
	addStyleName(MainResources.GSS.searchBox());

	textBox = new TextBox();
	textBox.setStyleName(MainResources.GSS.searchBoxInput());

	add(textBox);

	if (hasButton) {
		button = new MaterialLink();
		button.setIconType(IconType.SEARCH);
		button.setIconColor(Color.WHITE);
		add(button);
	}

}
 
开发者ID:lumongo,项目名称:lumongo,代码行数:17,代码来源:CustomTextBox.java

示例5: FilterQueryWidget

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
public FilterQueryWidget() {
	addStyleName(MainResources.GSS.searchBox());

	textBox = new TextBox();
	textBox.setStyleName(MainResources.GSS.searchBoxInput());

	add(textBox);

	plusButton = new MaterialLink();
	plusButton.setIconType(IconType.ADD);
	plusButton.setIconColor(Color.WHITE);
	add(plusButton);

	minusButton = new MaterialLink();
	minusButton.setIconType(IconType.REMOVE);
	minusButton.setIconColor(Color.WHITE);

	add(minusButton);

}
 
开发者ID:lumongo,项目名称:lumongo,代码行数:21,代码来源:FilterQueryWidget.java

示例6: addMenuItem

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
@Override
public void addMenuItem(LayoutMenuItem menuItem) {
    MaterialLink materialLink = new MaterialLink();
    materialLink.setText(menuItem.text());
    materialLink.setIconType(IconType.valueOf(menuItem.icon().toUpperCase()));
    materialLink.addClickHandler(clickEvent -> menuItem.selectHandler().onSelect());
    sideNav.add(materialLink);
}
 
开发者ID:GwtDomino,项目名称:domino-todolist,代码行数:9,代码来源:MaterialLayoutView.java

示例7: getAllDrives

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
/**
 * Get all drives for GDrive Pattern
 * @return
 */
public static List<DriveDTO> getAllDrives() {
    List<DriveDTO> list = new ArrayList<>();
    list.add(new DriveDTO(IconType.FOLDER, "File 1", "https://s3.amazonaws.com/uifaces/faces/twitter/stevedesigner/128.jpg", "Luis Hoppe", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER_SHARED, "File 2", "https://s3.amazonaws.com/uifaces/faces/twitter/yassiryahya/128.jpg", "Irwin Mueller", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER, "File 3", "https://s3.amazonaws.com/uifaces/faces/twitter/lebinoclard/128.jpg", "Levin Card", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER_SHARED, "File 4", "https://s3.amazonaws.com/uifaces/faces/twitter/lmjabreu/128.jpg", "Dr. Cassie Keeling", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER_SHARED, "File 5", "https://s3.amazonaws.com/uifaces/faces/twitter/ariil/128.jpg", "Madelynn Schamberger", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER, "File 6", "https://s3.amazonaws.com/uifaces/faces/twitter/devankoshal/128.jpg", "Dominique Schmidt", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER, "File 7", "https://s3.amazonaws.com/uifaces/faces/twitter/karthipanraj/128.jpg", "Rowland Heller", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER_SHARED, "File 8", "https://s3.amazonaws.com/uifaces/faces/twitter/GavicoInd/128.jpg", "Quincy Schimmel", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER_SHARED, "File 9", "https://s3.amazonaws.com/uifaces/faces/twitter/roybarberuk/128.jpg", "Tierra VonRueden", "March 3, 2016"));
    list.add(new DriveDTO(IconType.FOLDER, "File 10", "https://s3.amazonaws.com/uifaces/faces/twitter/tonymillion/128.jpg", "Clint Heller", "March 3, 2016"));
    return list;
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-patterns,代码行数:19,代码来源:DataHelper.java

示例8: getAllTodayInbox

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
/**
 * Get all inbox for GInbox Patter
 * @return
 */
public static List<InboxDTO> getAllTodayInbox() {
    List<InboxDTO> list = new ArrayList<>();

    // Children
    List<InboxDTO> children = new ArrayList<>();
    children.add(new InboxDTO("https://lh5.googleusercontent.com/-SWaCREsCOUQ/AAAAAAAAAAI/AAAAAAAAAAA/0B6hSKehnxg/w28-h28/photo.jpg", "Paypal", "John Doe, how to receive important PayPal messages in your inbox", "black"));
    children.add(new InboxDTO("https://lh5.googleusercontent.com/-SWaCREsCOUQ/AAAAAAAAAAI/AAAAAAAAAAA/0B6hSKehnxg/w28-h28/photo.jpg", "Paypal", "John Doe, how to receive important PayPal messages in your inbox", "black"));
    children.add(new InboxDTO("https://lh5.googleusercontent.com/-SWaCREsCOUQ/AAAAAAAAAAI/AAAAAAAAAAA/0B6hSKehnxg/w28-h28/photo.jpg", "Paypal", "John Doe, how to receive important PayPal messages in your inbox", "black"));

    InboxDTO promos = new InboxDTO(IconType.LOCAL_OFFER, "Promos", "Paypal, LAZADA, CashCashPinoy, Dribble, Inbox by Inbox", "blue lighten-2");
    promos.setChildren(children);
    list.add(promos);

    InboxDTO updates = new InboxDTO(IconType.FLAG, "Updates", "Wattpad, Code Fights, Job Central, Gitter Notifications", "deep-orange");
    updates.setChildren(children);
    list.add(updates);

    InboxDTO finance = new InboxDTO(IconType.POLL, "Finance", "Globe Telecom, Paypal, China Bank", "green");
    finance.setChildren(children);
    list.add(finance);

    InboxDTO purchase = new InboxDTO(IconType.LOCAL_GROCERY_STORE, "Purchase", "Lazada, Starbucks, Sony", "brown");
    purchase.setChildren(children);
    list.add(purchase);

    return list;
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-patterns,代码行数:32,代码来源:DataHelper.java

示例9: DriveDTO

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
public DriveDTO(IconType icon, String fileName, String ownerImage, String owner, String date) {
    this.icon = icon;
    this.fileName = fileName;
    this.ownerImage = ownerImage;
    this.owner = owner;
    this.date = date;
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-patterns,代码行数:8,代码来源:DriveDTO.java

示例10: CustomerCollapsible

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
public CustomerCollapsible(UserDTO dto, GoogleContactsView googleContactsView) {
    initWidget(uiBinder.createAndBindUi(this));
    this.dto = dto;
    this.googleContactsView = googleContactsView;
    lblName.setText(dto.getName());
    lblEmail.setText(dto.getEmail());
    lblPosition.setText(dto.getPosition().getValue());
    imgUser.setUrl(dto.getPicture());
    if(dto.isStarred()){
        iconStar.setIconType(IconType.STAR);
    }
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-patterns,代码行数:13,代码来源:CustomerCollapsible.java

示例11: UnitWidget

import gwt.material.design.client.constants.IconType; //导入依赖的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

示例12: TweetView

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
public TweetView(String id, String titleText, String contentText, String createdAt, final String url, String imageUrl, IconType sentimentType ){

        this.id = id;

        initWidget(uiBinder.createAndBindUi(this));

        title.setText(titleText);
        content.setText(contentText);

        updated.setText(createdAt);
        updated.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                Window.open(url, "_blank", "");
            }
        });

        sentiment.setIconType(sentimentType);
        if (sentimentType == IconType.SENTIMENT_DISSATISFIED){
            sentiment.setIconColor("deep-orange");
        }else if (sentimentType == IconType.SENTIMENT_SATISFIED){
            sentiment.setIconColor("teal accent-4");
        }else{
            sentiment.setIconColor("black");
        }

        if (imageUrl != null) {
            image.setUrl(imageUrl);
        }
    }
 
开发者ID:WSDOT,项目名称:social-analytics,代码行数:31,代码来源:TweetView.java

示例13: updateSentiment

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
private void updateSentiment(final String sentimentType){

        String url = JSON_URL + this.id + "/" + sentimentType;

        JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
        // Set timeout for 30 seconds (30000 milliseconds)
        jsonp.setTimeout(30000);
        jsonp.requestObject(url, new AsyncCallback<Mention>() {

        @Override
        public void onFailure(Throwable caught) {
            Window.alert("Failure: " + caught.getMessage());
        }

        @Override
        public void onSuccess(Mention result) {
            if (sentimentType.equalsIgnoreCase("positive")) {
                sentiment.setIconType(IconType.SENTIMENT_SATISFIED);
                sentiment.setIconColor("teal accent-4");
            } else if (sentimentType.equalsIgnoreCase("negative")) {
                sentiment.setIconType(IconType.SENTIMENT_DISSATISFIED);
                sentiment.setIconColor("deep-orange");
            }else {
                sentiment.setIconType(IconType.SENTIMENT_NEUTRAL);
                sentiment.setIconColor("black");
            }
        }});
    }
 
开发者ID:WSDOT,项目名称:social-analytics,代码行数:29,代码来源:TweetView.java

示例14: init

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
@PostConstruct
public void init() {
    search.addValueChangeHandler(valueChangeEvent -> toMap.go());
    search.addCloseHandler(closeEvent -> search.setText(StringUtils.EMPTY));
    searchButton.setIconType(IconType.SEARCH);
    searchButton.addClickHandler(clickEvent -> search.open());
    searchButton.getElement().addClassName(CSS_CLASS_SEARCH_BTN);
    this.add(search);
}
 
开发者ID:baldram,项目名称:tristar-eye,代码行数:10,代码来源:SearchBar.java

示例15: getFavAddButton

import gwt.material.design.client.constants.IconType; //导入依赖的package包/类
private MaterialButton getFavAddButton(Integer objectId) {
    MaterialButton button = new MaterialButton();
    button.addClickHandler(clickEvent -> handleFavouriteSection(objectId, button));
    button.setType(ButtonType.FLAT);
    button.setIconType(IconType.FAVORITE);
    button.setClass(FAVOURITES_ADD_CSS);
    button.setBackgroundColor(Color.WHITE);
    button.setType(ButtonType.FLOATING);
    markFavouriteSelection(favouriteCameras.contains(objectId), button);
    return button;
}
 
开发者ID:baldram,项目名称:tristar-eye,代码行数:12,代码来源:CameraDialog.java


注:本文中的gwt.material.design.client.constants.IconType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。