RSS

(root)/freeplane/freeplane_program/release_branches/1_0_x : 888 : freeplane/src/org/freeplane/view/swing/map/NodeView.java

« back to all changes in this revision

Viewing changes to freeplane/src/org/freeplane/view/swing/map/NodeView.java

dpolivaev at sourceforge
2009-11-15 10:06:02
Revision ID: dpolivaev@users.sourceforge.net-20091115100602-wxmefhl9h5gkvh0q
save zoom and layout type in the map file

Show diffs side-by-side

added added

removed removed

48
48
import org.freeplane.core.resources.ResourceController;
49
49
import org.freeplane.core.ui.IUserInputListenerFactory;
50
50
import org.freeplane.core.ui.components.UITools;
 
51
import org.freeplane.features.common.addins.mapstyle.MapViewLayout;
51
52
import org.freeplane.features.common.attribute.AttributeController;
52
53
import org.freeplane.features.common.attribute.NodeAttributeTableModel;
53
54
import org.freeplane.features.common.cloud.CloudController;
56
57
import org.freeplane.features.common.edge.EdgeStyle;
57
58
import org.freeplane.features.common.nodelocation.LocationModel;
58
59
import org.freeplane.features.common.nodestyle.NodeStyleController;
59
 
import org.freeplane.view.swing.map.MapView.Layout;
60
60
import org.freeplane.view.swing.map.MapView.PaintingMode;
61
61
import org.freeplane.view.swing.map.attribute.AttributeView;
62
62
import org.freeplane.view.swing.map.cloud.CloudView;
566
566
                return null;
567
567
        }
568
568
 
569
 
        public NodeView getPreferredVisibleChild(Layout layoutType, final boolean left) {
 
569
        public NodeView getPreferredVisibleChild(MapViewLayout layoutType, final boolean left) {
570
570
                if (getModel().isLeaf()) {
571
571
                        return null;
572
572
                }
573
 
                if(layoutType==Layout.OUTLINE){
 
573
                if(layoutType==MapViewLayout.OUTLINE){
574
574
                        preferredChild = null;
575
575
                }
576
576
                if (preferredChild != null && (left == preferredChild.isLeft()) && preferredChild.getParent() == this) {
611
611
                        }
612
612
                        final Point childPoint = new Point(0, childView.getMainView().getHeight() / 2);
613
613
                        UITools.convertPointToAncestor(childView.getMainView(), childPoint, baseComponent);
614
 
                        if (layoutType==Layout.OUTLINE){
 
614
                        if (layoutType==MapViewLayout.OUTLINE){
615
615
                                return childView;
616
616
                        }
617
617
                        final int gapToChild = Math.abs(childPoint.y - ownY);
806
806
 
807
807
        /** Is the node left of root? */
808
808
        public boolean isLeft() {
809
 
                if(getMap().getLayoutType() == Layout.OUTLINE){
 
809
                if(getMap().getLayoutType() == MapViewLayout.OUTLINE){
810
810
                        return false;
811
811
                }
812
812
                return getModel().isLeft();

Loggerhead 1.17 is a web-based interface for Bazaar branches