Search in sources :

Example 6 with PhaseProcessor

use of org.freeplane.core.ui.menubuilders.generic.PhaseProcessor in project freeplane by freeplane.

the class MenuBuilderIntegrationTest method buildJMenu.

private Entry buildJMenu(String content) {
    final Entry buildMenuStructure = XmlEntryStructureBuilder.buildMenuStructure(content);
    final RecursiveMenuStructureProcessor actionBuilder = new RecursiveMenuStructureProcessor();
    actionBuilder.setDefaultBuilder(new ActionFinder(freeplaneActions));
    new PhaseProcessor().withPhase(ACTIONS, actionBuilder).withPhase(UI, recursiveMenuStructureBuilder).build(buildMenuStructure);
    return buildMenuStructure;
}
Also used : Entry(org.freeplane.core.ui.menubuilders.generic.Entry) RecursiveMenuStructureProcessor(org.freeplane.core.ui.menubuilders.generic.RecursiveMenuStructureProcessor) PhaseProcessor(org.freeplane.core.ui.menubuilders.generic.PhaseProcessor) ActionFinder(org.freeplane.core.ui.menubuilders.action.ActionFinder)

Aggregations

PhaseProcessor (org.freeplane.core.ui.menubuilders.generic.PhaseProcessor)6 Entry (org.freeplane.core.ui.menubuilders.generic.Entry)5 SubtreeProcessor (org.freeplane.core.ui.menubuilders.generic.SubtreeProcessor)4 Test (org.junit.Test)4 BufferedReader (java.io.BufferedReader)1 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 JPopupMenu (javax.swing.JPopupMenu)1 JToolBar (javax.swing.JToolBar)1 IUserInputListenerFactory (org.freeplane.core.ui.IUserInputListenerFactory)1 ActionFinder (org.freeplane.core.ui.menubuilders.action.ActionFinder)1 EntriesForAction (org.freeplane.core.ui.menubuilders.action.EntriesForAction)1 BuildPhaseListener (org.freeplane.core.ui.menubuilders.generic.BuildPhaseListener)1 RecursiveMenuStructureProcessor (org.freeplane.core.ui.menubuilders.generic.RecursiveMenuStructureProcessor)1 MenuBuildProcessFactory (org.freeplane.core.ui.menubuilders.menu.MenuBuildProcessFactory)1 BeforeClass (org.junit.BeforeClass)1