本文整理匯總了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);
}
示例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()));
}
}};
}
示例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()));
}
}};
}
示例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));
}
示例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());
}
示例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;
}
示例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();
}
示例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));
}
示例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));
}
示例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"));
}};
}
示例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()));
}};
}
示例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() ) );
}};
}
示例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;
}
示例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() ) );
}};
}
示例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));
}};
}