Search in sources :

Example 56 with Controller

use of org.freeplane.features.mode.Controller in project freeplane by freeplane.

the class MUIFactory method mapChanged.

public void mapChanged(final MapChangeEvent event) {
    final Object property = event.getProperty();
    if (property.equals(MapStyle.MAP_STYLES)) {
        updateMapStyles(event.getMap());
        final Controller controller = Controller.getCurrentController();
        changeToolbar(controller.getSelection().getSelected());
        return;
    }
}
Also used : LogicalStyleController(org.freeplane.features.styles.LogicalStyleController) Controller(org.freeplane.features.mode.Controller) ModeController(org.freeplane.features.mode.ModeController) MNodeStyleController(org.freeplane.features.nodestyle.mindmapmode.MNodeStyleController) NodeStyleController(org.freeplane.features.nodestyle.NodeStyleController)

Example 57 with Controller

use of org.freeplane.features.mode.Controller in project freeplane by freeplane.

the class ManageNodeConditionalStylesAction method actionPerformed.

public void actionPerformed(ActionEvent e) {
    final Controller controller = Controller.getCurrentController();
    final MapModel map = controller.getMap();
    final ConditionalStyleModel conditionalStyleModel = getConditionalStyleModel();
    Component pane = createConditionalStylePane(map, conditionalStyleModel);
    final ModeController modeController = Controller.getCurrentModeController();
    modeController.startTransaction();
    try {
        final int confirmed = JOptionPane.showConfirmDialog(controller.getMapViewManager().getMapViewComponent(), pane, TextUtils.getText(TextUtils.removeMnemonic("ManageNodeConditionalStylesAction.text")), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
        if (JOptionPane.OK_OPTION == confirmed) {
            modeController.commit();
            modeController.getMapController().nodeChanged(controller.getSelection().getSelected(), NodeModel.UNKNOWN_PROPERTY, null, null);
        } else {
            modeController.rollback();
        }
    } catch (RuntimeException ex) {
        ex.printStackTrace();
        modeController.rollback();
    }
}
Also used : ConditionalStyleModel(org.freeplane.features.styles.ConditionalStyleModel) MapModel(org.freeplane.features.map.MapModel) ModeController(org.freeplane.features.mode.ModeController) Controller(org.freeplane.features.mode.Controller) ModeController(org.freeplane.features.mode.ModeController) Component(java.awt.Component)

Example 58 with Controller

use of org.freeplane.features.mode.Controller in project freeplane by freeplane.

the class EditDetailsAction method actionPerformed.

/*
	 * (non-Javadoc)
	 * @see
	 * freeplane.controller.actions.ActorXml#act(freeplane.controller.actions.
	 * generated.instance.XmlAction)
	 */
public void actionPerformed(final ActionEvent arg0) {
    final Controller controller = Controller.getCurrentController();
    final NodeModel nodeModel = controller.getSelection().getSelected();
    final IMapViewManager viewController = controller.getMapViewManager();
    final Component node = viewController.getComponent(nodeModel);
    node.requestFocus();
    final MTextController textController = (MTextController) MTextController.getController();
    textController.editDetails(nodeModel, null, useDialog);
}
Also used : IMapViewManager(org.freeplane.features.ui.IMapViewManager) NodeModel(org.freeplane.features.map.NodeModel) Controller(org.freeplane.features.mode.Controller) Component(java.awt.Component)

Example 59 with Controller

use of org.freeplane.features.mode.Controller in project freeplane by freeplane.

the class ManageMapConditionalStylesAction method getConditionalStyleModel.

@Override
public ConditionalStyleModel getConditionalStyleModel() {
    final Controller controller = Controller.getCurrentController();
    final MapModel map = controller.getMap();
    final MapStyleModel styleModel = MapStyleModel.getExtension(map);
    final ConditionalStyleModel conditionalStyleModel = styleModel.getConditionalStyleModel();
    return conditionalStyleModel;
}
Also used : MapStyleModel(org.freeplane.features.styles.MapStyleModel) ConditionalStyleModel(org.freeplane.features.styles.ConditionalStyleModel) MapModel(org.freeplane.features.map.MapModel) LogicalStyleController(org.freeplane.features.styles.LogicalStyleController) Controller(org.freeplane.features.mode.Controller)

Example 60 with Controller

use of org.freeplane.features.mode.Controller in project freeplane by freeplane.

the class FreeplaneHeadlessStarter method createFrame.

public void createFrame(final String[] args) {
    Controller controller = Controller.getCurrentController();
    ModeController modeController = controller.getModeController(MModeController.MODENAME);
    controller.selectModeForBuild(modeController);
}
Also used : ModeController(org.freeplane.features.mode.ModeController) MModeController(org.freeplane.features.mode.mindmapmode.MModeController) FilterController(org.freeplane.features.filter.FilterController) HelpController(org.freeplane.features.help.HelpController) MapController(org.freeplane.features.map.MapController) LogicalStyleFilterController(org.freeplane.features.styles.LogicalStyleFilterController) IconController(org.freeplane.features.icon.IconController) Controller(org.freeplane.features.mode.Controller) TextController(org.freeplane.features.text.TextController) ModeController(org.freeplane.features.mode.ModeController) FormatController(org.freeplane.features.format.FormatController) ApplicationResourceController(org.freeplane.main.application.ApplicationResourceController) ModelessAttributeController(org.freeplane.features.attribute.ModelessAttributeController) ResourceController(org.freeplane.core.resources.ResourceController) MModeController(org.freeplane.features.mode.mindmapmode.MModeController) ScannerController(org.freeplane.features.format.ScannerController) LinkController(org.freeplane.features.link.LinkController) TimeController(org.freeplane.features.time.TimeController)

Aggregations

Controller (org.freeplane.features.mode.Controller)152 ModeController (org.freeplane.features.mode.ModeController)92 ResourceController (org.freeplane.core.resources.ResourceController)69 NodeModel (org.freeplane.features.map.NodeModel)46 MapController (org.freeplane.features.map.MapController)41 MapModel (org.freeplane.features.map.MapModel)34 LinkController (org.freeplane.features.link.LinkController)32 MModeController (org.freeplane.features.mode.mindmapmode.MModeController)32 TextController (org.freeplane.features.text.TextController)27 MMapController (org.freeplane.features.map.mindmapmode.MMapController)24 ViewController (org.freeplane.features.ui.ViewController)23 IconController (org.freeplane.features.icon.IconController)22 Component (java.awt.Component)19 FilterController (org.freeplane.features.filter.FilterController)17 NodeStyleController (org.freeplane.features.nodestyle.NodeStyleController)17 FormatController (org.freeplane.features.format.FormatController)16 ScannerController (org.freeplane.features.format.ScannerController)16 LogicalStyleController (org.freeplane.features.styles.LogicalStyleController)15 File (java.io.File)14 MTextController (org.freeplane.features.text.mindmapmode.MTextController)14