当前位置: 首页>>代码示例>>Java>>正文


Java BaseGridColumn类代码示例

本文整理汇总了Java中org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn的典型用法代码示例。如果您正苦于以下问题:Java BaseGridColumn类的具体用法?Java BaseGridColumn怎么用?Java BaseGridColumn使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BaseGridColumn类属于org.uberfire.ext.wires.core.grids.client.model.impl包,在下文中一共展示了BaseGridColumn类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setup

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Before
public void setup() {
    model = new GuidedDecisionTable52();
    uiModel = new GuidedDecisionTableUiModel(mock(ModelSynchronizer.class));

    final MenuItemFactory menuItemFactory = new MenuItemFactory(menuItemViewProducer);

    when(dtPresenter.hasEditableColumns()).thenReturn(true);
    when(dtPresenter.getView()).thenReturn(dtPresenterView);
    when(dtPresenter.getModel()).thenReturn(model);
    when(dtPresenter.getAccess()).thenReturn(access);
    when(dtPresenterView.getModel()).thenReturn(uiModel);
    when(translationService.getTranslation(any(String.class))).thenReturn("i18n");
    when(menuItemViewProducer.select(any(Annotation.class))).thenReturn(menuItemViewProducer);
    when(menuItemViewProducer.get()).thenReturn(mock(MenuItemWithIconView.class));

    uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
    uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
    uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
    uiModel.appendRow(new BaseGridRow());
    uiModel.appendRow(new BaseGridRow());

    builder = spy(new InsertMenuBuilder(translationService, menuItemFactory, wizardManagedInstance));
    builder.setup();
    builder.setModeller(modeller);
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:27,代码来源:InsertMenuBuilderTest.java

示例2: makeGridWidget2

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的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

示例3: testGetUiColumnIndexInHeaderAfterLastColumn

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的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

示例4: setup

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Before
public void setup() {
    model = new GuidedDecisionTable52();
    uiModel = new GuidedDecisionTableUiModel(mock(ModelSynchronizer.class));
    clipboard = new DefaultClipboard();

    final MenuItemFactory menuItemFactory = new MenuItemFactory(menuItemViewProducer);

    when(dtPresenter.hasEditableColumns()).thenReturn(true);
    when(dtPresenter.getView()).thenReturn(dtPresenterView);
    when(dtPresenter.getModel()).thenReturn(model);
    when(dtPresenter.getAccess()).thenReturn(access);
    when(dtPresenterView.getModel()).thenReturn(uiModel);
    when(ts.getTranslation(any(String.class))).thenReturn("i18n");
    when(menuItemViewProducer.select(any(Annotation.class))).thenReturn(menuItemViewProducer);
    when(menuItemViewProducer.get()).thenReturn(menuItemWithIconView);
    when(menuItemWithIconView.getElement()).thenReturn(menuItemHTMLElement);

    uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
    uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
    uiModel.appendColumn(new BaseGridColumn<>(headerMetaData, gridColumnRenderer, 100));
    uiModel.appendRow(new BaseGridRow());

    builder = spy(new EditMenuBuilder(clipboard,
                                      ts,
                                      menuItemFactory,
                                      popoverUtils));
    builder.setup();
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:30,代码来源:EditMenuBuilderTest.java

示例5: setup

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Before
@SuppressWarnings("unchecked")
public void setup() {
    model = new GuidedDecisionTable52();
    uiModel = new GuidedDecisionTableUiModel(mock(ModelSynchronizer.class));
    clipboard = new DefaultClipboard();

    when(dtPresenter.getView()).thenReturn(dtPresenterView);
    when(dtPresenter.getModel()).thenReturn(model);
    when(dtPresenter.getAccess()).thenReturn(access);
    when(dtPresenterView.getModel()).thenReturn(uiModel);

    uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class),
                                                    mock(GridColumnRenderer.class),
                                                    100));
    uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class),
                                                    mock(GridColumnRenderer.class),
                                                    100));
    uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class),
                                                    mock(GridColumnRenderer.class),
                                                    100));
    uiModel.appendRow(new BaseGridRow());

    menu = spy(new CellContextMenu(view,
                                   clipboard));
    menu.setup();
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:28,代码来源:CellContextMenuTest.java

示例6: setup

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Before
@SuppressWarnings("unchecked")
public void setup() {
    model = new GuidedDecisionTable52();
    uiModel = new GuidedDecisionTableUiModel(mock(ModelSynchronizer.class));
    clipboard = new DefaultClipboard();

    when(dtPresenter.getView()).thenReturn(dtPresenterView);
    when(dtPresenter.getModel()).thenReturn(model);
    when(dtPresenter.getAccess()).thenReturn(access);
    when(dtPresenterView.getModel()).thenReturn(uiModel);

    uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class),
                                                    mock(GridColumnRenderer.class),
                                                    100));
    uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class),
                                                    mock(GridColumnRenderer.class),
                                                    100));
    uiModel.appendColumn(new BaseGridColumn<String>(mock(GridColumn.HeaderMetaData.class),
                                                    mock(GridColumnRenderer.class),
                                                    100));
    uiModel.appendRow(new BaseGridRow());

    menu = spy(new RowContextMenu(view,
                                  clipboard));
    menu.setup();
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:28,代码来源:RowContextMenuTest.java

示例7: onContextMenu_CellContextMenu

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Test
@SuppressWarnings("unchecked")
public void onContextMenu_CellContextMenu() {
    final GuidedDecisionTableView.Presenter dtPresenter = makeDecisionTable();
    final GridData uiModel = dtPresenter.getView().getModel();
    final GridColumn uiColumn = new BaseGridColumn(mock(GridColumn.HeaderMetaData.class),
                                                   mock(GridColumnRenderer.class),
                                                   100.0);

    uiModel.appendColumn(uiColumn);

    when(columnInformation.getColumn()).thenReturn(uiColumn);
    when(modellerPresenter.getAvailableDecisionTables()).thenReturn(new HashSet<GuidedDecisionTableView.Presenter>() {{
        add(dtPresenter);
    }});

    final ContextMenuHandler handler = contextMenuSupport.getContextMenuHandler(modellerPresenter);

    handler.onContextMenu(event);

    verify(rowContextMenu,
           never()).show(any(Integer.class),
                         any(Integer.class));
    verify(cellContextMenu,
           times(1)).show(any(Integer.class),
                          any(Integer.class));
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:28,代码来源:GuidedDecisionTableModellerContextMenuSupportTest.java

示例8: showColumnServiceInvocation

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Test
public void showColumnServiceInvocation() {
    final Pattern52 p = new Pattern52();
    p.getChildColumns().add( new ConditionCol52() );
    this.model.getConditions().add( p );

    final BaseGridColumn<String> uiColumn3 = new BaseGridColumn<>( new BaseHeaderMetaData( "condition" ),
                                                                   columnRenderer,
                                                                   100.0 );
    uiModel.appendColumn( uiColumn3 );

    when( transform.getScaleX() ).thenReturn( 1.0 );
    when( transform.getScaleY() ).thenReturn( 1.0 );

    popOver.show( modellerView,
                  dtPresenter,
                  2 );

    verify( view,
            times( 1 ) ).show( contentProviderArgumentCaptor.capture() );

    popOver.show( modellerView,
                  dtPresenter,
                  2 );

    verify( view,
            times( 2 ) ).show( contentProviderArgumentCaptor.capture() );

    //Emulate Timer execution
    final PopOverView.ContentProvider contentProvider = contentProviderArgumentCaptor.getValue();
    contentProvider.getContent( ( PopOverView.Content content ) -> {
                                    assertEquals( "source",
                                                  content.getContent() );
                                }
                              );
    verify( service,
            times( 1 ) ).toSource( any( Path.class ),
                                   any( GuidedDecisionTable52.class ) );
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:40,代码来源:ColumnHeaderPopOverImplTest.java

示例9: setup

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Before
public void setup() {
    for (int size = 0; size < 3; size++) {
        this.uiModel.appendRow(new BaseGridRow());
        this.uiModel.appendColumn(new BaseGridColumn<>(headerMetaData,
                                                       columnRenderer,
                                                       100.0));
    }

    when(gridWidget.getModel()).thenReturn(uiModel);
    when(gridWidget.getPresenter()).thenReturn(dtPresenter);
    when(gridWidget.getRendererHelper()).thenReturn(rendererHelper);
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:14,代码来源:BaseKeyboardTest.java

示例10: makeGridWidget1

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
private GridWidget makeGridWidget1() {
    final GridData grid1 = new BaseGridData(false);
    grid1.setHeaderRowCount(2);
    final GridWidget gridWidget1 = new BaseGridWidget(grid1,
                                                      this,
                                                      view.getGridLayer(),
                                                      new BaseGridRenderer(new MultiColouredTheme()));

    //Add a floating column for row number
    final RowNumberColumn grid1ColumnRowNumber = new RowNumberColumn();
    grid1.appendColumn(grid1ColumnRowNumber);

    //Add a floating column
    final GridColumn.HeaderMetaData grid1ColumnFloatingHeaderMetaData = new BaseHeaderMetaData("Floating");
    final TextBoxSingletonDOMElementFactory grid1ColumnFloatingFactory = new TextBoxSingletonDOMElementFactory(view.getGridPanel(),
                                                                                                               view.getGridLayer(),
                                                                                                               gridWidget1);
    final BaseGridColumn<String> grid1ColumnFloating = new StringDOMElementSingletonColumn(grid1ColumnFloatingHeaderMetaData,
                                                                                           grid1ColumnFloatingFactory,
                                                                                           100);
    grid1ColumnFloating.setMovable(false);
    grid1ColumnFloating.setResizable(true);
    grid1ColumnFloating.setFloatable(true);
    grid1.appendColumn(grid1ColumnFloating);

    for (int idx = 0; idx < 8; idx++) {
        final int grid1ColumnGroupSuffix = (idx < 3 ? 0 : (idx < 6 ? 1 : 2));
        final boolean isFloatable = (idx == 0);
        final GridColumn.HeaderMetaData grid1ColumnHeaderMetaData1 = new BaseHeaderMetaData("G1-G" + grid1ColumnGroupSuffix + "-a-Long-Caption-1",
                                                                                            "grid1ColumnGroup");
        final GridColumn.HeaderMetaData grid1ColumnHeaderMetaData2 = new BaseHeaderMetaData("G1-G" + grid1ColumnGroupSuffix + "-C" + idx + "-a-Long-Caption-2",
                                                                                            "grid1ColumnGroup" + grid1ColumnGroupSuffix);
        final List<GridColumn.HeaderMetaData> grid1ColumnHeaderMetaData = new ArrayList<GridColumn.HeaderMetaData>();
        grid1ColumnHeaderMetaData.add(grid1ColumnHeaderMetaData1);
        grid1ColumnHeaderMetaData.add(grid1ColumnHeaderMetaData2);
        final BaseGridColumn<String> grid1Column = new StringPopupColumn(grid1ColumnHeaderMetaData,
                                                                         new StringColumnRenderer(),
                                                                         100);
        grid1Column.setMinimumWidth(50.0);
        grid1Column.setFloatable(isFloatable);
        grid1.appendColumn(grid1Column);
    }
    GridDataFactory.populate(grid1,
                             GRID1_ROWS);

    gridWidget1.setLocation(new Point2D(-1300,
                                        0));

    return gridWidget1;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:51,代码来源:WiresGridsDemoPresenter.java

示例11: setup

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Before
public void setup() {
    this.uiColumn1 = new RowNumberColumn();
    this.uiColumn2 = new BaseGridColumn<>(new BaseHeaderMetaData("title"),
                                          columnRenderer,
                                          100.0);
    this.uiModel = new BaseGridData() {{
        setHeaderRowCount(2);
    }};
    uiModel.appendColumn(uiColumn1);
    uiModel.appendColumn(uiColumn2);
    uiModel.appendRow(new BaseGridRow());
    uiModel.appendRow(new BaseGridRow());
    uiModel.appendRow(new BaseGridRow());

    this.mediators = new Mediators(viewport);

    when(renderer.getHeaderHeight()).thenReturn(64.0);
    when(renderer.getHeaderRowHeight()).thenReturn(32.0);

    when(layer.getViewport()).thenReturn(viewport);
    when(viewport.getElement()).thenReturn(element);
    when(viewport.getMediators()).thenReturn(mediators);
    when(element.getStyle()).thenReturn(style);
    when(gridWidget.getModel()).thenReturn(uiModel);
    when(gridWidget.getViewport()).thenReturn(viewport);
    when(gridWidget.getRenderer()).thenReturn(renderer);
    when(gridWidget.getRendererHelper()).thenReturn(helper);
    when(gridWidget.getWidth()).thenReturn(150.0);
    when(gridWidget.getHeight()).thenReturn(124.0);
    when(gridWidget.getAbsoluteX()).thenReturn(100.0);
    when(gridWidget.getAbsoluteY()).thenReturn(100.0);

    final BaseGridRendererHelper.RenderingInformation ri = new BaseGridRendererHelper.RenderingInformation(mock(Bounds.class),
                                                                                                           uiModel.getColumns(),
                                                                                                           new BaseGridRendererHelper.RenderingBlockInformation(uiModel.getColumns(),
                                                                                                                                                                0.0,
                                                                                                                                                                0.0,
                                                                                                                                                                0.0,
                                                                                                                                                                100),
                                                                                                           new BaseGridRendererHelper.RenderingBlockInformation(Collections.emptyList(),
                                                                                                                                                                0.0,
                                                                                                                                                                0.0,
                                                                                                                                                                0.0,
                                                                                                                                                                0.0),
                                                                                                           0,
                                                                                                           2,
                                                                                                           new ArrayList<Double>() {{
                                                                                                               add(20.0);
                                                                                                               add(40.0);
                                                                                                               add(60.0);
                                                                                                           }},
                                                                                                           false,
                                                                                                           false,
                                                                                                           0,
                                                                                                           2,
                                                                                                           0);
    when(helper.getRenderingInformation()).thenReturn(ri);

    final GridWidgetDnDHandlersState wrappedState = new GridWidgetDnDHandlersState();
    this.state = spy(wrappedState);

    final GridWidgetDnDMouseMoveHandler wrapped = new GridWidgetDnDMouseMoveHandler(layer,
                                                                                    state);
    this.handler = spy(wrapped);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:67,代码来源:GridWidgetDnDMouseMoveHandlerTest.java

示例12: onContextMenuWithMultipleTables

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Test
@SuppressWarnings("unchecked")
public void onContextMenuWithMultipleTables() {
    final GuidedDecisionTableView.Presenter dtPresenter1 = makeDecisionTable(0,
                                                                             0);
    final GuidedDecisionTableView.Presenter dtPresenter2 = makeDecisionTable(200,
                                                                             200);
    when(modellerPresenter.getAvailableDecisionTables()).thenReturn(new HashSet<GuidedDecisionTableView.Presenter>() {{
        add(dtPresenter1);
        add(dtPresenter2);
    }});

    final GridData uiModel1 = dtPresenter1.getView().getModel();
    final GridData uiModel2 = dtPresenter2.getView().getModel();

    final GridColumn uiColumn = new BaseGridColumn(mock(GridColumn.HeaderMetaData.class),
                                                   mock(GridColumnRenderer.class),
                                                   100.0);

    uiModel1.appendColumn(uiColumn);
    uiModel2.appendColumn(uiColumn);

    when(uiModel1.getCell(any(Integer.class),
                          any(Integer.class))).thenReturn(uiCell);
    when(uiModel2.getCell(any(Integer.class),
                          any(Integer.class))).thenReturn(uiCell);

    when(columnInformation.getColumn()).thenReturn(uiColumn);

    final ContextMenuHandler handler = contextMenuSupport.getContextMenuHandler(modellerPresenter);

    when(nativeEvent.getClientX()).thenReturn(50);
    when(nativeEvent.getClientY()).thenReturn(50);

    handler.onContextMenu(event);

    verify(cellSelectionStrategy,
           times(1)).handleSelection(uiModelCaptor.capture(),
                                     any(Integer.class),
                                     any(Integer.class),
                                     any(Boolean.class),
                                     any(Boolean.class));
    assertEquals(uiModel1,
                 uiModelCaptor.getValue());

    when(nativeEvent.getClientX()).thenReturn(250);
    when(nativeEvent.getClientY()).thenReturn(250);

    handler.onContextMenu(event);

    verify(cellSelectionStrategy,
           times(2)).handleSelection(uiModelCaptor.capture(),
                                     any(Integer.class),
                                     any(Integer.class),
                                     any(Boolean.class),
                                     any(Boolean.class));
    assertEquals(uiModel2,
                 uiModelCaptor.getValue());
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:60,代码来源:GuidedDecisionTableModellerContextMenuSupportTest.java

示例13: makeUiColumn

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private GridColumn makeUiColumn() {
    return spy(new BaseGridColumn(mock(GridColumn.HeaderMetaData.class),
                                  mock(GridColumnRenderer.class),
                                  100.0));
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:7,代码来源:GuidedDecisionTableModellerPresenterTest.java

示例14: setup

import org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn; //导入依赖的package包/类
@Before
@SuppressWarnings("unchecked")
public void setup() {
    this.model = new GuidedDecisionTable52();
    this.model.getExpandedColumns().get( 0 ).setHeader( "#" );
    this.model.getExpandedColumns().get( 1 ).setHeader( "description" );

    this.uiColumn1 = new RowNumberColumn();
    this.uiColumn2 = new BaseGridColumn<>( new BaseHeaderMetaData( "description" ),
                                           columnRenderer,
                                           100.0 );
    this.uiModel = new BaseGridData() {{
        setHeaderRowCount( 2 );
    }};
    uiModel.appendColumn( uiColumn1 );
    uiModel.appendColumn( uiColumn2 );

    serviceCaller = new CallerMock<>( service );
    when( service.toSource( any( Path.class ),
                            any( GuidedDecisionTable52.class ) ) ).thenReturn( "source" );

    final Instance<ColumnDefinitionBuilder> buildersInstance = makeBuildersInstance();
    final ColumnDefinitionFactory columnDefinitionFactory = new ColumnDefinitionFactory( buildersInstance );

    when( renderer.getHeaderHeight() ).thenReturn( 64.0 );
    when( renderer.getHeaderRowHeight() ).thenReturn( 32.0 );

    when( dtPresenter.getView() ).thenReturn( gridWidget );
    when( dtPresenter.getModel() ).thenReturn( model );
    when( dtPresenter.getDataModelOracle() ).thenReturn( dmo );

    when( modellerView.getGridLayerView() ).thenReturn( gridLayer );
    when( gridLayer.getDomElementContainer() ).thenReturn( domElementContainer );
    when( gridLayer.getVisibleBounds() ).thenReturn( bounds );
    when( gridLayer.getViewport() ).thenReturn( viewport );
    when( gridWidget.getModel() ).thenReturn( uiModel );
    when( gridWidget.getViewport() ).thenReturn( viewport );
    when( gridWidget.getRenderer() ).thenReturn( renderer );
    when( gridWidget.getRendererHelper() ).thenReturn( rendererHelper );
    when( gridWidget.getWidth() ).thenReturn( 150.0 );
    when( gridWidget.getHeight() ).thenReturn( 64.0 );
    when( gridWidget.getX() ).thenReturn( 50.0 );
    when( gridWidget.getY() ).thenReturn( 50.0 );

    when( domElementContainer.getAbsoluteLeft() ).thenReturn( 200 );
    when( viewport.getTransform() ).thenReturn( transform );
    when( rendererHelper.getColumnOffset( uiColumn1 ) ).thenReturn( 0.0 );
    when( rendererHelper.getColumnOffset( uiColumn2 ) ).thenReturn( uiColumn1.getWidth() );

    final BaseGridRendererHelper.RenderingInformation ri = new BaseGridRendererHelper.RenderingInformation( bounds,
                                                                                                            uiModel.getColumns(),
                                                                                                            new BaseGridRendererHelper.RenderingBlockInformation(
                                                                                                                    new ArrayList<GridColumn<?>>() {{
                                                                                                                        add( uiColumn2 );
                                                                                                                    }},
                                                                                                                    0.0,
                                                                                                                    0.0,
                                                                                                                    0.0,
                                                                                                                    100.0 ),
                                                                                                            new BaseGridRendererHelper.RenderingBlockInformation(
                                                                                                                    new ArrayList<GridColumn<?>>() {{
                                                                                                                        add( uiColumn1 );
                                                                                                                    }},
                                                                                                                    25.0,
                                                                                                                    0.0,
                                                                                                                    0.0,
                                                                                                                    50.0 ),
                                                                                                            0,
                                                                                                            0,
                                                                                                            Collections.<Double>emptyList(),
                                                                                                            false,
                                                                                                            false,
                                                                                                            0,
                                                                                                            2,
                                                                                                            0 );
    when( rendererHelper.getRenderingInformation() ).thenReturn( ri );

    final ColumnHeaderPopOver wrapped = new ColumnHeaderPopOverImpl( view,
                                                                     columnDefinitionFactory );
    this.popOver = spy( wrapped );
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:82,代码来源:ColumnHeaderPopOverImplTest.java


注:本文中的org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridColumn类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。