當前位置: 首頁>>代碼示例>>Java>>正文


Java GridRenderer.getTheme方法代碼示例

本文整理匯總了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;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:20,代碼來源:ListBoxColumnDOMElementSingletonRenderer.java

示例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;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:20,代碼來源:IntegerColumnRenderer.java

示例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;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:18,代碼來源:RendererUtils.java

示例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;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:14,代碼來源:RendererUtils.java


注:本文中的org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer.getTheme方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。