use of org.freeplane.core.ui.menubuilders.generic.BuilderDestroyerPair in project freeplane by freeplane.
the class MenuBuilderIntegrationTest method setup.
@Before
public void setup() {
freeplaneActions = mock(FreeplaneActions.class);
recursiveMenuStructureBuilder = new RecursiveMenuStructureProcessor();
recursiveMenuStructureBuilder.setDefaultBuilderPair(EntryVisitor.EMTPY, EntryVisitor.EMTPY);
final IUserInputListenerFactory userInputListenerFactory = mock(IUserInputListenerFactory.class);
toolbar = new JToolBar();
when(userInputListenerFactory.getToolBar("/main_toolbar")).thenReturn(toolbar);
recursiveMenuStructureBuilder.addBuilder("toolbar", new JToolbarBuilder(userInputListenerFactory));
recursiveMenuStructureBuilder.setSubtreeDefaultBuilderPair("toolbar", "toolbar.action");
recursiveMenuStructureBuilder.addBuilderPair("toolbar.action", new BuilderDestroyerPair(new JToolbarComponentBuilder(), null));
}
Aggregations