Search in sources :

Example 16 with NodeView

use of org.freeplane.view.swing.map.NodeView in project freeplane by freeplane.

the class NodeSelector method selectSingleNode.

public void selectSingleNode(MouseEvent e) {
    final NodeView nodeV = getRelatedNodeView(e);
    final Controller controller = Controller.getCurrentController();
    if (!((MapView) controller.getMapViewManager().getMapViewComponent()).isSelected(nodeV)) {
        controller.getSelection().selectAsTheOnlyOneSelected(nodeV.getModel());
    }
}
Also used : NodeView(org.freeplane.view.swing.map.NodeView) Controller(org.freeplane.features.mode.Controller) ResourceController(org.freeplane.core.resources.ResourceController)

Example 17 with NodeView

use of org.freeplane.view.swing.map.NodeView in project freeplane by freeplane.

the class Node method toggleSelected.

public void toggleSelected() {
    final NodeView node = getNodeView();
    node.getModel().setFolded(!node.getModel().isFolded());
}
Also used : NodeView(org.freeplane.view.swing.map.NodeView)

Example 18 with NodeView

use of org.freeplane.view.swing.map.NodeView in project freeplane by freeplane.

the class LatexExtension method setEquation.

public void setEquation(final String equation) {
    this.equation = equation;
    for (final NodeView nodeView : viewers) {
        final LatexViewer comp = (LatexViewer) nodeView.getContent(LatexNodeHook.VIEWER_POSITION);
        comp.setModel(this);
    }
}
Also used : NodeView(org.freeplane.view.swing.map.NodeView)

Example 19 with NodeView

use of org.freeplane.view.swing.map.NodeView in project freeplane by freeplane.

the class LatexNodeHook method onViewRemoved.

public void onViewRemoved(final Container container) {
    final NodeView nodeView = (NodeView) container;
    final LatexExtension latexExtension = (LatexExtension) nodeView.getModel().getExtension(LatexExtension.class);
    if (latexExtension == null) {
        return;
    }
    deleteViewer(latexExtension, nodeView);
}
Also used : INodeView(org.freeplane.features.map.INodeView) NodeView(org.freeplane.view.swing.map.NodeView)

Example 20 with NodeView

use of org.freeplane.view.swing.map.NodeView in project freeplane by freeplane.

the class LatexNodeHook method add.

@Override
public void add(final NodeModel node, final IExtension extension) {
    final LatexExtension latexExtension = (LatexExtension) extension;
    for (NodeModel nodeClone : node.clones()) {
        for (final INodeView iNodeView : nodeClone.getViewers()) {
            final NodeView view = (NodeView) iNodeView;
            createViewer(latexExtension, view);
        }
    }
    super.add(node, extension);
}
Also used : NodeModel(org.freeplane.features.map.NodeModel) INodeView(org.freeplane.features.map.INodeView) NodeView(org.freeplane.view.swing.map.NodeView) INodeView(org.freeplane.features.map.INodeView)

Aggregations

NodeView (org.freeplane.view.swing.map.NodeView)43 NodeModel (org.freeplane.features.map.NodeModel)20 MapView (org.freeplane.view.swing.map.MapView)17 ModeController (org.freeplane.features.mode.ModeController)14 MainView (org.freeplane.view.swing.map.MainView)11 Point (java.awt.Point)8 INodeView (org.freeplane.features.map.INodeView)8 Controller (org.freeplane.features.mode.Controller)6 JPopupMenu (javax.swing.JPopupMenu)5 ResourceController (org.freeplane.core.resources.ResourceController)5 MapController (org.freeplane.features.map.MapController)5 MMapController (org.freeplane.features.map.mindmapmode.MMapController)5 Dimension (java.awt.Dimension)4 MTextController (org.freeplane.features.text.mindmapmode.MTextController)4 Color (java.awt.Color)3 Component (java.awt.Component)3 JComponent (javax.swing.JComponent)3 IMapSelection (org.freeplane.features.map.IMapSelection)3 LocationController (org.freeplane.features.nodelocation.LocationController)3 MLocationController (org.freeplane.features.nodelocation.mindmapmode.MLocationController)3