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


Java MaterialCard类代码示例

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


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

示例1: drawSplashPage

import gwt.material.design.client.ui.MaterialCard; //导入依赖的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.MaterialCard类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。