本文整理汇总了Java中org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer.getTheme方法的典型用法代码示例。如果您正苦于以下问题:Java GridRenderer.getTheme方法的具体用法?Java GridRenderer.getTheme怎么用?Java GridRenderer.getTheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer
的用法示例。
在下文中一共展示了GridRenderer.getTheme方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderCell
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //导入方法依赖的package包/类
@Override
public Group renderCell(final GridCell<String> cell,
final GridBodyCellRenderContext context) {
if (cell == null || cell.getValue() == null) {
return null;
}
final GridRenderer renderer = context.getRenderer();
final GridRendererTheme theme = renderer.getTheme();
final Group g = new Group();
final Text t = theme.getBodyText()
.setText(cell.getValue().getValue())
.setListening(false)
.setX(context.getCellWidth() / 2)
.setY(context.getCellHeight() / 2);
g.add(t);
return g;
}
示例2: renderCell
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //导入方法依赖的package包/类
@Override
public Group renderCell(final GridCell<Integer> cell,
final GridBodyCellRenderContext context) {
if (cell == null || cell.getValue() == null) {
return null;
}
final GridRenderer renderer = context.getRenderer();
final GridRendererTheme theme = renderer.getTheme();
final Group g = new Group();
final Text t = theme.getBodyText()
.setText(Integer.toString(cell.getValue().getValue()))
.setListening(false)
.setX(context.getCellWidth() / 2)
.setY(context.getCellHeight() / 2);
g.add(t);
return g;
}
示例3: getExpressionCellText
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //导入方法依赖的package包/类
public static Group getExpressionCellText(final GridBodyCellRenderContext context, final GridCell<String> gridCell) {
final GridRenderer gridRenderer = context.getRenderer();
final GridRendererTheme theme = gridRenderer.getTheme();
final Group g = new Group();
final Text t = theme.getBodyText()
.setText(gridCell.getValue().getValue())
.setListening(false)
.setX(5)
.setY(5)
.setFontFamily(BaseExpressionGridTheme.FONT_FAMILY_EXPRESSION)
.setTextAlign(TextAlign.LEFT);
t.setWrapper(new TextLineBreakWrap(t));
g.add(t);
return g;
}
示例4: getCenteredCellText
import org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer; //导入方法依赖的package包/类
public static Group getCenteredCellText(final GridBodyCellRenderContext context, final GridCell<String> gridCell) {
final GridRenderer gridRenderer = context.getRenderer();
final GridRendererTheme theme = gridRenderer.getTheme();
final Group g = new Group();
final Text t = theme.getBodyText()
.setText(gridCell.getValue().getValue())
.setListening(false)
.setX(context.getCellWidth() / 2)
.setY(context.getCellHeight() / 2);
g.add(t);
return g;
}