com.ait.lienzo.client.core.shape.Text.asNode()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中com.ait.lienzo.client.core.shape.Text.asNode()方法的一些代码示例,展示了Text.asNode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.asNode()方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Text
类名称:Text
方法名:asNode

Text.asNode介绍

暂无

代码示例

代码示例来源:origin: kiegroup/drools-wb

@Before
public void setUp() {
  doReturn(nodeMock).when(textMock).asNode();
  doReturn(nodeMock).when(placeholderMock).asNode();
  doReturn(nodeMock).when(errorTextMock).asNode();
  doReturn(nodeMock).when(rectangle).asNode();
  when(themeMock.getPlaceholderText()).thenReturn(placeholderMock);
  when(themeMock.getBodyText()).thenReturn(textMock);
  when(rendererMock.getTheme()).thenReturn(themeMock);
  when(contextMock.getRenderer()).thenReturn(rendererMock);
  when(themeMock.getErrorText()).thenReturn(errorTextMock);
  when(themeMock.getBodyErrorBackground(any())).thenReturn(rectangle);
  scenarioGridColumnRenderer = spy(new ScenarioGridColumnRenderer());
}

代码示例来源:origin: kiegroup/appformer

@Before
@SuppressWarnings("unchecked")
public void setup() {
  this.renderer = getRenderer();
  this.gridColumn = getGridColumn();
  final GridData uiModel = new BaseGridData();
  uiModel.appendColumn(gridColumn);
  when(context.getRenderer()).thenReturn(gridRenderer);
  when(headerContext.getRenderer()).thenReturn(gridRenderer);
  when(headerContext.getAllColumns()).thenReturn(uiModel.getColumns());
  when(headerContext.getBlockColumns()).thenReturn(uiModel.getColumns());
  when(gridRenderer.getTheme()).thenReturn(theme);
  when(theme.getBodyText()).thenReturn(text);
  when(theme.getHeaderText()).thenReturn(text);
  when(theme.getPlaceholderText()).thenReturn(placeHolderText);
  when(text.asNode()).thenReturn(textNode);
  when(placeHolderText.asNode()).thenReturn(placeHolderTextNode);
  when(headerGroup.asNode()).thenReturn(headerGroupNode);
  when(parentGroup.asNode()).thenReturn(parentGroupNode);
  when(renderContext.getGroup()).thenReturn(parentGroup);
  when(headerMetaData.getTitle()).thenReturn(TITLE);
}

代码示例来源:origin: org.uberfire/uberfire-wires-core-grids

@Before
@SuppressWarnings("unchecked")
public void setup() {
  this.renderer = getRenderer();
  this.gridColumn = getGridColumn();
  final GridData uiModel = new BaseGridData();
  uiModel.appendColumn(gridColumn);
  when(context.getRenderer()).thenReturn(gridRenderer);
  when(headerContext.getRenderer()).thenReturn(gridRenderer);
  when(headerContext.getAllColumns()).thenReturn(uiModel.getColumns());
  when(headerContext.getBlockColumns()).thenReturn(uiModel.getColumns());
  when(gridRenderer.getTheme()).thenReturn(theme);
  when(theme.getBodyText()).thenReturn(text);
  when(theme.getHeaderText()).thenReturn(text);
  when(theme.getPlaceholderText()).thenReturn(placeHolderText);
  when(text.asNode()).thenReturn(textNode);
  when(placeHolderText.asNode()).thenReturn(placeHolderTextNode);
  when(headerGroup.asNode()).thenReturn(headerGroupNode);
  when(parentGroup.asNode()).thenReturn(parentGroupNode);
  when(renderContext.getGroup()).thenReturn(parentGroup);
  when(headerMetaData.getTitle()).thenReturn(TITLE);
}

代码示例来源:origin: kiegroup/drools-wb

@Before
public void setup() {
  final List<GridColumn.HeaderMetaData> metaDataList = new ArrayList<GridColumn.HeaderMetaData>() {{
    add( headerMetaData );
  }};
  this.column = new EnumSingleSelectStringUiColumn( metaDataList,
                           100,
                           true,
                           true,
                           access,
                           multiValueFactory,
                           singleValueFactory,
                           presenter,
                           "FactType",
                           "FactField" );
  when( presenter.getView() ).thenReturn( view );
  when( view.getModel() ).thenReturn( uiModel );
  when( context.getRenderer() ).thenReturn( renderer );
  when( context.getCellWidth() ).thenReturn( 100.0 );
  when( context.getCellHeight() ).thenReturn( 32.0 );
  when( renderer.getTheme() ).thenReturn( theme );
  when( theme.getBodyText() ).thenReturn( bodyText );
  when( bodyText.setListening( anyBoolean() ) ).thenReturn( bodyText );
  when( bodyText.setX( anyDouble() ) ).thenReturn( bodyText );
  when( bodyText.setY( anyDouble() ) ).thenReturn( bodyText );
  when( bodyText.asNode() ).thenReturn( bodyTextNode );
}

相关文章