gpt4 book ai didi

org.uberfire.client.workbench.part.WorkbenchPartPresenter.getDefinition()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 13:11:05 25 4
gpt4 key购买 nike

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

WorkbenchPartPresenter.getDefinition介绍

暂无

代码示例

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

private WorkbenchPartPresenter getWorkbenchPartPresenter(final PartDefinition part) {
  final WorkbenchPartPresenter presenter = mock(WorkbenchPartPresenter.class);
  doReturn(part).when(presenter).getDefinition();
  return presenter;
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@Override
  public void onClick(final ClickEvent event) {
    final WorkbenchPartPresenter.View partToDeselect = tabInvertedIndex.get(tab);
    panelManager.closePlace(partToDeselect.getPresenter().getDefinition().getPlace());
  }
});

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-bs2

@Override
  public void onShow( final ShowEvent e ) {
    if ( e.getTarget() == null ) {
      return;
    }
    SelectionEvent.fire( UberTabPanel.this, tabInvertedIndex.get( e.getTarget() ).getPresenter().getDefinition() );
  }
} );

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@Override
  public void onShow(TabShowEvent e) {
    if (e.getTab() != null) {
      final TabPanelEntry selected = tabPanel.findEntryForTabWidget(e.getTab());
      BeforeSelectionEvent
          .fire(UberTabPanel.this,
             tabInvertedIndex.get(selected).getPresenter().getDefinition());
    }
  }
});

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-bs2

@Override
  public void onShow( final ShownEvent e ) {
    onResize();
    if ( e.getRelatedTarget() != null ) {
      BeforeSelectionEvent.fire( UberTabPanel.this, tabInvertedIndex.get( e.getRelatedTarget() ).getPresenter().getDefinition() );
    }
  }
} );

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
public void addPartTest() {
  WorkbenchPartPresenter part = mock(WorkbenchPartPresenter.class);
  when(part.getDefinition()).thenReturn(mock(PartDefinition.class));
  presenter.addPart(part);
  verify(view).addPart(any());
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@Override
public void onClick(final ClickEvent event) {
  if (!hasFocus) {
    fireFocusGained();
    View view = getSelectedPart();
    if (view != null) {
      SelectionEvent.fire(UberTabPanel.this,
                view.getPresenter().getDefinition());
    }
  }
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
public void addPartTest() {
  WorkbenchPartPresenter part = mock(WorkbenchPartPresenter.class);
  when(part.getDefinition()).thenReturn(mock(PartDefinition.class));
  presenter.addPart(part);
  verify(view).addPart(any());
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
public void addPartTest() {
  WorkbenchPartPresenter part = mock(WorkbenchPartPresenter.class);
  when(part.getDefinition()).thenReturn(mock(PartDefinition.class));
  presenter.addPart(part);
  verify(view).addPart(any());
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

public void addPart(final WorkbenchPartPresenter.View view) {
  final PartDefinition part = view.getPresenter().getDefinition();
  partView.put(part,
         view);
  buildWidgets(part,
         view.getPresenter().getTitle(),
         view.getPresenter().getTitleDecoration());
  if (partTitles.size() == 1) {
    selectPart(part);
  }
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
public void addPartTest() {
  WorkbenchPartPresenter part = mock(WorkbenchPartPresenter.class);
  when(part.getDefinition()).thenReturn(mock(PartDefinition.class));
  presenter.addPart(part);
  verify(view).addPart(any());
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-bs2

@Override
public void onClick( final ClickEvent event ) {
  if ( !hasFocus ) {
    fireFocusGained();
    View view = getSelectedPart();
    if ( view != null ) {
      SelectionEvent.fire( UberTabPanel.this, view.getPresenter().getDefinition() );
    }
  }
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@Before
public void setup() {
  when(multiScreenViews.get()).thenReturn(multiScreenView);
  final WorkbenchPartPresenter presenter = mock(WorkbenchPartPresenter.class);
  when(view.getPresenter()).thenReturn(presenter);
  when(partDefinition.getParentPanel()).thenReturn(mock(PanelDefinition.class));
  when(presenter.getDefinition()).thenReturn(partDefinition);
}

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

@Before
public void setup() {
  when(multiScreenViews.get()).thenReturn(multiScreenView);
  final WorkbenchPartPresenter presenter = mock(WorkbenchPartPresenter.class);
  when(view.getPresenter()).thenReturn(presenter);
  when(partDefinition.getParentPanel()).thenReturn(mock(PanelDefinition.class));
  when(presenter.getDefinition()).thenReturn(partDefinition);
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@Override
  public void onShown(TabShownEvent e) {
    onResize();
    if (e.getTab() != null) {
      final TabPanelEntry selected = tabPanel.findEntryForTabWidget(e.getTab());
      SelectionEvent
          .fire(UberTabPanel.this,
             tabInvertedIndex.get(selected).getPresenter().getDefinition());
    }
  }
});

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

@Override
  public void onShown(TabShownEvent e) {
    onResize();
    if (e.getTab() != null) {
      final TabPanelEntry selected = tabPanel.findEntryForTabWidget(e.getTab());
      SelectionEvent
          .fire(UberTabPanel.this,
             tabInvertedIndex.get(selected).getPresenter().getDefinition());
    }
  }
});

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Before
public void setUp() {
  when(mockPerspectiveManager.getLivePerspectiveDefinition()).thenReturn(panelManagerPerspectiveDefinition);
  panelManagerPerspectiveDefinition.setContextDefinition(perspectiveContextDefinition);
  when(mockActivityManager.getActivity(ContextActivity.class,
                     perspectiveContextDefinition.getPlace())).thenReturn(perspectiveContextActivity);
  when(mockPartView.getPresenter()).thenReturn(mockPartPresenter);
  when(mockPartPresenter.getDefinition()).thenReturn(partPresenterPartDefinition);
}

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

@Override
public void addPart(final WorkbenchPartPresenter.View view) {
  // invoked when this presenter panels within perspectives (not root)
  PartDefinition part = view.getPresenter().getDefinition();
  if (!partManager.hasPart(part)) {
    partManager.registerPart(part,
                 view.getWrappedWidget().asWidget());
  }
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
public void addPartTest() {
  presenter = new SimpleDnDWorkbenchPanelPresenter(view,
                           mock(PerspectiveManager.class),
                           placeManager);
  presenter.init();
  presenter.setDefinition(new PanelDefinitionImpl());
  WorkbenchPartPresenter part = mock(WorkbenchPartPresenter.class);
  when(part.getDefinition()).thenReturn(mock(PartDefinition.class));
  presenter.addPart(part);
  verify(view).addPart(any());
}

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

@Test
public void addPartTest() {
  presenter = new SimpleDnDWorkbenchPanelPresenter(view,
                           mock(PerspectiveManager.class),
                           placeManager);
  presenter.init();
  presenter.setDefinition(new PanelDefinitionImpl());
  WorkbenchPartPresenter part = mock(WorkbenchPartPresenter.class);
  when(part.getDefinition()).thenReturn(mock(PartDefinition.class));
  presenter.addPart(part);
  verify(view).addPart(any());
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com