• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MaterialLabel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: UnknownUnitWidget

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public UnknownUnitWidget(Unit unit) {

		super();
		
		MaterialColumn messageColumn = new MaterialColumn();
		messageColumn.setGrid("s12");
		messageColumn.setTextAlign(TextAlign.CENTER);
			MaterialLabel message = new MaterialLabel("Unsupported unit type (" + unit.getType() + ")");
			message.addStyleName("flow-text");
		messageColumn.add(message);
		getContentRow().add(messageColumn);
	
		setUnit(unit);
		
	}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:16,代码来源:UnknownUnitWidget.java


示例2: LectureCard

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public LectureCard(Course course, Lecture lecture) {

	setBackgroundColor(Color.WHITE);
	setHoverable(true);
	
	MaterialCardImage cardImage = new MaterialCardImage();
	cardImage.setWaves(WavesType.LIGHT);
		image = new MaterialImage();
	cardImage.add(image);
	add(cardImage);
	
	MaterialCardContent cardContent = new MaterialCardContent();
		title = new MaterialLink();
		title.addStyleName(res.style().title());
	cardContent.add(title);
		description = new MaterialLabel();
		description.addStyleName(res.style().description());
	cardContent.add(description);
	add(cardContent);
	
	MaterialCardAction cardAction = new MaterialCardAction();
	cardAction.setTextAlign(TextAlign.RIGHT);
		unitsLink = new MaterialLink();
	cardAction.add(unitsLink);
	add(cardAction);
	
	image.addClickHandler(e -> LectureCard.this.onImageClick());
	
	setLecture(course, lecture);

}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:32,代码来源:LectureCard.java


示例3: VideoUnitWidget

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public VideoUnitWidget(VideoUnit unit) {

		super();
		
		timeBadge = new MaterialBadge();
		timeBadge.addStyleName(res.style().badge());
		getTitlePanel().insert(timeBadge, 0);

		MaterialColumn videoColumn = new MaterialColumn();
		videoColumn.setGrid("s12");
		videoColumn.setTextAlign(TextAlign.CENTER);
			video = Video.createIfSupported();
			if (video == null) {
				MaterialLabel message = new MaterialLabel("This browser does not support video playback.");
				message.addStyleName("flow-text");
				videoColumn.add(message);
			} else {
				video.addStyleName("responsive-video");
				video.setAutoplay(false);
				video.setControls(true);
				video.setLoop(false);
				video.setMuted(false);
				videoColumn.add(video);
			}
		getContentRow().add(videoColumn);
	
		if (unit != null)
			setUnit(unit);
		
	}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:31,代码来源:VideoUnitWidget.java


示例4: LecturerCard

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public LecturerCard(User lecturer) {
	
		setBackgroundColor(Color.WHITE);
		setHoverable(true);
		
		MaterialCardImage cardImage = new MaterialCardImage();
		cardImage.setWaves(WavesType.LIGHT);
			image = new MaterialImage();
		cardImage.add(image);
		add(cardImage);
		
		MaterialCardContent cardContent = new MaterialCardContent();
			name = new MaterialLabel();
			name.addStyleName(res.style().name());
		cardContent.add(name);
//			description = new MaterialLabel();
//			description.addStyleName(res.style().description());
//		cardContent.add(description);
		add(cardContent);
		
		MaterialCardAction cardAction = new MaterialCardAction();
		cardAction.setTextAlign(TextAlign.RIGHT);
			coursesLink = new MaterialLink();
		cardAction.add(coursesLink);
		add(cardAction);
		
		setLecturer(lecturer);

	}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:30,代码来源:LecturerCard.java


示例5: CourseCard

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public CourseCard(Course course) {

	setBackgroundColor(Color.WHITE);
	setHoverable(true);
	
	MaterialCardImage cardImage = new MaterialCardImage();
	cardImage.setWaves(WavesType.LIGHT);
		image = new MaterialImage();
	cardImage.add(image);
	add(cardImage);
	
	MaterialCardContent cardContent = new MaterialCardContent();
		title = new MaterialLink();
		title.addStyleName(res.style().title());
	cardContent.add(title);
		description = new MaterialLabel();
		description.addStyleName(res.style().description());
	cardContent.add(description);
	add(cardContent);
	
	MaterialCardAction cardAction = new MaterialCardAction();
	cardAction.setTextAlign(TextAlign.RIGHT);
		lecturesLink = new MaterialLink();
	cardAction.add(lecturesLink);
	add(cardAction);
	
	image.addClickHandler(e -> CourseCard.this.onImageClick());
	
	setCourse(course);

}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:32,代码来源:CourseCard.java


示例6: LectureBanner

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public LectureBanner(Lecture lecture) {

	setBackgroundColor(Color.WHITE);
	setShadow(1);
	addStyleName(res.style().view());
	
	MaterialRow titleRow = new MaterialRow();
		MaterialColumn titleColumn = new MaterialColumn();
		titleColumn.setGrid("s12");
			title = new Heading(HeadingSize.H1);
			title.addStyleName(res.style().title());
			title.setTextColor(Color.BLUE_GREY);
		titleColumn.add(title);
	titleRow.add(titleColumn);
	add(titleRow);
	
	MaterialRow descriptionRow = new MaterialRow();
		MaterialColumn descriptionColumn = new MaterialColumn();
		descriptionColumn.setGrid("s12");
			description = new MaterialLabel();
			description.setTextColor(Color.GREY_DARKEN_1);
			description.addStyleName("flow-text");
		descriptionColumn.add(description);
	descriptionRow.add(descriptionColumn);
	add(descriptionRow);

	if (lecture != null)
		setLecture(lecture);

}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:31,代码来源:LectureBanner.java


示例7: onNewMessage

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public void onNewMessage(@Observes NewMessageEvent event) {
    MyMessage newMessage = event.getMessage();

    MaterialCollectionItem item = new MaterialCollectionItem();
    item.setBackgroundColor("grey lighten-4");
    item.setType(CollectionType.AVATAR);
    collection.add(item);

    MaterialAvatar image = new MaterialAvatar(newMessage.getAuthor().getUniqueId());
    image.setCircle(true);
    image.setBackgroundColor("white");
    image.setShadow(1);
    image.setHeight("80");
    image.setWidth("80");
    item.add(image);

    MaterialLabel date = new MaterialLabel();
    date.setFontSize(0.8, Style.Unit.EM);
    date.setFloat(Style.Float.RIGHT);
    date.setTextColor("grey lighten-1");
    date.setText(DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss").format(newMessage.getDate()));
    item.add(date);

    MaterialLabel user = new MaterialLabel(newMessage.getAuthor().getUsername());
    item.add(user);

    MaterialLabel message = new MaterialLabel();
    message.setFontWeight(Style.FontWeight.LIGHTER);
    message.setText(newMessage.getMessage());
    item.add(message);


    int totalHeight = 0;
    for (int i = 0; i < collection.getWidgetCount(); i++) {
        Widget w = collection.getWidget(i);
        totalHeight = totalHeight + w.getOffsetHeight();
    }
    collection.getElement().setScrollTop(totalHeight);
}
 
开发者ID:kevzlou7979,项目名称:gwt-material-chat,代码行数:40,代码来源:MessageList.java


示例8: Footer

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public Footer() {

		setBackgroundColor(Color.GREY_DARKEN_2);

		MaterialRow row = new MaterialRow();
		MaterialColumn leftColumn = new MaterialColumn(12, 6, 6);
		MaterialColumn rightColumn = new MaterialColumn(12, 6, 6);
		row.add(leftColumn);
		row.add(rightColumn);
		add(row);

		setType(FooterType.FIXED);
		MaterialLabel label = new MaterialLabel("LuMongo is distributed under a commercially friendly Apache Software license");
		label.setTextColor(Color.WHITE);
		label.setMarginTop(15);
		leftColumn.add(label);

		MaterialButton chatButton = new MaterialButton("Chat with Us");
		chatButton.setMarginTop(10);
		chatButton.setMarginLeft(20);
		chatButton.setFloat(Style.Float.RIGHT);
		chatButton.setIconType(IconType.CHAT_BUBBLE);
		chatButton.addClickHandler(clickEvent -> Window
				.open("https://gitter.im/lumongo/lumongo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge", "_blank",
						"menubar=1,status=1,toolbar=1,scrollbars=1,resizable=1"));
		rightColumn.add(chatButton);

		MaterialButton sourceButton = new MaterialButton("Source");
		sourceButton.setMarginTop(10);
		sourceButton.setIconType(IconType.CODE);
		sourceButton.setFloat(Style.Float.RIGHT);
		sourceButton.addClickHandler(
				clickEvent -> Window.open("https://github.com/lumongo/lumongo", "_blank", "menubar=1,status=1,toolbar=1,scrollbars=1,resizable=1"));
		rightColumn.add(sourceButton);

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


示例9: CourseBanner

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public CourseBanner(Course course) {

	setBackgroundColor(Color.WHITE);
	setShadow(1);
	addStyleName(res.style().view());
	
	MaterialRow titleRow = new MaterialRow();
		MaterialColumn titleColumn = new MaterialColumn();
		titleColumn.setGrid("s12 m8");
			title = new Heading(HeadingSize.H1);
			title.addStyleName(res.style().title());
			title.setTextColor(Color.BLUE_GREY);
		titleColumn.add(title);
	titleRow.add(titleColumn);
		MaterialColumn lecturerImageColumn = new MaterialColumn();
		lecturerImageColumn.setGrid("m4");
		lecturerImageColumn.setHideOn(HideOn.HIDE_ON_SMALL_DOWN);
			lecturerImage = new MaterialImage();
			lecturerImage.addStyleName(res.style().image());
			lecturerImage.setCircle(true);
		lecturerImageColumn.add(lecturerImage);
	titleRow.add(lecturerImageColumn);
	add(titleRow);
	
	MaterialRow lecturerRow = new MaterialRow();
		MaterialColumn lecturerCaptionColumn = new MaterialColumn();
		lecturerCaptionColumn.setGrid("s12 m4 l3");
			MaterialLabel lecturerCaption = new MaterialLabel("Predavač:");
			lecturerCaption.setTextColor(Color.GREY_LIGHTEN_1);
			lecturerCaption.addStyleName(res.style().caption());
			lecturerCaption.addStyleName("flow-text");
		lecturerCaptionColumn.add(lecturerCaption);
	lecturerRow.add(lecturerCaptionColumn);
		MaterialColumn lecturerNameColumn = new MaterialColumn();
		lecturerNameColumn.setGrid("s12 m8 l9");
			lecturerName = new MaterialLabel();
			lecturerName.setTextColor(Color.GREY_DARKEN_1);
			lecturerName.addStyleName("flow-text");
		lecturerNameColumn.add(lecturerName);
	lecturerRow.add(lecturerNameColumn);
	add(lecturerRow);
	
	MaterialRow descriptionRow = new MaterialRow();
		MaterialColumn descriptionCaptionColumn = new MaterialColumn();
		descriptionCaptionColumn.setGrid("s12 m4 l3");
			MaterialLabel descriptionCaption = new MaterialLabel("Opis:");
			descriptionCaption.setTextColor(Color.GREY_LIGHTEN_1);
			descriptionCaption.addStyleName(res.style().caption());
			descriptionCaption.addStyleName("flow-text");
		descriptionCaptionColumn.add(descriptionCaption);
	descriptionRow.add(descriptionCaptionColumn);
		MaterialColumn descriptionColumn = new MaterialColumn();
		descriptionColumn.setGrid("s12 m8 l9");
			description = new MaterialLabel();
			description.setTextColor(Color.GREY_DARKEN_1);
			description.addStyleName("flow-text");
		descriptionColumn.add(description);
	descriptionRow.add(descriptionColumn);
	add(descriptionRow);

	if (course != null)
		setCourse(course);

}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:65,代码来源:CourseBanner.java


示例10: onSwipeRight

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
@UiHandler("swipeablePanel")
void onSwipeRight(SwipeRightEvent<Widget> e) {
    MaterialLabel label = (MaterialLabel) e.getTarget();
    MaterialToast.fireToast(label.getText() + " swiped right");
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-demo,代码行数:6,代码来源:SwipeableView.java


示例11: onSwipeLeft

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
@UiHandler("swipeablePanel")
void onSwipeLeft(SwipeLeftEvent<Widget> e) {
    MaterialLabel label = (MaterialLabel) e.getTarget();
    MaterialToast.fireToast(label.getText() + " swiped left");
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-demo,代码行数:6,代码来源:SwipeableView.java


示例12: drawSplashPage

import gwt.material.design.client.ui.MaterialLabel; //导入依赖的package包/类
public void drawSplashPage(InstanceInfo instanceInfo) {
	clear();

	MaterialRow row = new MaterialRow();
	add(row);

	{
		MaterialColumn infoColumn = new MaterialColumn();
		infoColumn.setGrid("s12 m6");
		row.add(infoColumn);

		MaterialCard infoCard = new MaterialCard();
		MaterialCardContent infoContent = new MaterialCardContent();
		infoCard.add(infoContent);
		infoColumn.add(infoCard);

		MaterialCardTitle infoCardTitle = new MaterialCardTitle();
		infoCardTitle.setText("Basic Info");
		infoContent.add(infoCardTitle);

		MaterialLabel lumongoVersionLabel = new MaterialLabel("LuMongo Version: " + instanceInfo.getLumongoVersion());
		MaterialLabel luceneVersionLabel = new MaterialLabel("Lucene Version: " + instanceInfo.getLuceneVersion());
		MaterialLabel lumongoMemoryLabel = new MaterialLabel("LuMongo Memory: " + instanceInfo.getLumongoMemory());
		MaterialLabel jvmFreeMemoryLabel = new MaterialLabel("JVM Free Memory: " + instanceInfo.getJvmFreeMemory());
		MaterialLabel jvmMaxMemoryLabel = new MaterialLabel("JVM Max Memory: " + instanceInfo.getJvmMaxMemoryMB());
		MaterialLabel jvmTotalMemoryLabel = new MaterialLabel("JVM Total Memory: " + instanceInfo.getJvmTotalMemoryMB());
		MaterialLabel jvmUsedMemoryLabel = new MaterialLabel("JVM Used Memory: " + instanceInfo.getJvmUsedMemory());

		infoContent.add(lumongoVersionLabel);
		infoContent.add(luceneVersionLabel);
		infoContent.add(lumongoMemoryLabel);
		infoContent.add(jvmFreeMemoryLabel);
		infoContent.add(jvmMaxMemoryLabel);
		infoContent.add(jvmTotalMemoryLabel);
		infoContent.add(jvmUsedMemoryLabel);
	}

	{
		MaterialColumn chartColumn = new MaterialColumn(12, 6, 6);
		MaterialCard card = new MaterialCard();

		Map<String, Serializable> data = new HashMap<>();
		for (IndexInfo indexInfo : instanceInfo.getIndexes()) {
			data.put(indexInfo.getName(), indexInfo.getTotalDocs());
		}
		Scheduler.get().scheduleDeferred(() -> {
			Highcharts chart = PieChart.getBuilder().setChartTitle("Index Info").setHeight(400).setData(data).setYAxisAllowDecimals(false).build();
			card.add(chart);
			chartColumn.add(card);
			row.add(chartColumn);
		});

	}

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LeafSchemaNode类代码示例发布时间:2022-05-23
下一篇:
Java Overflow类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap