Changeset 3130

Show
Ignore:
Timestamp:
03/01/10 12:45:02 (5 months ago)
Author:
martijn
Message:

Add "None" to list of available shape types. Double-click dlg for shapes,
to make it easier to add textlabel

Location:
trunk/src
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/core/org/pathvisio/model/GpmlFormat200X.java

    r3115 r3130  
    353353         
    354354        String outline = getAttribute("Label", "Outline", e); 
    355                 if ("None".equals(outline)) o.setShapeType(null); 
     355                if ("None".equals(outline)) o.setShapeType(ShapeType.NONE); 
    356356                else if ("Rectangle".equals(outline)) o.setShapeType(ShapeType.RECTANGLE); 
    357357                else if ("RoundedRectangle".equals(outline)) o.setShapeType(ShapeType.ROUNDED_RECTANGLE); 
  • trunk/src/core/org/pathvisio/model/GpmlFormat2010a.java

    r3115 r3130  
    447447                String base = e.getName(); 
    448448                Element jdomGraphics = e.getChild("Graphics", e.getNamespace()); 
    449                 String shapeName = o.getShapeType() == null ? "None" : o.getShapeType().getName(); 
     449                String shapeName = o.getShapeType().getName(); 
    450450                setAttribute(base + ".Graphics", "ShapeType", jdomGraphics, shapeName); 
    451451        } 
  • trunk/src/core/org/pathvisio/model/PathwayElement.java

    r3101 r3130  
    626626                if (ot == ObjectType.LABEL) 
    627627                { 
    628                         shapeType = null; 
     628                        shapeType = ShapeType.NONE; 
    629629                } 
    630630                else 
  • trunk/src/core/org/pathvisio/model/ShapeType.java

    r3104 r3130  
    3131        private static List<ShapeType> values = new ArrayList<ShapeType>(); 
    3232 
     33        public static final ShapeType NONE = new ShapeType ("None", "None"); 
    3334        public static final ShapeType RECTANGLE = new ShapeType ("Rectangle", "Rectangle"); 
    3435        public static final ShapeType ROUNDED_RECTANGLE = new ShapeType ("RoundedRectangle", "RoundedRectangle"); 
  • trunk/src/core/org/pathvisio/view/GraphicsShape.java

    r3107 r3130  
    565565                Color fillcolor = gdata.getFillColor(); 
    566566 
    567                 if (gdata.getShapeType() == null) return; // nothing to draw. 
     567                if (gdata.getShapeType() == null || 
     568                        gdata.getShapeType() == ShapeType.NONE) return; // nothing to draw. 
    568569 
    569570                java.awt.Shape shape = getShape(true, false); 
  • trunk/src/gui/org/pathvisio/gui/swing/dialogs/PathwayElementDialog.java

    r2994 r3130  
    5454                switch(e.getObjectType()) { 
    5555                case LABEL: 
     56                case SHAPE: 
    5657                        return new LabelDialog(swingEngine, e, readonly, frame, locationComp); 
    5758                case DATANODE: