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


Java BaseHeaderMetaData類代碼示例

本文整理匯總了Java中org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData的典型用法代碼示例。如果您正苦於以下問題:Java BaseHeaderMetaData類的具體用法?Java BaseHeaderMetaData怎麽用?Java BaseHeaderMetaData使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BaseHeaderMetaData類屬於org.uberfire.ext.wires.core.grids.client.model.impl包,在下文中一共展示了BaseHeaderMetaData類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setup

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Before
public void setup() {
    final BaseGridRenderer wrapped = new BaseGridRenderer(theme);
    this.renderer = spy(wrapped);

    this.column = new StringPopupColumn(new BaseHeaderMetaData("title"),
                                        columnRenderer,
                                        100.0);

    this.model = new BaseGridData();
    this.model.appendColumn(column);
    this.model.appendRow(new BaseGridRow());
    this.model.appendRow(new BaseGridRow());
    this.model.appendRow(new BaseGridRow());

    this.selectionsTransformer = new DefaultSelectionsTransformer(model,
                                                                  Collections.singletonList(column));

    when(context.getBlockColumns()).thenReturn(Collections.singletonList(column));
    when(context.getTransformer()).thenReturn(selectionsTransformer);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:22,代碼來源:BaseGridRendererTest.java

示例2: makeHeaderMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData(final BaseColumn column) {
    return new ArrayList<GridColumn.HeaderMetaData>() {{
        if (column instanceof ActionInsertFactCol52) {
            ActionInsertFactCol52 actionInsertFactColumn = (ActionInsertFactCol52) column;
            StringBuilder headerFirstRow = new StringBuilder();
            if (actionInsertFactColumn.getBoundName() != null && !actionInsertFactColumn.getBoundName().isEmpty()) {
                headerFirstRow.append(actionInsertFactColumn.getBoundName())
                        .append(" : ");
            }
            headerFirstRow.append(actionInsertFactColumn.getFactType());
            add(new BaseHeaderMetaData(headerFirstRow.toString(),
                                       ActionCol52.class.getName()));
            add(new BaseHeaderMetaData(column.getHeader(),
                                       headerFirstRow.toString()));
        } else {
            add(new BaseHeaderMetaData(column.getHeader(),
                                       ActionCol52.class.getName()));
        }
    }};
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:22,代碼來源:ActionInsertFactColumnConverter.java

示例3: makeHeaderMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData(final BaseColumn column) {
    return new ArrayList<GridColumn.HeaderMetaData>() {{
        if (column instanceof ActionSetFieldCol52) {
            ActionSetFieldCol52 actionSetFieldColumn = (ActionSetFieldCol52) column;
            if (actionSetFieldColumn.getBoundName() != null && !actionSetFieldColumn.getBoundName().isEmpty()) {
                add(new BaseHeaderMetaData(actionSetFieldColumn.getBoundName(),
                                           ActionCol52.class.getName()));
                add(new BaseHeaderMetaData(column.getHeader(),
                                           actionSetFieldColumn.getBoundName()));
            }
        } else {
            add(new BaseHeaderMetaData(column.getHeader(),
                                       ActionCol52.class.getName()));
        }
    }};
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:18,代碼來源:ActionSetFieldColumnConverter.java

示例4: ExpressionContainer

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
public ExpressionContainer(final DMNGridLayer gridLayer) {
    super(new DMNGridData(gridLayer),
          gridLayer,
          gridLayer,
          new ExpressionContainerRenderer());
    setEventPropagationMode(EventPropagationMode.NO_ANCESTORS);

    final GridColumn expressionColumn = new ExpressionEditorColumn(new BaseHeaderMetaData(COLUMN_GROUP),
                                                                   this);
    expressionColumn.setMovable(false);
    expressionColumn.setResizable(true);

    model.appendColumn(expressionColumn);
    model.appendRow(new DMNGridRow());

    getRenderer().setColumnRenderConstraint((isSelectionLayer, gridColumn) -> !isSelectionLayer || gridColumn.equals(expressionColumn));
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:18,代碼來源:ExpressionContainer.java

示例5: testExpressionColumnMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Test
public void testExpressionColumnMetaData() {
    final GridColumn<?> column = grid.getModel().getColumns().get(InvocationUIModelMapper.BINDING_EXPRESSION_COLUMN_INDEX);
    final List<GridColumn.HeaderMetaData> header = column.getHeaderMetaData();

    assertEquals(2,
                 header.size());
    assertTrue(header.get(0) instanceof BaseHeaderMetaData);
    assertTrue(header.get(1) instanceof InvocationColumnExpressionHeaderMetaData);

    final BaseHeaderMetaData md1 = (BaseHeaderMetaData) header.get(0);
    final InvocationColumnExpressionHeaderMetaData md2 = (InvocationColumnExpressionHeaderMetaData) header.get(1);

    assertEquals("",
                 md1.getTitle());
    assertEquals("invocation-expression",
                 md2.getTitle());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:19,代碼來源:InvocationGridTest.java

示例6: makeGridWidget2

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
private GridWidget makeGridWidget2() {
    final GridData grid2 = new BaseGridData(false);
    final GridWidget gridWidget2 = new BaseGridWidget(grid2,
                                                      this,
                                                      view.getGridLayer(),
                                                      new BaseGridRenderer(new MultiColouredTheme()) {
                                                          @Override
                                                          public double getHeaderHeight() {
                                                              return 64.0;
                                                          }

                                                          @Override
                                                          public double getHeaderRowHeight() {
                                                              return 64.0;
                                                          }
                                                      });
    for (int idx = 0; idx < 5; idx++) {
        final GridColumn.HeaderMetaData grid2ColumnHeaderMetaData = new BaseHeaderMetaData("G2-G0-C" + idx);
        final BaseGridColumn<String> grid2Column = new StringPopupColumn(grid2ColumnHeaderMetaData,
                                                                         new StringColumnRenderer(),
                                                                         150);
        grid2.appendColumn(grid2Column);
    }
    GridDataFactory.populate(grid2,
                             GRID2_ROWS);

    gridWidget2.setLocation(new Point2D(0,
                                        750));

    return gridWidget2;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:32,代碼來源:WiresGridsDemoPresenter.java

示例7: testGetUiColumnIndexInHeaderAfterLastColumn

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Test
public void testGetUiColumnIndexInHeaderAfterLastColumn() throws Exception {
    gridData.appendColumn(new BaseGridColumn<Object>(new BaseHeaderMetaData("first"), gridColumnRenderer, COLUMN_WIDTH));
    gridData.appendColumn(new BaseGridColumn<Object>(new BaseHeaderMetaData("second"), gridColumnRenderer, COLUMN_WIDTH));
    gridData.appendColumn(new BaseGridColumn<Object>(new BaseHeaderMetaData("third"), gridColumnRenderer, COLUMN_WIDTH));
    view = spy(new BaseGridWidget(gridData, gridSelectionManager, gridPinnedModeManager, gridRenderer));
    doReturn(gridSelectionManager).when(view).getLayer();
    final Integer columnIndex = CoordinateUtilities.getUiColumnIndex(view, (COLUMN_WIDTH * 3) + 1);
    Assertions.assertThat(columnIndex).isNull();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:11,代碼來源:CoordinateUtilitiesTest.java

示例8: renderingWithDOMElementColumnsAndRows

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Test
public void renderingWithDOMElementColumnsAndRows() {
    final BaseGridRendererHelper.RenderingInformation ri = makeRenderingInformation(new ArrayList<Double>() {{
        add(ROW_HEIGHT);
    }});
    when(rendererHelper.getRenderingInformation()).thenReturn(ri);

    final BooleanDOMElementColumn column = spy(new BooleanDOMElementColumn(new BaseHeaderMetaData("col1"),
                                                                           new CheckBoxDOMElementFactory(gridLayer,
                                                                                                         gridWidget),
                                                                           100.0));

    model.appendColumn(column);
    model.appendRow(new BaseGridRow(ROW_HEIGHT));

    final Context2D context2D = mock(Context2D.class);
    final BoundingBox boundingBox = mock(BoundingBox.class);

    gridWidget.drawWithTransforms(context2D,
                                  1.0,
                                  boundingBox);

    verify(column,
           times(1)).initialiseResources();
    verify(column,
           times(1)).freeUnusedResources();
    verify(gridWidget,
           times(1)).drawHeader(eq(ri),
                                eq(false));
    verify(gridWidget,
           times(1)).drawBody(eq(ri),
                              eq(false));
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:34,代碼來源:BaseGridWidgetRenderingTest.java

示例9: renderingWithDOMElementColumnsAndWithoutRows

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Test
public void renderingWithDOMElementColumnsAndWithoutRows() {
    final BaseGridRendererHelper.RenderingInformation ri = makeRenderingInformation(Collections.emptyList());
    when(rendererHelper.getRenderingInformation()).thenReturn(ri);

    final BooleanDOMElementColumn column = spy(new BooleanDOMElementColumn(new BaseHeaderMetaData("col1"),
                                                                           new CheckBoxDOMElementFactory(gridLayer,
                                                                                                         gridWidget),
                                                                           100.0));

    model.appendColumn(column);

    final Context2D context2D = mock(Context2D.class);
    final BoundingBox boundingBox = mock(BoundingBox.class);

    gridWidget.drawWithTransforms(context2D,
                                  1.0,
                                  boundingBox);

    verify(column,
           times(1)).initialiseResources();
    verify(column,
           times(1)).freeUnusedResources();
    verify(gridWidget,
           times(1)).drawHeader(eq(ri),
                                eq(false));
    verify(gridWidget,
           never()).drawBody(any(BaseGridRendererHelper.RenderingInformation.class),
                             any(Boolean.class));
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:31,代碼來源:BaseGridWidgetRenderingTest.java

示例10: makeHeaderMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData(final BaseColumn column) {
    final PortableWorkDefinition pwd = ((ActionWorkItemCol52) column).getWorkItemDefinition();
    final String workItemName = pwd == null ? column.getHeader() : pwd.getName();
    return new ArrayList<GridColumn.HeaderMetaData>() {{
        add(new BaseHeaderMetaData(workItemName,
                                   ActionCol52.class.getName()));
        add(new BaseHeaderMetaData(column.getHeader(),
                                   workItemName + "-exec"));
    }};
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:12,代碼來源:ActionWorkItemExecuteColumnConverter.java

示例11: makeHeaderMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData(final BaseColumn column) {
    return new ArrayList<GridColumn.HeaderMetaData>() {{
        add(new BaseHeaderMetaData(model.getHitPolicy().getId(),
                                   RowNumberCol52.class.getName()));
    }};
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:8,代碼來源:RowNumberColumnConverter.java

示例12: makeHeaderMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData( final BaseColumn column ) {
    return new ArrayList<GridColumn.HeaderMetaData>() {{
        add( new BaseHeaderMetaData( ( (MetadataCol52) column ).getMetadata(),
                                     MetadataCol52.class.getName() ) );
    }};
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:8,代碼來源:MetaDataColumnConverter.java

示例13: makeSalienceHeaderMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
private List<GridColumn.HeaderMetaData> makeSalienceHeaderMetaData( final BaseColumn column ) {
    final List<GridColumn.HeaderMetaData> headerMetaData;

    if ( model.getHitPolicy()
            .equals( GuidedDecisionTable52.HitPolicy.RESOLVED_HIT ) ) {
        headerMetaData = new ArrayList<GridColumn.HeaderMetaData>() {{
            add( new BaseHeaderMetaData( GuidedDecisionTableConstants.INSTANCE.HasPriorityOverRow(),
                                         AttributeCol52.class.getName() ) );
        }};
    } else {
        headerMetaData = makeHeaderMetaData( column );
    }
    return headerMetaData;
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:15,代碼來源:AttributeColumnConverter.java

示例14: makeHeaderMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData( final BaseColumn column ) {
    return new ArrayList<GridColumn.HeaderMetaData>() {{
        add( new BaseHeaderMetaData( ( (AttributeCol52) column ).getAttribute(),
                                     AttributeCol52.class.getName() ) );
    }};
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:8,代碼來源:AttributeColumnConverter.java

示例15: makeHeaderMetaData

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData; //導入依賴的package包/類
@Override
public List<GridColumn.HeaderMetaData> makeHeaderMetaData(final BaseColumn column) {
    final String patternHeader = getPatternHeader(column);
    final String conditionHeader = getConditionHeader(column);
    return new ArrayList<GridColumn.HeaderMetaData>() {{
        add(new BaseHeaderMetaData(patternHeader,
                                   ConditionCol52.class.getName()));
        add(new BaseHeaderMetaData(conditionHeader,
                                   patternHeader));
    }};
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:12,代碼來源:ConditionColumnConverter.java


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