本文整理匯總了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;
}