Examples of IUserInputListenerFactory


Examples of org.freeplane.core.ui.IUserInputListenerFactory

        initRoot();
    setBackground(requiredBackground());
    final MapStyleModel mapStyleModel = MapStyleModel.getExtension(model);
    zoom = mapStyleModel.getZoom();
    layoutType = mapStyleModel.getMapViewLayout();
    final IUserInputListenerFactory userInputListenerFactory = getModeController().getUserInputListenerFactory();
    addMouseListener(userInputListenerFactory.getMapMouseListener());
    addMouseMotionListener(userInputListenerFactory.getMapMouseListener());
    addMouseWheelListener(userInputListenerFactory.getMapMouseWheelListener());
    setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, emptyNodeViewSet());
    setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, emptyNodeViewSet());
    setFocusTraversalKeys(KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, emptyNodeViewSet());
    disableMoveCursor = ResourceController.getResourceController().getBooleanProperty("disable_cursor_move_paper");
    backgroundImageResizer = new ComponentAdapter() {
View Full Code Here

Examples of org.freeplane.core.ui.IUserInputListenerFactory

      modeController.addAction(new MapBackgroundClearAction());
      modeController.addAction(new SetBooleanMapPropertyAction(MapStyle.FIT_TO_VIEWPORT));
      modeController.addAction(new CopyMapStylesAction());
    }
    if(! modeController.getController().getViewController().isHeadless()){
      final IUserInputListenerFactory userInputListenerFactory = modeController.getUserInputListenerFactory();
      final MenuBuilder menuBuilder = userInputListenerFactory.getMenuBuilder(MenuBuilder.class);
      //TODO RIBBONS - apply to ribbons as well
      Controller.getCurrentController().getMapViewManager().addMapSelectionListener(new IMapSelectionListener() {
        public void beforeMapChange(final MapModel oldMap, final MapModel newMap) {
          removeStyleMenu(menuBuilder, "main_menu_styles");
          removeStyleMenu(menuBuilder, "node_popup_styles");
View Full Code Here

Examples of org.freeplane.core.ui.IUserInputListenerFactory

   */
  public void startup() {
  }

  public void updateMenus(String menuStructure, final Set<String> plugins) {
    final IUserInputListenerFactory userInputListenerFactory = getUserInputListenerFactory();
    userInputListenerFactory.getAcceleratorManager().loadDefaultAcceleratorPresets();
    userInputListenerFactory.updateMenus(menuStructure, plugins);
    final MenuBuilder menuBuilder = userInputListenerFactory.getMenuBuilder(MenuBuilder.class);
    final Iterator<IMenuContributor> iterator = menuContributors.iterator();
    while (iterator.hasNext()) {
      iterator.next().updateMenus(this, menuBuilder);
    }
  }
View Full Code Here

Examples of org.freeplane.core.ui.IUserInputListenerFactory

  }
  public FoldingController() {
    super();
    final ModeController modeController = Controller.getCurrentModeController();
    if(!modeController.getController().getViewController().isHeadless()){
      final IUserInputListenerFactory userInputListenerFactory = modeController.getUserInputListenerFactory();
      userInputListenerFactory.addMouseWheelEventHandler(this);
      for (final AFreeplaneAction annotatedAction : getAnnotatedActions()) {
        modeController.addAction(annotatedAction);
      }
    }
  }
View Full Code Here

Examples of org.freeplane.core.ui.IUserInputListenerFactory

  public void selectMode( final ModeController oldModeController,  final ModeController newModeController) {
    if (oldModeController == newModeController) {
      return;
    }
    if (oldModeController != null) {
      final IUserInputListenerFactory userInputListenerFactory = oldModeController.getUserInputListenerFactory();
      for (int j = 0; j < 4; j++) {
        final Iterable<JComponent> modeToolBars = userInputListenerFactory.getToolBars(j);
        if (modeToolBars != null) {
          for (final Component toolBar : modeToolBars) {
            toolbarPanel[j].remove(toolBar);
          }
          toolbarPanel[j].revalidate();
        }
      }
    }
    final IUserInputListenerFactory newUserInputListenerFactory = newModeController.getUserInputListenerFactory();
    for (int j = 0; j < 4; j++) {
      final Iterable<JComponent> newToolBars = newUserInputListenerFactory.getToolBars(j);
      if (newToolBars != null) {
        int i = 0;
        for (final JComponent toolBar : newToolBars) {
          UIComponentVisibilityDispatcher dispatcher = UIComponentVisibilityDispatcher.dispatcher(toolBar);
          if(dispatcher != null) {
            dispatcher.resetVisible();
            toolbarPanel[j].add(toolBar, i++);
          }
        }
        toolbarPanel[j].revalidate();
        toolbarPanel[j].repaint();
      }
    }
    if(newUserInputListenerFactory.useRibbonMenu()) {
      newUserInputListenerFactory.getMenuBuilder(RibbonBuilder.class).buildRibbon();
    }
    else {
      setFreeplaneMenuBar(newUserInputListenerFactory.getMenuBar());
      setUIComponentsVisible(newModeController.getController().getMapViewManager(), isMenubarVisible());
    }

  }
View Full Code Here

Examples of org.freeplane.core.ui.IUserInputListenerFactory

    }
    else {
      add(newMainView);
    }
    mainView = newMainView;
    final IUserInputListenerFactory userInputListenerFactory = getMap().getModeController()
        .getUserInputListenerFactory();
    mainView.addMouseListener(userInputListenerFactory.getNodeMouseMotionListener());
    mainView.addMouseMotionListener(userInputListenerFactory.getNodeMouseMotionListener());
    mainView.addKeyListener(userInputListenerFactory.getNodeKeyListener());
    addDragListener(userInputListenerFactory.getNodeDragListener());
    addDropListener(userInputListenerFactory.getNodeDropTargetListener());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.