Changeset 22647 in osm for applications/editors/josm/plugins/toms
- Timestamp:
- 2010-08-15T19:25:53+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src
- Files:
-
- 230 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
r22626 r22647 168 168 169 169 public SmpDialogAction() { 170 super(tr("Edit SeaMap Symbols"), "Smp", tr("Seamark Editor"), Shortcut170 super(tr("Edit OpenSeaMap"), "Smp", tr("Seamark Editor"), Shortcut 171 171 .registerShortcut("tools:Semarks", 172 172 tr("Tool: {0}", tr("Seamark Editor")), KeyEvent.VK_S, -
applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java
r22626 r22647 79 79 public final static int SAFE_SPAR = 2; 80 80 public final static int SAFE_SPHERE = 3; 81 public final static int SAFE_FLOAT = 4; 81 public final static int SAFE_BEACON = 4; 82 public final static int SAFE_FLOAT = 5; 82 83 public final static int ISOL_PILLAR = 1; 83 84 public final static int ISOL_SPAR = 2; … … 89 90 public final static int SPEC_SPHERE = 3; 90 91 public final static int SPEC_BARREL = 4; 92 public final static int SPEC_BEACON = 5; 91 93 public final static int LIGHT_HOUSE = 1; 92 94 public final static int LIGHT_MAJOR = 2; -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
r22626 r22647 73 73 dlg.cM01TopMark.setSelected(false); 74 74 75 76 75 switch (getStyleIndex()) { 77 76 case SeaMark.LIGHT_HOUSE: 77 dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource( 78 "/images/Light_House.png"))); 79 break; 80 78 81 case SeaMark.LIGHT_MAJOR: 79 82 dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource( -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r22626 r22647 24 24 dlg.cbM01StyleOfMark.addItem("Spar Buoy"); 25 25 dlg.cbM01StyleOfMark.addItem("Sphere Buoy"); 26 dlg.cbM01StyleOfMark.addItem("Beacon"); 26 27 dlg.cbM01StyleOfMark.addItem("Float"); 27 28 … … 66 67 image += "_Sphere"; 67 68 break; 69 case SAFE_BEACON: 70 image += "_Beacon"; 71 break; 68 72 case SAFE_FLOAT: 69 73 image += "_Float"; … … 119 123 "seamark:buoy_safe_water:shape", "sphere")); 120 124 break; 125 case SAFE_BEACON: 126 super.saveSign("beacon_safe_water"); 127 break; 121 128 case SAFE_FLOAT: 122 129 super.saveSign("light_float"); … … 124 131 default: 125 132 } 126 if (getStyleIndex() == SAFE_FLOAT) { 133 134 switch (getStyleIndex()) { 135 case SAFE_PILLAR: 136 case SAFE_SPAR: 137 case SAFE_SPHERE: 138 Main.main.undoRedo.add(new ChangePropertyCommand(node, 139 "seamark:buoy_safe_water:colour_pattern", "vertical stripes")); 140 Main.main.undoRedo.add(new ChangePropertyCommand(node, 141 "seamark:buoy_safe_water:colour", "red;white")); 142 break; 143 case SAFE_BEACON: 144 Main.main.undoRedo.add(new ChangePropertyCommand(node, 145 "seamark:beacon_safe_water:colour_pattern", "vertical stripes")); 146 Main.main.undoRedo.add(new ChangePropertyCommand(node, 147 "seamark:beacon_safe_water:colour", "red;white")); 148 break; 149 case SAFE_FLOAT: 127 150 Main.main.undoRedo.add(new ChangePropertyCommand(node, 128 151 "seamark:light_float:colour_pattern", "vertical stripes")); 129 152 Main.main.undoRedo.add(new ChangePropertyCommand(node, 130 153 "seamark:light_float:colour", "red;white")); 131 } else { 132 Main.main.undoRedo.add(new ChangePropertyCommand(node, 133 "seamark:buoy_safe_water:colour_pattern", "vertical stripes")); 134 Main.main.undoRedo.add(new ChangePropertyCommand(node, 135 "seamark:buoy_safe_water:colour", "red;white")); 136 } 154 break; 155 default: 156 } 157 137 158 saveTopMarkData("spherical", "red"); 138 159 … … 229 250 && (keys.get("seamark:type").equals("light_float"))) { 230 251 setStyleIndex(SAFE_FLOAT); 252 } else if ((keys.containsKey("seamark:type") == true) 253 && (keys.get("seamark:type").equals("beacon_safe_water"))) { 254 setStyleIndex(SAFE_BEACON); 231 255 } 232 256 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r22626 r22647 24 24 dlg.cbM01StyleOfMark.addItem("Spar Buoy"); 25 25 dlg.cbM01StyleOfMark.addItem("Sphere Buoy"); 26 dlg.cbM01StyleOfMark.addItem("Barrel"); 27 dlg.cbM01StyleOfMark.addItem("Beacon"); 26 28 27 29 dlg.cbM01Kennung.removeAllItems(); … … 61 63 image += "_Sphere"; 62 64 break; 65 case SPEC_BARREL: 66 image += "_Barrel"; 67 break; 68 case SPEC_BEACON: 69 image += "_Beacon"; 70 break; 63 71 default: 64 72 } … … 95 103 } 96 104 97 super.saveSign("buoy_special_purpose");98 99 105 switch (getStyleIndex()) { 100 106 case SPEC_PILLAR: 107 super.saveSign("buoy_special_purpose"); 101 108 Main.main.undoRedo.add(new ChangePropertyCommand(node, 102 109 "seamark:buoy_special_purpose:shape", "pillar")); 110 Main.main.undoRedo.add(new ChangePropertyCommand(node, 111 "seamark:buoy_special_purpose:colour", "yellow")); 103 112 break; 104 113 case SPEC_SPAR: 114 super.saveSign("buoy_special_purpose"); 105 115 Main.main.undoRedo.add(new ChangePropertyCommand(node, 106 116 "seamark:buoy_special_purpose:shape", "spar")); 117 Main.main.undoRedo.add(new ChangePropertyCommand(node, 118 "seamark:buoy_special_purpose:colour", "yellow")); 107 119 break; 108 120 case SPEC_SPHERE: 121 super.saveSign("buoy_special_purpose"); 109 122 Main.main.undoRedo.add(new ChangePropertyCommand(node, 110 123 "seamark:buoy_special_purpose:shape", "sphere")); 124 Main.main.undoRedo.add(new ChangePropertyCommand(node, 125 "seamark:buoy_special_purpose:colour", "yellow")); 111 126 break; 112 127 case SPEC_BARREL: 128 super.saveSign("buoy_special_purpose"); 113 129 Main.main.undoRedo.add(new ChangePropertyCommand(node, 114 130 "seamark:buoy_special_purpose:shape", "barrel")); 131 Main.main.undoRedo.add(new ChangePropertyCommand(node, 132 "seamark:buoy_special_purpose:colour", "yellow")); 133 break; 134 case SPEC_BEACON: 135 super.saveSign("beacon_special_purpose"); 136 Main.main.undoRedo.add(new ChangePropertyCommand(node, 137 "seamark:beacon_special_purpose:colour", "yellow")); 115 138 break; 116 139 default: 117 140 } 118 Main.main.undoRedo.add(new ChangePropertyCommand(node,119 "seamark:buoy_special_purpose:colour", "yellow"));120 141 121 142 saveTopMarkData("x-shape", "yellow"); … … 216 237 } 217 238 218 return ret; 239 if (keys.containsKey("seamark:beacon_special_purpose")) 240 setStyleIndex(SPEC_BEACON); 241 return ret; 219 242 } 220 243
Note:
See TracChangeset
for help on using the changeset viewer.