Ignore:
Timestamp:
2010-12-30T19:51:16+01:00 (14 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed/plugs/oseam/src
Files:
7 added
27 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelTop.java

    r24917 r24919  
    4040        public JRadioButton triangleInvDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TriangleInvDayButton.png")));
    4141        public JRadioButton squareDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SquareDayButton.png")));
     42        public JRadioButton circleDayButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CircleDayButton.png")));
    4243        public JRadioButton mooringTopButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/MooringTopButton.png")));
    4344        private EnumMap<Top, JRadioButton> tops = new EnumMap<Top, JRadioButton>(Top.class);
     
    9293                this.add(getDayButton(triangleInvDayButton, 130, 65, 27, 27, "TriangleInvDayTip", Day.TRIANGLE_INV), null);
    9394                this.add(getDayButton(squareDayButton, 160, 65, 27, 27, "SquareDayTip", Day.SQUARE), null);
     95                this.add(getDayButton(circleDayButton, 160, 95, 27, 27, "CircleDayTip", Day.CIRCLE), null);
    9496                this.add(getMoorButton(mooringTopButton, 40, 95, 27, 27, "MooringTopTip"), null);
    9597        }
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java

    r24917 r24919  
    245245
    246246        public enum Day {
    247                 NONE, BOARD, DIAMOND, TRIANGLE, TRIANGLE_INV, SQUARE
     247                NONE, BOARD, DIAMOND, CIRCLE, TRIANGLE, TRIANGLE_INV, SQUARE
    248248        }
    249249
     
    252252                days.put(Day.BOARD, "board");
    253253                days.put(Day.DIAMOND, "diamond");
     254                days.put(Day.CIRCLE, "circle");
    254255                days.put(Day.TRIANGLE, "triangle, point up");
    255256                days.put(Day.TRIANGLE_INV, "triangle, point down");
     
    673674                String shpStr = shapes.get(shape);
    674675                if (shpStr == null)
    675                         dlg.panelMain.topIcon.setIcon(null);
     676                        dlg.panelMain.shapeIcon.setIcon(null);
    676677                else {
    677678                        imgStr += shpStr;
     
    684685                        }
    685686                        imgStr += ".png";
    686                         dlg.panelMain.topIcon.setIcon(new ImageIcon(getClass().getResource(imgStr)));
     687                        dlg.panelMain.shapeIcon.setIcon(new ImageIcon(getClass().getResource(imgStr)));
     688                }
     689
     690                imgStr = "/images/top_";
     691                shpStr = tops.get(topShape);
     692                if (shpStr == null)
     693                        dlg.panelMain.topIcon.setIcon(null);
     694                else {
     695                        switch (getShape()) {
     696                        case CAN:
     697                        case CONE:
     698                        case SPHERE:
     699                        case BARREL:
     700                                imgStr += "il_";
     701                                break;
     702                        case PILLAR:
     703                        case SPAR:
     704                                imgStr += "ih_";
     705                                break;
     706                        case FLOAT:
     707                        case SUPER:
     708                                imgStr += "vl_";
     709                                break;
     710                        case BEACON:
     711                        case TOWER:
     712                                imgStr += "vh_";
     713                                break;
     714                        default:
     715                                imgStr = null;
     716                                dlg.panelMain.topIcon.setIcon(null);
     717                                break;
     718                        }
     719                        if (imgStr != null) {
     720                                imgStr += shpStr;
     721                                String colStr = colours.get(topColour);
     722                                if (colStr != null)
     723                                        imgStr += ("_" + colStr);
     724                                imgStr += ".png";
     725System.out.println(imgStr);
     726//                              dlg.panelMain.topIcon.setIcon(new ImageIcon(getClass().getResource(imgStr)));
     727                        }
    687728                }
    688729
Note: See TracChangeset for help on using the changeset viewer.