本文整理汇总了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);
});
}
}