Changeset 24799 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2010-12-18T21:25:43+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/OSeaM.java
r24786 r24799 24 24 public boolean start() { 25 25 // TODO Auto-generated method stub 26 System.out.println("start");27 26 return true; 28 27 } … … 31 30 public boolean stop() { 32 31 DataSet.removeSelectionListener(oseam.SmpListener); 33 System.out.println("stop");34 32 return true; 35 33 } … … 37 35 @Override 38 36 public boolean hasFocus() { 39 System.out.println("hasFocus");40 37 DataSet.addSelectionListener(oseam.SmpListener); 41 38 return true; … … 45 42 public boolean lostFocus() { 46 43 DataSet.removeSelectionListener(oseam.SmpListener); 47 System.out.println("lostFocus");48 44 return true; 49 45 } … … 86 82 public JComponent getComponent() { 87 83 manager.showVisualMessage(msg); 88 oseam = new OSeaMAction( );84 oseam = new OSeaMAction(manager); 89 85 90 86 return oseam.getOSeaMPanel(); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r24786 r24799 27 27 import oseam.seamarks.MarkUkn; 28 28 import oseam.seamarks.MarkSaw; 29 import smed.plug.ifc.SmedPluginManager; 29 30 30 31 public class OSeaMAction { 31 32 33 private SmedPluginManager manager; 32 34 private OSeaMAction dia = null; 33 35 public PanelMain panelMain = null; 34 36 35 p rivateSeaMark mark = null;37 public SeaMark mark = null; 36 38 private Collection<? extends OsmPrimitive> Selection = null; 37 39 private OsmPrimitive SelNode = null; 38 40 39 41 public SelectionChangedListener SmpListener = new SelectionChangedListener() { 40 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 42 public void selectionChanged( 43 Collection<? extends OsmPrimitive> newSelection) { 41 44 Node node; 42 45 Selection = newSelection; 43 46 44 System.out.println("SmpListener");45 47 for (OsmPrimitive osm : Selection) { 46 48 if (osm instanceof Node) { … … 49 51 if (node.compareTo(SelNode) != 0) { 50 52 SelNode = node; 51 System.out.println(node);52 53 parseSeaMark(); 53 54 mark.paintSign(); … … 59 60 }; 60 61 61 public OSeaMAction() { 62 62 public OSeaMAction(SmedPluginManager mngr) { 63 64 manager = mngr; 63 65 dia = this; 64 66 String str = Main.pref.get("mappaint.style.sources"); … … 72 74 if (str.equals("#000000") || str.isEmpty()) 73 75 Main.pref.put("color.background", "#606060"); 74 System.out.println("newOSeaMAction");75 76 } 76 77 77 78 public JPanel getOSeaMPanel() { 78 79 if (panelMain == null) { 79 panelMain = new PanelMain( );80 panelMain = new PanelMain(this); 80 81 panelMain.setLayout(null); 81 82 panelMain.setSize(new Dimension(400, 360)); … … 94 95 ds = Main.main.getCurrentDataSet(); 95 96 97 manager.showVisualMessage(""); 96 98 if (ds == null) { 97 ma rk = new MarkUkn(this,tr("Active layer contains no OSM data"));98 mark .setNode(null);99 manager.showVisualMessage(tr("Active layer contains no OSM data")); 100 mark = new MarkUkn(this, null); 99 101 return; 100 102 } … … 104 106 105 107 if (nodes == 0) { 106 ma rk = new MarkUkn(this,tr("Please select a node"));107 mark .setNode(null);108 manager.showVisualMessage(tr("Please select a node")); 109 mark = new MarkUkn(this, null); 108 110 return; 109 111 } 110 112 111 113 if (nodes > 1) { 112 ma rk = new MarkUkn(this,tr("Please select only one node"));113 mark .setNode(null);114 manager.showVisualMessage(tr("Please select only one node")); 115 mark = new MarkUkn(this, null); 114 116 return; 115 117 } … … 125 127 if (keys.containsKey("seamark:type")) 126 128 type = keys.get("seamark:type"); 127 129 128 130 if (type.equals("buoy_lateral") || type.equals("beacon_lateral")) { 129 131 mark = new MarkLat(this, node); 130 132 return; 131 133 132 } else if (type.equals("buoy_cardinal") || type.equals("beacon_cardinal")) { 133 mark = new MarkCard(this, node); 134 return; 135 136 } else if (type.equals("buoy_safe_water") || type.equals("beacon_safe_water")) { 137 mark = new MarkSaw(this, node); 138 return; 139 140 } else if (type.equals("buoy_special_purpose") || type.equals("beacon_special_purpose")) { 141 mark = new MarkSpec(this, node); 142 return; 143 144 } else if (type.equals("buoy_isolated_danger") || type.equals("beacon_isolated_danger")) { 134 } else if (type.equals("buoy_cardinal") 135 || type.equals("beacon_cardinal")) { 136 mark = new MarkCard(this, node); 137 return; 138 139 } else if (type.equals("buoy_safe_water") 140 || type.equals("beacon_safe_water")) { 141 mark = new MarkSaw(this, node); 142 return; 143 144 } else if (type.equals("buoy_special_purpose") 145 || type.equals("beacon_special_purpose")) { 146 mark = new MarkSpec(this, node); 147 return; 148 149 } else if (type.equals("buoy_isolated_danger") 150 || type.equals("beacon_isolated_danger")) { 145 151 mark = new MarkIsol(this, node); 146 152 return; … … 155 161 str = keys.get("seamark:light_float:colour"); 156 162 if (str.equals("red") || str.equals("green") 157 || str.equals("red;green;red") || str.equals("green;red;green")) { 163 || str.equals("red;green;red") 164 || str.equals("green;red;green")) { 158 165 mark = new MarkLat(this, node); 159 166 return; 160 167 } else if (str.equals("black;yellow") 161 || str.equals("black;yellow;black") || str.equals("yellow;black") 168 || str.equals("black;yellow;black") 169 || str.equals("yellow;black") 162 170 || str.equals("yellow;black;yellow")) { 163 171 mark = new MarkCard(this, node); … … 188 196 } 189 197 190 if (keys.containsKey("buoy_lateral:category") || keys.containsKey("beacon_lateral:category")) { 191 mark = new MarkLat(this, node); 192 return; 193 } else if (keys.containsKey("buoy_cardinal:category") || keys.containsKey("beacon_cardinal:category")) { 194 mark = new MarkCard(this, node); 195 return; 196 } else if (keys.containsKey("buoy_isolated_danger:category") || keys.containsKey("beacon_isolated_danger:category")) { 197 mark = new MarkIsol(this, node); 198 return; 199 } else if (keys.containsKey("buoy_safe_water:category") || keys.containsKey("beacon_safe_water:category")) { 200 mark = new MarkSaw(this, node); 201 return; 202 } else if (keys.containsKey("buoy_special_purpose:category") || keys.containsKey("beacon_special_purpose:category")) { 203 mark = new MarkSpec(this, node); 204 return; 205 } 206 207 if (keys.containsKey("buoy_lateral:shape") || keys.containsKey("beacon_lateral:shape")) { 208 mark = new MarkLat(this, node); 209 return; 210 } else if (keys.containsKey("buoy_cardinal:shape") || keys.containsKey("beacon_cardinal:shape")) { 211 mark = new MarkCard(this, node); 212 return; 213 } else if (keys.containsKey("buoy_isolated_danger:shape") || keys.containsKey("beacon_isolated_danger:shape")) { 214 mark = new MarkIsol(this, node); 215 return; 216 } else if (keys.containsKey("buoy_safe_water:shape") || keys.containsKey("beacon_safe_water:shape")) { 217 mark = new MarkSaw(this, node); 218 return; 219 } else if (keys.containsKey("buoy_special_purpose:shape") || keys.containsKey("beacon_special_purpose:shape")) { 220 mark = new MarkSpec(this, node); 221 return; 222 } 223 224 if (keys.containsKey("buoy_lateral:colour") || keys.containsKey("beacon_lateral:colour")) { 225 mark = new MarkLat(this, node); 226 return; 227 } else if (keys.containsKey("buoy_cardinal:colour") || keys.containsKey("beacon_cardinal:colour")) { 228 mark = new MarkCard(this, node); 229 return; 230 } else if (keys.containsKey("buoy_isolated_danger:colour") || keys.containsKey("beacon_isolated_danger:colour")) { 231 mark = new MarkIsol(this, node); 232 return; 233 } else if (keys.containsKey("buoy_safe_water:colour") || keys.containsKey("beacon_safe_water:colour")) { 234 mark = new MarkSaw(this, node); 235 return; 236 } else if (keys.containsKey("buoy_special_purpose:colour") || keys.containsKey("beacon_special_purpose:colour")) { 237 mark = new MarkSpec(this, node); 238 return; 239 } 240 241 mark = new MarkUkn(this, Messages.getString("SmpDialogAction.91")); 242 mark.setNode(node); 243 mark.paintSign(); 198 if (keys.containsKey("buoy_lateral:category") 199 || keys.containsKey("beacon_lateral:category")) { 200 mark = new MarkLat(this, node); 201 return; 202 } else if (keys.containsKey("buoy_cardinal:category") 203 || keys.containsKey("beacon_cardinal:category")) { 204 mark = new MarkCard(this, node); 205 return; 206 } else if (keys.containsKey("buoy_isolated_danger:category") 207 || keys.containsKey("beacon_isolated_danger:category")) { 208 mark = new MarkIsol(this, node); 209 return; 210 } else if (keys.containsKey("buoy_safe_water:category") 211 || keys.containsKey("beacon_safe_water:category")) { 212 mark = new MarkSaw(this, node); 213 return; 214 } else if (keys.containsKey("buoy_special_purpose:category") 215 || keys.containsKey("beacon_special_purpose:category")) { 216 mark = new MarkSpec(this, node); 217 return; 218 } 219 220 if (keys.containsKey("buoy_lateral:shape") 221 || keys.containsKey("beacon_lateral:shape")) { 222 mark = new MarkLat(this, node); 223 return; 224 } else if (keys.containsKey("buoy_cardinal:shape") 225 || keys.containsKey("beacon_cardinal:shape")) { 226 mark = new MarkCard(this, node); 227 return; 228 } else if (keys.containsKey("buoy_isolated_danger:shape") 229 || keys.containsKey("beacon_isolated_danger:shape")) { 230 mark = new MarkIsol(this, node); 231 return; 232 } else if (keys.containsKey("buoy_safe_water:shape") 233 || keys.containsKey("beacon_safe_water:shape")) { 234 mark = new MarkSaw(this, node); 235 return; 236 } else if (keys.containsKey("buoy_special_purpose:shape") 237 || keys.containsKey("beacon_special_purpose:shape")) { 238 mark = new MarkSpec(this, node); 239 return; 240 } 241 242 if (keys.containsKey("buoy_lateral:colour") 243 || keys.containsKey("beacon_lateral:colour")) { 244 mark = new MarkLat(this, node); 245 return; 246 } else if (keys.containsKey("buoy_cardinal:colour") 247 || keys.containsKey("beacon_cardinal:colour")) { 248 mark = new MarkCard(this, node); 249 return; 250 } else if (keys.containsKey("buoy_isolated_danger:colour") 251 || keys.containsKey("beacon_isolated_danger:colour")) { 252 mark = new MarkIsol(this, node); 253 return; 254 } else if (keys.containsKey("buoy_safe_water:colour") 255 || keys.containsKey("beacon_safe_water:colour")) { 256 mark = new MarkSaw(this, node); 257 return; 258 } else if (keys.containsKey("buoy_special_purpose:colour") 259 || keys.containsKey("beacon_special_purpose:colour")) { 260 mark = new MarkSpec(this, node); 261 return; 262 } 263 264 manager.showVisualMessage(tr("No seamark recognised at this node")); 265 mark = new MarkUkn(this, node); 244 266 return; 245 267 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java
r24786 r24799 18 18 19 19 import oseam.Messages; 20 import oseam.dialogs.OSeaMAction; 21 import oseam.panels.PanelMain; 22 import oseam.seamarks.SeaMark.Cat; 23 import oseam.seamarks.SeaMark.Col; 24 import oseam.seamarks.SeaMark.Styl; 20 25 21 26 import java.awt.Cursor; … … 24 29 public class PanelHaz extends JPanel { 25 30 31 private OSeaMAction dlg; 26 32 private ButtonGroup catButtons = null; 27 33 public JRadioButton northButton = null; … … 38 44 public JRadioButton towerButton = null; 39 45 40 public PanelHaz() { 41 super(); 42 initialize(); 43 } 44 45 private void initialize() { 46 public PanelHaz(OSeaMAction dia) { 47 dlg = dia; 46 48 this.setLayout(null); 47 49 this.add(getNothButton(), null); … … 58 60 ActionListener alCat = new ActionListener() { 59 61 public void actionPerformed(java.awt.event.ActionEvent e) { 60 northButton.setBorderPainted(northButton.isSelected()); 61 southButton.setBorderPainted(southButton.isSelected()); 62 eastButton.setBorderPainted(eastButton.isSelected()); 63 westButton.setBorderPainted(westButton.isSelected()); 62 if (northButton.isSelected()) { 63 northButton.setBorderPainted(true); 64 dlg.mark.setCategory(Cat.CARD_NORTH); 65 dlg.mark.setColour(Col.BLACK_YELLOW); 66 } else { 67 northButton.setBorderPainted(false); 68 } 69 if (southButton.isSelected()) { 70 southButton.setBorderPainted(true); 71 dlg.mark.setCategory(Cat.CARD_SOUTH); 72 dlg.mark.setColour(Col.YELLOW_BLACK); 73 } else { 74 southButton.setBorderPainted(false); 75 } 76 if (eastButton.isSelected()) { 77 eastButton.setBorderPainted(true); 78 dlg.mark.setCategory(Cat.CARD_EAST); 79 dlg.mark.setColour(Col.BLACK_YELLOW_BLACK); 80 } else { 81 eastButton.setBorderPainted(false); 82 } 83 if (westButton.isSelected()) { 84 westButton.setBorderPainted(true); 85 dlg.mark.setCategory(Cat.CARD_WEST); 86 dlg.mark.setColour(Col.YELLOW_BLACK_YELLOW); 87 } else { 88 westButton.setBorderPainted(false); 89 } 64 90 isolButton.setBorderPainted(isolButton.isSelected()); 65 91 } … … 84 110 ActionListener alShape = new ActionListener() { 85 111 public void actionPerformed(java.awt.event.ActionEvent e) { 86 pillarButton.setBorderPainted(pillarButton.isSelected()); 87 sparButton.setBorderPainted(sparButton.isSelected()); 88 floatButton.setBorderPainted(floatButton.isSelected()); 89 beaconButton.setBorderPainted(beaconButton.isSelected()); 90 towerButton.setBorderPainted(towerButton.isSelected()); 112 if (pillarButton.isSelected()) { 113 pillarButton.setBorderPainted(true); 114 dlg.mark.setShape(Styl.PILLAR); 115 } else { 116 pillarButton.setBorderPainted(false); 117 } 118 if (sparButton.isSelected()) { 119 sparButton.setBorderPainted(true); 120 dlg.mark.setShape(Styl.SPAR); 121 } else { 122 sparButton.setBorderPainted(false); 123 } 124 if (floatButton.isSelected()) { 125 floatButton.setBorderPainted(true); 126 dlg.mark.setShape(Styl.FLOAT); 127 } else { 128 floatButton.setBorderPainted(false); 129 } 130 if (beaconButton.isSelected()) { 131 beaconButton.setBorderPainted(true); 132 dlg.mark.setShape(Styl.BEACON); 133 } else { 134 beaconButton.setBorderPainted(false); 135 } 136 if (towerButton.isSelected()) { 137 towerButton.setBorderPainted(true); 138 dlg.mark.setShape(Styl.TOWER); 139 } else { 140 towerButton.setBorderPainted(false); 141 } 91 142 } 92 143 }; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r24786 r24799 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import oseam.panels.*;6 7 5 import java.awt.Color; 8 import java.awt.Dimension;9 import java.awt.Font;10 6 import java.awt.Rectangle; 11 import java.awt.event.ActionEvent;12 7 import java.awt.event.ActionListener; 13 import java.awt.event.ComponentListener;14 import java.awt.event.FocusAdapter;15 import java.awt.event.FocusEvent;16 import java.awt.event.ItemEvent;17 import java.awt.event.ItemListener;18 import java.beans.PropertyChangeListener;19 import java.util.Collection;20 import java.util.Iterator;21 import java.util.Map;22 8 23 9 import javax.swing.BorderFactory; … … 25 11 import javax.swing.ImageIcon; 26 12 import javax.swing.JButton; 27 import javax.swing.JCheckBox;28 import javax.swing.JComboBox;29 13 import javax.swing.JLabel; 30 import javax.swing.JMenuItem;31 14 import javax.swing.JPanel; 32 15 import javax.swing.JRadioButton; 33 16 import javax.swing.JTextField; 34 17 35 import org.openstreetmap.josm.Main;36 import org.openstreetmap.josm.command.ChangePropertyCommand;37 import org.openstreetmap.josm.command.Command;38 import org.openstreetmap.josm.data.SelectionChangedListener;39 import org.openstreetmap.josm.data.osm.DataSet;40 import org.openstreetmap.josm.data.osm.Node;41 import org.openstreetmap.josm.data.osm.OsmPrimitive;42 import org.openstreetmap.josm.gui.MapView.EditLayerChangeListener;43 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;44 45 18 import oseam.Messages; 46 import oseam. OSeaM;19 import oseam.dialogs.OSeaMAction; 47 20 48 21 public class PanelMain extends JPanel { 49 22 50 private JLabel shapeIcon = null; 23 private OSeaMAction dlg; 24 public JLabel shapeIcon = null; 51 25 private JLabel lightIcon = null; 52 26 private JLabel topIcon = null; … … 57 31 private JTextField nameBox = null; 58 32 private JButton saveButton = null; 59 p rivateButtonGroup typeButtons = null;33 public ButtonGroup typeButtons = null; 60 34 public JRadioButton chanButton = null; 61 35 public JRadioButton hazButton = null; 62 36 public JRadioButton specButton = null; 63 37 public JRadioButton lightsButton = null; 38 private ActionListener alType; 64 39 private ButtonGroup miscButtons = null; 65 40 private JRadioButton topButton = null; … … 67 42 private JRadioButton radarButton = null; 68 43 private JRadioButton litButton = null; 44 private ActionListener alMisc; 69 45 public PanelChan panelChan = null; 70 46 public PanelHaz panelHaz = null; … … 76 52 private PanelLit panelLit = null; 77 53 78 public PanelMain() { 79 54 public PanelMain(OSeaMAction dia) { 55 56 dlg = dia; 80 57 panelChan = new PanelChan(); 81 58 panelChan.setBounds(new Rectangle(65, 0, 335, 160)); 82 59 panelChan.setVisible(false); 83 panelHaz = new PanelHaz( );60 panelHaz = new PanelHaz(dia); 84 61 panelHaz.setBounds(new Rectangle(65, 0, 335, 160)); 85 62 panelHaz.setVisible(false); … … 103 80 panelLit.setVisible(false); 104 81 105 shapeIcon = new JLabel(new ImageIcon(getClass().getResource( 106 "/images/Cardinal_Pillar_South.png"))); 82 shapeIcon = new JLabel(); 107 83 shapeIcon.setBounds(new Rectangle(265, 170, 130, 185)); 108 84 this.add(shapeIcon, null); 109 lightIcon = new JLabel(new ImageIcon(getClass().getResource( 110 "/images/Light_White_120.png"))); 85 lightIcon = new JLabel(); 111 86 lightIcon.setBounds(new Rectangle(265, 170, 125, 185)); 112 87 this.add(lightIcon, null); … … 114 89 topIcon.setBounds(new Rectangle(265, 170, 125, 185)); 115 90 this.add(topIcon, null); 116 reflIcon = new JLabel(new ImageIcon(getClass().getResource( 117 "/images/Radar_Reflector_355.png"))); 91 reflIcon = new JLabel(); 118 92 reflIcon.setBounds(new Rectangle(265, 170, 125, 185)); 119 93 this.add(reflIcon, null); 120 radarIcon = new JLabel(new ImageIcon(getClass().getResource( 121 "/images/Radar_Station.png"))); 94 radarIcon = new JLabel(); 122 95 radarIcon.setBounds(new Rectangle(265, 170, 130, 185)); 123 96 this.add(radarIcon, null); 124 fogIcon = new JLabel(new ImageIcon(getClass().getResource( 125 "/images/Fog_Signal.png"))); 97 fogIcon = new JLabel(); 126 98 fogIcon.setBounds(new Rectangle(265, 170, 125, 185)); 127 99 this.add(fogIcon, null); … … 144 116 typeButtons.add(specButton); 145 117 typeButtons.add(lightsButton); 146 ActionListeneralType = new ActionListener() {118 alType = new ActionListener() { 147 119 public void actionPerformed(java.awt.event.ActionEvent e) { 120 if (dlg.mark == null) 121 typeButtons.clearSelection(); 148 122 if (chanButton.isSelected()) { 149 123 chanButton.setBorderPainted(true); … … 190 164 miscButtons.add(radarButton); 191 165 miscButtons.add(litButton); 192 ActionListeneralMisc = new ActionListener() {166 alMisc = new ActionListener() { 193 167 public void actionPerformed(java.awt.event.ActionEvent e) { 168 if (dlg.mark == null) 169 miscButtons.clearSelection(); 194 170 if (topButton.isSelected()) { 195 171 topButton.setBorderPainted(true); … … 240 216 } 241 217 218 public void clearSelections() { 219 typeButtons.clearSelection(); 220 alType.actionPerformed(null); 221 miscButtons.clearSelection(); 222 alMisc.actionPerformed(null); 223 } 224 242 225 private JRadioButton getChanButton() { 243 226 if (chanButton == null) { -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkCard.java
r24786 r24799 2 2 3 3 import java.util.Map; 4 import javax.swing.ImageIcon; 4 5 5 6 import org.openstreetmap.josm.data.osm.Node; … … 17 18 keys = node.getKeys(); 18 19 setNode(node); 19 20 20 21 if (!dlg.panelMain.hazButton.isSelected()) 21 22 dlg.panelMain.hazButton.doClick(); … … 52 53 if (col.equals("black;yellow")) { 53 54 dlg.panelMain.panelHaz.northButton.doClick(); 54 setCategory(Cat.CARD_NORTH);55 setColour(Col.BLACK_YELLOW);56 55 } else if (col.equals("black;yellow;black")) { 57 56 dlg.panelMain.panelHaz.eastButton.doClick(); 58 setCategory(Cat.CARD_EAST);59 setColour(Col.BLACK_YELLOW_BLACK);60 57 } else if (col.equals("yellow;black")) { 61 58 dlg.panelMain.panelHaz.southButton.doClick(); 62 setCategory(Cat.CARD_SOUTH);63 setColour(Col.YELLOW_BLACK);64 59 } else if (col.equals("yellow;black;yellow")) { 65 60 dlg.panelMain.panelHaz.westButton.doClick(); 66 setCategory(Cat.CARD_WEST);67 setColour(Col.YELLOW_BLACK_YELLOW);68 61 } 69 62 } else if (cat.equals("north")) { 70 63 dlg.panelMain.panelHaz.northButton.doClick(); 71 setCategory(Cat.CARD_NORTH);72 setColour(Col.BLACK_YELLOW);73 64 } else if (cat.equals("east")) { 74 65 dlg.panelMain.panelHaz.eastButton.doClick(); 75 setCategory(Cat.CARD_EAST);76 setColour(Col.BLACK_YELLOW_BLACK);77 66 } else if (cat.equals("south")) { 78 67 dlg.panelMain.panelHaz.southButton.doClick(); 79 setCategory(Cat.CARD_SOUTH);80 setColour(Col.YELLOW_BLACK);81 68 } else if (cat.equals("west")) { 82 69 dlg.panelMain.panelHaz.westButton.doClick(); 83 setCategory(Cat.CARD_WEST);84 setColour(Col.YELLOW_BLACK_YELLOW);85 70 } 86 71 … … 90 75 if (str.equals("pillar")) { 91 76 dlg.panelMain.panelHaz.pillarButton.doClick(); 92 setShape(Styl.PILLAR);93 77 } else if (str.equals("spar")) { 94 78 dlg.panelMain.panelHaz.sparButton.doClick(); 95 setShape(Styl.SPAR);96 79 } 97 80 } else if (keys.containsKey("seamark:beacon_cardinal:colour")) { 98 81 if (keys.containsKey("seamark:beacon_cardinal:shape")) { 99 82 str = keys.get("seamark:beacon_cardinal:shape"); 100 101 83 if (str.equals("tower")) { 102 setShape(Styl.TOWER);103 84 dlg.panelMain.panelHaz.towerButton.doClick(); 104 85 } else { 105 86 dlg.panelMain.panelHaz.beaconButton.doClick(); 106 setShape(Styl.BEACON);107 87 } 108 88 } else { 109 89 dlg.panelMain.panelHaz.beaconButton.doClick(); 110 setShape(Styl.BEACON);111 90 } 112 91 } else if (keys.containsKey("seamark:type") 113 92 && (keys.get("seamark:type").equals("light_float"))) { 114 93 dlg.panelMain.panelHaz.floatButton.doClick(); 115 setShape(Styl.FLOAT);116 94 } 117 95 118 //refreshLights();119 //parseLights(keys);120 //parseFogRadar(keys);121 122 //dlg.cbM01CatOfMark.setSelectedIndex(getMarkIndex());123 //dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());124 //dlg.tfM01Name.setText(getName());125 //dlg.cM01TopMark.setSelected(hasTopMark());96 // refreshLights(); 97 // parseLights(keys); 98 // parseFogRadar(keys); 99 100 // dlg.cbM01CatOfMark.setSelectedIndex(getMarkIndex()); 101 // dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex()); 102 // dlg.tfM01Name.setText(getName()); 103 // dlg.cM01TopMark.setSelected(hasTopMark()); 126 104 } 127 /* 128 public void refreshLights() { 129 dlg.cbM01Kennung.removeAllItems(); 130 dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 131 dlg.cbM01Kennung.setSelectedIndex(0); 132 133 switch (getMarkIndex()) { 134 case CARD_NORTH: 135 dlg.cbM01Kennung.addItem("Q"); //$NON-NLS-1$ 136 dlg.cbM01Kennung.addItem("VQ"); //$NON-NLS-1$ 137 break; 138 case CARD_EAST: 139 dlg.cbM01Kennung.addItem("Q(3)"); //$NON-NLS-1$ 140 dlg.cbM01Kennung.addItem("VQ(3)"); //$NON-NLS-1$ 141 break; 142 case CARD_SOUTH: 143 dlg.cbM01Kennung.addItem("Q(6)+LFl"); //$NON-NLS-1$ 144 dlg.cbM01Kennung.addItem("VQ(6)+LFl"); //$NON-NLS-1$ 145 break; 146 case CARD_WEST: 147 dlg.cbM01Kennung.addItem("Q(9)"); //$NON-NLS-1$ 148 dlg.cbM01Kennung.addItem("VQ(9)"); //$NON-NLS-1$ 149 break; 105 106 /* 107 * public void refreshLights() { dlg.cbM01Kennung.removeAllItems(); 108 * dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); 109 * //$NON-NLS-1$ dlg.cbM01Kennung.setSelectedIndex(0); 110 * 111 * switch (getMarkIndex()) { case CARD_NORTH: dlg.cbM01Kennung.addItem("Q"); 112 * //$NON-NLS-1$ dlg.cbM01Kennung.addItem("VQ"); //$NON-NLS-1$ break; case 113 * CARD_EAST: dlg.cbM01Kennung.addItem("Q(3)"); //$NON-NLS-1$ 114 * dlg.cbM01Kennung.addItem("VQ(3)"); //$NON-NLS-1$ break; case CARD_SOUTH: 115 * dlg.cbM01Kennung.addItem("Q(6)+LFl"); //$NON-NLS-1$ 116 * dlg.cbM01Kennung.addItem("VQ(6)+LFl"); //$NON-NLS-1$ break; case 117 * CARD_WEST: dlg.cbM01Kennung.addItem("Q(9)"); //$NON-NLS-1$ 118 * dlg.cbM01Kennung.addItem("VQ(9)"); //$NON-NLS-1$ break; } } 119 */ 120 public boolean isValid() { 121 return (getCategory() != Cat.UNKNOWN_CAT) 122 && (getShape() != Styl.UNKNOWN_SHAPE); 123 } 124 125 /* 126 * public void setLightColour() { super.setLightColour("W"); } 127 */ 128 public void paintSign() { 129 /* 130 * if (dlg.paintlock) return; super.paintSign(); 131 */ 132 if (isValid()) { 133 /* 134 * dlg.tfM01Name.setEnabled(true); dlg.tfM01Name.setText(getName()); 135 * dlg.cM01TopMark.setSelected(true); 136 * dlg.cM01TopMark.setVisible(true); 137 * dlg.cM01TopMark.setEnabled(false); 138 * dlg.cM01Radar.setVisible(true); dlg.cM01Racon.setVisible(true); 139 * dlg.cM01Fog.setVisible(true); dlg.cM01Fired.setEnabled(true); 140 * dlg.cM01Fired.setVisible(true); dlg.tfM01Group.setVisible(false); 141 * dlg.lM01Group.setVisible(false); if (!isSectored()) { 142 * dlg.cbM01Colour.setVisible(false); 143 * dlg.lM01Colour.setVisible(false); } 144 * dlg.rbM01Fired1.setVisible(false); 145 * dlg.rbM01FiredN.setVisible(false); 146 * dlg.lM01Height.setVisible(false); 147 * dlg.tfM01Height.setVisible(false); 148 * dlg.lM01Range.setVisible(false); 149 * dlg.tfM01Range.setVisible(false); 150 * 151 * if (isFired()) { switch (getStyleIndex()) { case CARD_BEACON: 152 * case CARD_TOWER: case CARD_FLOAT: 153 * dlg.lM01Height.setVisible(true); 154 * dlg.tfM01Height.setVisible(true); dlg.lM01Range.setVisible(true); 155 * dlg.tfM01Range.setVisible(true); break; default: } } 156 */ 157 String image = "/images/Cardinal"; 158 switch (getShape()) { 159 case PILLAR: 160 image += "_Pillar"; 161 break; 162 case SPAR: 163 image += "_Spar"; 164 break; 165 case BEACON: 166 image += "_Beacon"; 167 break; 168 case TOWER: 169 image += "_Tower"; 170 break; 171 case FLOAT: 172 image += "_Float"; 173 break; 174 default: 175 return; 176 } 177 178 switch (getCategory()) { 179 case CARD_NORTH: 180 image += "_North"; 181 break; 182 case CARD_EAST: 183 image += "_East"; 184 break; 185 case CARD_SOUTH: 186 image += "_South"; 187 break; 188 case CARD_WEST: 189 image += "_West"; 190 break; 191 default: 192 return; 193 } 194 195 if (!image.equals("/images/Cardinal")) { 196 image += ".png"; 197 dlg.panelMain.shapeIcon.setIcon(new ImageIcon(getClass() 198 .getResource(image))); 199 } else 200 dlg.panelMain.shapeIcon.setIcon(null); 150 201 } 151 202 } 152 203 153 public boolean isValid() {154 return (getMarkIndex() > 0) && (getStyleIndex() > 0);155 }156 */157 public void setLightColour() {158 super.setLightColour("W"); //$NON-NLS-1$159 }160 161 public void paintSign() {162 /* if (dlg.paintlock)163 return;164 super.paintSign();165 166 dlg.sM01StatusBar.setText(getErrMsg());167 168 if (isValid()) {169 dlg.tfM01Name.setEnabled(true);170 dlg.tfM01Name.setText(getName());171 dlg.cM01TopMark.setSelected(true);172 dlg.cM01TopMark.setVisible(true);173 dlg.cM01TopMark.setEnabled(false);174 dlg.cM01Radar.setVisible(true);175 dlg.cM01Racon.setVisible(true);176 dlg.cM01Fog.setVisible(true);177 dlg.cM01Fired.setEnabled(true);178 dlg.cM01Fired.setVisible(true);179 dlg.tfM01Group.setVisible(false);180 dlg.lM01Group.setVisible(false);181 if (!isSectored()) {182 dlg.cbM01Colour.setVisible(false);183 dlg.lM01Colour.setVisible(false);184 }185 dlg.rbM01Fired1.setVisible(false);186 dlg.rbM01FiredN.setVisible(false);187 dlg.lM01Height.setVisible(false);188 dlg.tfM01Height.setVisible(false);189 dlg.lM01Range.setVisible(false);190 dlg.tfM01Range.setVisible(false);191 192 if (isFired()) {193 switch (getStyleIndex()) {194 case CARD_BEACON:195 case CARD_TOWER:196 case CARD_FLOAT:197 dlg.lM01Height.setVisible(true);198 dlg.tfM01Height.setVisible(true);199 dlg.lM01Range.setVisible(true);200 dlg.tfM01Range.setVisible(true);201 break;202 default:203 }204 }205 206 String image = "/images/Cardinal"; //$NON-NLS-1$207 switch (getStyleIndex()) {208 case SeaMark.CARD_PILLAR:209 image += "_Pillar"; //$NON-NLS-1$210 break;211 case SeaMark.CARD_SPAR:212 image += "_Spar"; //$NON-NLS-1$213 break;214 case SeaMark.CARD_BEACON:215 image += "_Beacon"; //$NON-NLS-1$216 break;217 case SeaMark.CARD_TOWER:218 image += "_Tower"; //$NON-NLS-1$219 break;220 case SeaMark.CARD_FLOAT:221 image += "_Float"; //$NON-NLS-1$222 break;223 default:224 return;225 }226 227 switch (getMarkIndex()) {228 case CARD_NORTH:229 image += "_North"; //$NON-NLS-1$230 break;231 case CARD_EAST:232 image += "_East"; //$NON-NLS-1$233 break;234 case CARD_SOUTH:235 image += "_South"; //$NON-NLS-1$236 break;237 case CARD_WEST:238 image += "_West"; //$NON-NLS-1$239 break;240 default:241 return;242 }243 244 if (!image.equals("/images/Cardinal")) { //$NON-NLS-1$245 image += ".png"; //$NON-NLS-1$246 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));247 248 } else249 dlg.lM01Icon.setIcon(null);250 }251 */ }252 253 204 public void saveSign() { 254 /* Node node = getNode(); 255 if (node == null) { 256 return; 257 } 258 259 String shape = ""; //$NON-NLS-1$ 260 261 switch (getStyleIndex()) { 262 case CARD_PILLAR: 263 super.saveSign("buoy_cardinal"); //$NON-NLS-1$ 264 Main.main.undoRedo.add(new ChangePropertyCommand(node, 265 "seamark:buoy_cardinal:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 266 break; 267 case CARD_SPAR: 268 super.saveSign("buoy_cardinal"); //$NON-NLS-1$ 269 Main.main.undoRedo.add(new ChangePropertyCommand(node, 270 "seamark:buoy_cardinal:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 271 break; 272 case CARD_BEACON: 273 super.saveSign("beacon_cardinal"); //$NON-NLS-1$ 274 break; 275 case CARD_TOWER: 276 super.saveSign("beacon_cardinal"); //$NON-NLS-1$ 277 Main.main.undoRedo.add(new ChangePropertyCommand(node, 278 "seamark:beacon_cardinal:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$ 279 break; 280 case CARD_FLOAT: 281 super.saveSign("light_float"); //$NON-NLS-1$ 282 break; 283 default: 284 } 285 286 switch (getStyleIndex()) { 287 case CARD_PILLAR: 288 case CARD_SPAR: 289 switch (getMarkIndex()) { 290 case SeaMark.CARD_NORTH: 291 Main.main.undoRedo.add(new ChangePropertyCommand(node, 292 "seamark:buoy_cardinal:category", "north")); //$NON-NLS-1$ //$NON-NLS-2$ 293 Main.main.undoRedo.add(new ChangePropertyCommand(node, 294 "seamark:buoy_cardinal:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 295 shape = "2 cones up"; //$NON-NLS-1$ 296 break; 297 298 case SeaMark.CARD_EAST: 299 Main.main.undoRedo.add(new ChangePropertyCommand(node, 300 "seamark:buoy_cardinal:category", "east")); //$NON-NLS-1$ //$NON-NLS-2$ 301 Main.main.undoRedo.add(new ChangePropertyCommand(node, 302 "seamark:buoy_cardinal:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 303 shape = "2 cones base together"; //$NON-NLS-1$ 304 break; 305 306 case SeaMark.CARD_SOUTH: 307 Main.main.undoRedo.add(new ChangePropertyCommand(node, 308 "seamark:buoy_cardinal:category", "south")); //$NON-NLS-1$ //$NON-NLS-2$ 309 Main.main.undoRedo.add(new ChangePropertyCommand(node, 310 "seamark:buoy_cardinal:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 311 shape = "2 cones down"; //$NON-NLS-1$ 312 break; 313 314 case SeaMark.CARD_WEST: 315 Main.main.undoRedo.add(new ChangePropertyCommand(node, 316 "seamark:buoy_cardinal:category", "west")); //$NON-NLS-1$ //$NON-NLS-2$ 317 Main.main.undoRedo.add(new ChangePropertyCommand(node, 318 "seamark:buoy_cardinal:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 319 shape = "2 cones point together"; //$NON-NLS-1$ 320 break; 321 } 322 Main.main.undoRedo.add(new ChangePropertyCommand(node, 323 "seamark:buoy_cardinal:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 324 break; 325 case CARD_BEACON: 326 case CARD_TOWER: 327 switch (getMarkIndex()) { 328 case SeaMark.CARD_NORTH: 329 Main.main.undoRedo.add(new ChangePropertyCommand(node, 330 "seamark:beacon_cardinal:category", "north")); //$NON-NLS-1$ //$NON-NLS-2$ 331 Main.main.undoRedo.add(new ChangePropertyCommand(node, 332 "seamark:beacon_cardinal:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 333 shape = "2 cones up"; //$NON-NLS-1$ 334 break; 335 336 case SeaMark.CARD_EAST: 337 Main.main.undoRedo.add(new ChangePropertyCommand(node, 338 "seamark:beacon_cardinal:category", "east")); //$NON-NLS-1$ //$NON-NLS-2$ 339 Main.main.undoRedo.add(new ChangePropertyCommand(node, 340 "seamark:beacon_cardinal:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 341 shape = "2 cones base together"; //$NON-NLS-1$ 342 break; 343 344 case SeaMark.CARD_SOUTH: 345 Main.main.undoRedo.add(new ChangePropertyCommand(node, 346 "seamark:beacon_cardinal:category", "south")); //$NON-NLS-1$ //$NON-NLS-2$ 347 Main.main.undoRedo.add(new ChangePropertyCommand(node, 348 "seamark:beacon_cardinal:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 349 shape = "2 cones down"; //$NON-NLS-1$ 350 break; 351 352 case SeaMark.CARD_WEST: 353 Main.main.undoRedo.add(new ChangePropertyCommand(node, 354 "seamark:beacon_cardinal:category", "west")); //$NON-NLS-1$ //$NON-NLS-2$ 355 Main.main.undoRedo.add(new ChangePropertyCommand(node, 356 "seamark:beacon_cardinal:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 357 shape = "2 cones point together"; //$NON-NLS-1$ 358 break; 359 } 360 Main.main.undoRedo.add(new ChangePropertyCommand(node, 361 "seamark:beacon_cardinal:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 362 break; 363 case CARD_FLOAT: 364 switch (getMarkIndex()) { 365 case SeaMark.CARD_NORTH: 366 Main.main.undoRedo.add(new ChangePropertyCommand(node, 367 "seamark:light_float:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 368 shape = "2 cones up"; //$NON-NLS-1$ 369 break; 370 371 case SeaMark.CARD_EAST: 372 Main.main.undoRedo.add(new ChangePropertyCommand(node, 373 "seamark:light_float:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 374 shape = "2 cones base together"; //$NON-NLS-1$ 375 break; 376 377 case SeaMark.CARD_SOUTH: 378 Main.main.undoRedo.add(new ChangePropertyCommand(node, 379 "seamark:light_float:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 380 shape = "2 cones down"; //$NON-NLS-1$ 381 break; 382 383 case SeaMark.CARD_WEST: 384 Main.main.undoRedo.add(new ChangePropertyCommand(node, 385 "seamark:light_float:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 386 shape = "2 cones point together"; //$NON-NLS-1$ 387 break; 388 } 389 Main.main.undoRedo.add(new ChangePropertyCommand(node, 390 "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 391 break; 392 } 393 saveTopMarkData(shape, "black"); //$NON-NLS-1$ 394 saveLightData(); //$NON-NLS-1$ 395 saveRadarFogData(); 396 */ } 397 205 /* 206 * Node node = getNode(); if (node == null) { return; } 207 * 208 * String shape = ""; //$NON-NLS-1$ 209 * 210 * switch (getStyleIndex()) { case CARD_PILLAR: 211 * super.saveSign("buoy_cardinal"); //$NON-NLS-1$ 212 * Main.main.undoRedo.add(new ChangePropertyCommand(node, 213 * "seamark:buoy_cardinal:shape", "pillar")); //$NON-NLS-1$ 214 * //$NON-NLS-2$ break; case CARD_SPAR: super.saveSign("buoy_cardinal"); 215 * //$NON-NLS-1$ Main.main.undoRedo.add(new ChangePropertyCommand(node, 216 * "seamark:buoy_cardinal:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 217 * break; case CARD_BEACON: super.saveSign("beacon_cardinal"); 218 * //$NON-NLS-1$ break; case CARD_TOWER: 219 * super.saveSign("beacon_cardinal"); //$NON-NLS-1$ 220 * Main.main.undoRedo.add(new ChangePropertyCommand(node, 221 * "seamark:beacon_cardinal:shape", "tower")); //$NON-NLS-1$ 222 * //$NON-NLS-2$ break; case CARD_FLOAT: super.saveSign("light_float"); 223 * //$NON-NLS-1$ break; default: } 224 * 225 * switch (getStyleIndex()) { case CARD_PILLAR: case CARD_SPAR: switch 226 * (getMarkIndex()) { case SeaMark.CARD_NORTH: 227 * Main.main.undoRedo.add(new ChangePropertyCommand(node, 228 * "seamark:buoy_cardinal:category", "north")); //$NON-NLS-1$ 229 * //$NON-NLS-2$ Main.main.undoRedo.add(new ChangePropertyCommand(node, 230 * "seamark:buoy_cardinal:colour", "black;yellow")); //$NON-NLS-1$ 231 * //$NON-NLS-2$ shape = "2 cones up"; //$NON-NLS-1$ break; 232 * 233 * case SeaMark.CARD_EAST: Main.main.undoRedo.add(new 234 * ChangePropertyCommand(node, "seamark:buoy_cardinal:category", 235 * "east")); //$NON-NLS-1$ //$NON-NLS-2$ Main.main.undoRedo.add(new 236 * ChangePropertyCommand(node, "seamark:buoy_cardinal:colour", 237 * "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ shape = 238 * "2 cones base together"; //$NON-NLS-1$ break; 239 * 240 * case SeaMark.CARD_SOUTH: Main.main.undoRedo.add(new 241 * ChangePropertyCommand(node, "seamark:buoy_cardinal:category", 242 * "south")); //$NON-NLS-1$ //$NON-NLS-2$ Main.main.undoRedo.add(new 243 * ChangePropertyCommand(node, "seamark:buoy_cardinal:colour", 244 * "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ shape = "2 cones down"; 245 * //$NON-NLS-1$ break; 246 * 247 * case SeaMark.CARD_WEST: Main.main.undoRedo.add(new 248 * ChangePropertyCommand(node, "seamark:buoy_cardinal:category", 249 * "west")); //$NON-NLS-1$ //$NON-NLS-2$ Main.main.undoRedo.add(new 250 * ChangePropertyCommand(node, "seamark:buoy_cardinal:colour", 251 * "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ shape = 252 * "2 cones point together"; //$NON-NLS-1$ break; } 253 * Main.main.undoRedo.add(new ChangePropertyCommand(node, 254 * "seamark:buoy_cardinal:colour_pattern", "horizontal stripes")); 255 * //$NON-NLS-1$ //$NON-NLS-2$ break; case CARD_BEACON: case CARD_TOWER: 256 * switch (getMarkIndex()) { case SeaMark.CARD_NORTH: 257 * Main.main.undoRedo.add(new ChangePropertyCommand(node, 258 * "seamark:beacon_cardinal:category", "north")); //$NON-NLS-1$ 259 * //$NON-NLS-2$ Main.main.undoRedo.add(new ChangePropertyCommand(node, 260 * "seamark:beacon_cardinal:colour", "black;yellow")); //$NON-NLS-1$ 261 * //$NON-NLS-2$ shape = "2 cones up"; //$NON-NLS-1$ break; 262 * 263 * case SeaMark.CARD_EAST: Main.main.undoRedo.add(new 264 * ChangePropertyCommand(node, "seamark:beacon_cardinal:category", 265 * "east")); //$NON-NLS-1$ //$NON-NLS-2$ Main.main.undoRedo.add(new 266 * ChangePropertyCommand(node, "seamark:beacon_cardinal:colour", 267 * "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ shape = 268 * "2 cones base together"; //$NON-NLS-1$ break; 269 * 270 * case SeaMark.CARD_SOUTH: Main.main.undoRedo.add(new 271 * ChangePropertyCommand(node, "seamark:beacon_cardinal:category", 272 * "south")); //$NON-NLS-1$ //$NON-NLS-2$ Main.main.undoRedo.add(new 273 * ChangePropertyCommand(node, "seamark:beacon_cardinal:colour", 274 * "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ shape = "2 cones down"; 275 * //$NON-NLS-1$ break; 276 * 277 * case SeaMark.CARD_WEST: Main.main.undoRedo.add(new 278 * ChangePropertyCommand(node, "seamark:beacon_cardinal:category", 279 * "west")); //$NON-NLS-1$ //$NON-NLS-2$ Main.main.undoRedo.add(new 280 * ChangePropertyCommand(node, "seamark:beacon_cardinal:colour", 281 * "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ shape = 282 * "2 cones point together"; //$NON-NLS-1$ break; } 283 * Main.main.undoRedo.add(new ChangePropertyCommand(node, 284 * "seamark:beacon_cardinal:colour_pattern", "horizontal stripes")); 285 * //$NON-NLS-1$ //$NON-NLS-2$ break; case CARD_FLOAT: switch 286 * (getMarkIndex()) { case SeaMark.CARD_NORTH: 287 * Main.main.undoRedo.add(new ChangePropertyCommand(node, 288 * "seamark:light_float:colour", "black;yellow")); //$NON-NLS-1$ 289 * //$NON-NLS-2$ shape = "2 cones up"; //$NON-NLS-1$ break; 290 * 291 * case SeaMark.CARD_EAST: Main.main.undoRedo.add(new 292 * ChangePropertyCommand(node, "seamark:light_float:colour", 293 * "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ shape = 294 * "2 cones base together"; //$NON-NLS-1$ break; 295 * 296 * case SeaMark.CARD_SOUTH: Main.main.undoRedo.add(new 297 * ChangePropertyCommand(node, "seamark:light_float:colour", 298 * "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ shape = "2 cones down"; 299 * //$NON-NLS-1$ break; 300 * 301 * case SeaMark.CARD_WEST: Main.main.undoRedo.add(new 302 * ChangePropertyCommand(node, "seamark:light_float:colour", 303 * "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ shape = 304 * "2 cones point together"; //$NON-NLS-1$ break; } 305 * Main.main.undoRedo.add(new ChangePropertyCommand(node, 306 * "seamark:light_float:colour_pattern", "horizontal stripes")); 307 * //$NON-NLS-1$ //$NON-NLS-2$ break; } saveTopMarkData(shape, "black"); 308 * //$NON-NLS-1$ saveLightData(); //$NON-NLS-1$ saveRadarFogData(); 309 */} 310 398 311 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkUkn.java
r24786 r24799 1 1 package oseam.seamarks; 2 3 import java.util.Map; 4 5 import javax.swing.ButtonGroup; 6 7 import org.openstreetmap.josm.data.osm.Node; 2 8 3 9 import oseam.dialogs.OSeaMAction; 4 10 5 11 public class MarkUkn extends SeaMark { 6 public MarkUkn(OSeaMAction dia, String Msg) {12 public MarkUkn(OSeaMAction dia, Node node) { 7 13 super(dia); 8 // dlg.cbM01TypeOfMark.setSelectedIndex(0); 9 setErrMsg(Msg); 14 15 String str; 16 Map<String, String> keys; 17 keys = node.getKeys(); 18 setNode(node); 19 20 dlg.panelMain.clearSelections(); 10 21 } 11 22 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r24786 r24799 152 152 } 153 153 154 public void setValid(boolean valid) { 155 this.valid = valid; 156 154 public void setValid(boolean val) { 155 valid = val; 157 156 } 158 157
Note:
See TracChangeset
for help on using the changeset viewer.