use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.themes.GridRendererTheme in project kie-wb-common by kiegroup.
the class RendererUtils method getExpressionHeaderText.
public static Group getExpressionHeaderText(final EditableHeaderMetaData headerMetaData, final GridHeaderColumnRenderContext context) {
final GridRenderer gridRenderer = context.getRenderer();
final GridRendererTheme theme = gridRenderer.getTheme();
return getExpressionText(theme, headerMetaData.getTitle());
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.themes.GridRendererTheme in project kie-wb-common by kiegroup.
the class RendererUtils method getExpressionCellText.
public static Group getExpressionCellText(final GridBodyCellRenderContext context, final GridCell<String> gridCell) {
final GridRenderer gridRenderer = context.getRenderer();
final GridRendererTheme theme = gridRenderer.getTheme();
return getExpressionText(theme, gridCell.getValue().getValue());
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.themes.GridRendererTheme in project kie-wb-common by kiegroup.
the class RendererUtils method getCenteredCellText.
public static Group getCenteredCellText(final GridBodyCellRenderContext context, final GridCell<String> gridCell) {
final GridRenderer gridRenderer = context.getRenderer();
final GridRendererTheme theme = gridRenderer.getTheme();
final Group g = GWT.create(Group.class);
String value = gridCell.getValue().getValue();
final Text t;
if (!StringUtils.isEmpty(value)) {
t = theme.getBodyText();
} else {
value = gridCell.getValue().getPlaceHolder();
t = theme.getPlaceholderText();
}
t.setText(value);
t.setListening(false);
t.setX(context.getCellWidth() / 2);
t.setY(context.getCellHeight() / 2);
g.add(t);
return g;
}
Aggregations