Changeset 24786 in osm for applications/editors/josm/plugins
- Timestamp:
- 2010-12-17T16:38:01+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/OSeaM.java
r24778 r24786 25 25 // TODO Auto-generated method stub 26 26 System.out.println("start"); 27 return false;27 return true; 28 28 } 29 29 … … 32 32 DataSet.removeSelectionListener(oseam.SmpListener); 33 33 System.out.println("stop"); 34 return false;34 return true; 35 35 } 36 36 … … 39 39 System.out.println("hasFocus"); 40 40 DataSet.addSelectionListener(oseam.SmpListener); 41 return false;41 return true; 42 42 } 43 43 … … 46 46 DataSet.removeSelectionListener(oseam.SmpListener); 47 47 System.out.println("lostFocus"); 48 return false;48 return true; 49 49 } 50 50 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r24779 r24786 5 5 import oseam.panels.*; 6 6 7 import java.awt.Color;8 7 import java.awt.Dimension; 9 import java.awt.Font;10 import java.awt.Rectangle;11 import java.awt.event.ActionEvent;12 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 8 import java.util.Collection; 20 9 import java.util.Iterator; 21 10 import java.util.Map; 22 11 23 import javax.swing.BorderFactory;24 import javax.swing.ButtonGroup;25 import javax.swing.ImageIcon;26 import javax.swing.JButton;27 import javax.swing.JCheckBox;28 import javax.swing.JComboBox;29 import javax.swing.JLabel;30 import javax.swing.JMenuItem;31 12 import javax.swing.JPanel; 32 import javax.swing.JRadioButton;33 import javax.swing.JTextField;34 13 35 14 import org.openstreetmap.josm.Main; 36 import org.openstreetmap.josm.command.ChangePropertyCommand;37 import org.openstreetmap.josm.command.Command;38 15 import org.openstreetmap.josm.data.SelectionChangedListener; 39 16 import org.openstreetmap.josm.data.osm.DataSet; 40 17 import org.openstreetmap.josm.data.osm.Node; 41 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 42 import org.openstreetmap.josm.gui.MapView.EditLayerChangeListener;43 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;44 19 45 20 import oseam.Messages; 46 import oseam.OSeaM;47 21 import oseam.seamarks.SeaMark; 22 import oseam.seamarks.MarkCard; 23 import oseam.seamarks.MarkIsol; 24 import oseam.seamarks.MarkLat; 25 import oseam.seamarks.MarkLight; 26 import oseam.seamarks.MarkSpec; 27 import oseam.seamarks.MarkUkn; 28 import oseam.seamarks.MarkSaw; 48 29 49 30 public class OSeaMAction { 50 31 51 32 private OSeaMAction dia = null; 52 p rivatePanelMain panelMain = null;33 public PanelMain panelMain = null; 53 34 54 35 private SeaMark mark = null; … … 69 50 SelNode = node; 70 51 System.out.println(node); 71 //parseSeaMark();72 //mark.paintSign();52 parseSeaMark(); 53 mark.paintSign(); 73 54 } 74 55 } … … 112 93 113 94 ds = Main.main.getCurrentDataSet(); 114 /* 95 115 96 if (ds == null) { 116 mark = new MarkUkn(this, Messages.getString("SmpDialogAction.26"));97 mark = new MarkUkn(this, tr("Active layer contains no OSM data")); 117 98 mark.setNode(null); 118 99 return; … … 123 104 124 105 if (nodes == 0) { 125 mark = new MarkUkn(this, Messages.getString("SmpDialogAction.27"));106 mark = new MarkUkn(this, tr("Please select a node")); 126 107 mark.setNode(null); 127 108 return; … … 129 110 130 111 if (nodes > 1) { 131 mark = new MarkUkn(this, Messages.getString("SmpDialogAction.28"));112 mark = new MarkUkn(this, tr("Please select only one node")); 132 113 mark.setNode(null); 133 114 return; … … 136 117 Iterator<Node> it = selection.iterator(); 137 118 node = it.next(); 138 139 cM01IconVisible.setEnabled(true);140 cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(141 "/images/Auge.png"))); //$NON-NLS-1$142 143 cbM01TypeOfMark.setEnabled(true);144 119 145 120 String type = ""; … … 173 148 } else if (type.equals("landmark") || type.equals("light_vessel") 174 149 || type.equals("light_major") || type.equals("light_minor")) { 175 mark = new Mark Nota(this, node);150 mark = new MarkLight(this, node); 176 151 return; 177 152 … … 268 243 mark.paintSign(); 269 244 return; 270 */}245 } 271 246 272 247 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java
r24724 r24786 25 25 26 26 private ButtonGroup catButtons = null; 27 p rivateJRadioButton northButton = null;28 p rivateJRadioButton southButton = null;29 p rivateJRadioButton eastButton = null;30 p rivateJRadioButton westButton = null;31 p rivateJRadioButton isolButton = null;27 public JRadioButton northButton = null; 28 public JRadioButton southButton = null; 29 public JRadioButton eastButton = null; 30 public JRadioButton westButton = null; 31 public JRadioButton isolButton = null; 32 32 33 33 private ButtonGroup shapeButtons = null; 34 p rivateJRadioButton pillarButton = null;35 p rivateJRadioButton sparButton = null;36 p rivateJRadioButton floatButton = null;37 p rivateJRadioButton beaconButton = null;38 p rivateJRadioButton towerButton = null;34 public JRadioButton pillarButton = null; 35 public JRadioButton sparButton = null; 36 public JRadioButton floatButton = null; 37 public JRadioButton beaconButton = null; 38 public JRadioButton towerButton = null; 39 39 40 40 public PanelHaz() { -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r24778 r24786 58 58 private JButton saveButton = null; 59 59 private ButtonGroup typeButtons = null; 60 p rivateJRadioButton chanButton = null;61 p rivateJRadioButton hazButton = null;62 p rivateJRadioButton specButton = null;63 p rivateJRadioButton lightsButton = null;60 public JRadioButton chanButton = null; 61 public JRadioButton hazButton = null; 62 public JRadioButton specButton = null; 63 public JRadioButton lightsButton = null; 64 64 private ButtonGroup miscButtons = null; 65 65 private JRadioButton topButton = null; … … 67 67 private JRadioButton radarButton = null; 68 68 private JRadioButton litButton = null; 69 p rivatePanelChan panelChan = null;70 p rivatePanelHaz panelHaz = null;71 p rivatePanelSpec panelSpec = null;72 p rivatePanelLights panelLights = null;69 public PanelChan panelChan = null; 70 public PanelHaz panelHaz = null; 71 public PanelSpec panelSpec = null; 72 public PanelLights panelLights = null; 73 73 private PanelTop panelTop = null; 74 74 private PanelFog panelFog = null; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkCard.java
r24779 r24786 3 3 import java.util.Map; 4 4 5 import javax.swing.ImageIcon;6 7 import org.openstreetmap.josm.Main;8 import org.openstreetmap.josm.command.ChangePropertyCommand;9 5 import org.openstreetmap.josm.data.osm.Node; 10 6 11 import oseam.Messages;12 7 import oseam.dialogs.OSeaMAction; 13 8 import oseam.seamarks.SeaMark; … … 22 17 keys = node.getKeys(); 23 18 setNode(node); 24 /* 25 dlg.cbM01TypeOfMark.setSelectedIndex(CARDINAL); 26 27 dlg.cbM01CatOfMark.removeAllItems(); 28 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$ 29 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.158")); //$NON-NLS-1$ 30 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.159")); //$NON-NLS-1$ 31 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.160")); //$NON-NLS-1$ 32 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.161")); //$NON-NLS-1$ 33 34 dlg.cbM01CatOfMark.setEnabled(true); 35 dlg.cbM01CatOfMark.setVisible(true); 36 dlg.lM01CatOfMark.setVisible(true); 37 38 dlg.cbM01StyleOfMark.removeAllItems(); 39 dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 40 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 41 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 42 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 43 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 44 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 45 dlg.cbM01StyleOfMark.setVisible(true); 46 dlg.lM01StyleOfMark.setVisible(true); 47 */ 48 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$ 49 if (keys.containsKey("name")) //$NON-NLS-1$ 50 setName(keys.get("name")); //$NON-NLS-1$ 51 52 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 53 setName(keys.get("seamark:name")); //$NON-NLS-1$ 54 55 if (keys.containsKey("seamark:buoy_cardinal:name")) //$NON-NLS-1$ 56 setName(keys.get("seamark:buoy_cardinal:name")); //$NON-NLS-1$ 57 else if (keys.containsKey("seamark:beacon_cardinal:name")) //$NON-NLS-1$ 58 setName(keys.get("seamark:beacon_cardinal:name")); //$NON-NLS-1$ 59 else if (keys.containsKey("seamark:light_float:name")) //$NON-NLS-1$ 60 setName(keys.get("seamark:light_float:name")); //$NON-NLS-1$ 61 62 String cat = ""; //$NON-NLS-1$ 63 String col = ""; //$NON-NLS-1$ 64 65 if (keys.containsKey("seamark:buoy_cardinal:category")) //$NON-NLS-1$ 66 cat = keys.get("seamark:buoy_cardinal:category"); //$NON-NLS-1$ 67 else if (keys.containsKey("seamark:beacon_cardinal:category")) //$NON-NLS-1$ 68 cat = keys.get("seamark:beacon_cardinal:category"); //$NON-NLS-1$ 69 70 if (keys.containsKey("seamark:buoy_cardinal:colour")) //$NON-NLS-1$ 71 col = keys.get("seamark:buoy_cardinal:colour"); //$NON-NLS-1$ 72 else if (keys.containsKey("seamark:beacon_cardinal:colour")) //$NON-NLS-1$ 73 col = keys.get("seamark:beacon_cardinal:colour"); //$NON-NLS-1$ 74 else if (keys.containsKey("seamark:light_float:colour")) //$NON-NLS-1$ 75 col = keys.get("seamark:light_float:colour"); //$NON-NLS-1$ 76 77 if (cat.isEmpty()) { //$NON-NLS-1$ 78 if (col.equals("black;yellow")) { //$NON-NLS-1$ 79 setMarkIndex(CARD_NORTH); 80 setColour(BLACK_YELLOW); 81 } else if (col.equals("black;yellow;black")) { //$NON-NLS-1$ 82 setMarkIndex(CARD_EAST); 83 setColour(BLACK_YELLOW_BLACK); 84 } else if (col.equals("yellow;black")) { //$NON-NLS-1$ 85 setMarkIndex(CARD_SOUTH); 86 setColour(YELLOW_BLACK); 87 } else if (col.equals("yellow;black;yellow")) { //$NON-NLS-1$ 88 setMarkIndex(CARD_WEST); 89 setColour(YELLOW_BLACK_YELLOW); 90 } 91 } else if (cat.equals("north")) { //$NON-NLS-1$ 92 setMarkIndex(CARD_NORTH); 93 setColour(BLACK_YELLOW); 94 } else if (cat.equals("east")) { //$NON-NLS-1$ 95 setMarkIndex(CARD_EAST); 96 setColour(BLACK_YELLOW_BLACK); 97 } else if (cat.equals("south")) { //$NON-NLS-1$ 98 setMarkIndex(CARD_SOUTH); 99 setColour(YELLOW_BLACK); 100 } else if (cat.equals("west")) { //$NON-NLS-1$ 101 setMarkIndex(CARD_WEST); 102 setColour(YELLOW_BLACK_YELLOW); 103 } 104 105 if (keys.containsKey("seamark:buoy_cardinal:shape")) { //$NON-NLS-1$ 106 str = keys.get("seamark:buoy_cardinal:shape"); //$NON-NLS-1$ 107 108 if (str.equals("pillar")) //$NON-NLS-1$ 109 setStyleIndex(CARD_PILLAR); 110 else if (str.equals("spar")) //$NON-NLS-1$ 111 setStyleIndex(CARD_SPAR); 112 } else if (keys.containsKey("seamark:beacon_cardinal:colour")) { //$NON-NLS-1$ 113 if (keys.containsKey("seamark:beacon_cardinal:shape")) { //$NON-NLS-1$ 114 str = keys.get("seamark:beacon_cardinal:shape"); //$NON-NLS-1$ 115 116 if (str.equals("tower")) //$NON-NLS-1$ 117 setStyleIndex(CARD_TOWER); 118 else 119 setStyleIndex(CARD_BEACON); 120 } else 121 setStyleIndex(CARD_BEACON); 122 } else if (keys.containsKey("seamark:type") //$NON-NLS-1$ 123 && (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$ 124 setStyleIndex(CARD_FLOAT); 125 } 126 127 // if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount()) 128 // setStyleIndex(0); 19 20 if (!dlg.panelMain.hazButton.isSelected()) 21 dlg.panelMain.hazButton.doClick(); 22 23 if (keys.containsKey("name")) 24 setName(keys.get("name")); 25 26 if (keys.containsKey("seamark:name")) 27 setName(keys.get("seamark:name")); 28 29 if (keys.containsKey("seamark:buoy_cardinal:name")) 30 setName(keys.get("seamark:buoy_cardinal:name")); 31 else if (keys.containsKey("seamark:beacon_cardinal:name")) 32 setName(keys.get("seamark:beacon_cardinal:name")); 33 else if (keys.containsKey("seamark:light_float:name")) 34 setName(keys.get("seamark:light_float:name")); 35 36 String cat = ""; 37 String col = ""; 38 39 if (keys.containsKey("seamark:buoy_cardinal:category")) 40 cat = keys.get("seamark:buoy_cardinal:category"); 41 else if (keys.containsKey("seamark:beacon_cardinal:category")) 42 cat = keys.get("seamark:beacon_cardinal:category"); 43 44 if (keys.containsKey("seamark:buoy_cardinal:colour")) 45 col = keys.get("seamark:buoy_cardinal:colour"); 46 else if (keys.containsKey("seamark:beacon_cardinal:colour")) 47 col = keys.get("seamark:beacon_cardinal:colour"); 48 else if (keys.containsKey("seamark:light_float:colour")) 49 col = keys.get("seamark:light_float:colour"); 50 51 if (cat.isEmpty()) { 52 if (col.equals("black;yellow")) { 53 dlg.panelMain.panelHaz.northButton.doClick(); 54 setCategory(Cat.CARD_NORTH); 55 setColour(Col.BLACK_YELLOW); 56 } else if (col.equals("black;yellow;black")) { 57 dlg.panelMain.panelHaz.eastButton.doClick(); 58 setCategory(Cat.CARD_EAST); 59 setColour(Col.BLACK_YELLOW_BLACK); 60 } else if (col.equals("yellow;black")) { 61 dlg.panelMain.panelHaz.southButton.doClick(); 62 setCategory(Cat.CARD_SOUTH); 63 setColour(Col.YELLOW_BLACK); 64 } else if (col.equals("yellow;black;yellow")) { 65 dlg.panelMain.panelHaz.westButton.doClick(); 66 setCategory(Cat.CARD_WEST); 67 setColour(Col.YELLOW_BLACK_YELLOW); 68 } 69 } else if (cat.equals("north")) { 70 dlg.panelMain.panelHaz.northButton.doClick(); 71 setCategory(Cat.CARD_NORTH); 72 setColour(Col.BLACK_YELLOW); 73 } else if (cat.equals("east")) { 74 dlg.panelMain.panelHaz.eastButton.doClick(); 75 setCategory(Cat.CARD_EAST); 76 setColour(Col.BLACK_YELLOW_BLACK); 77 } else if (cat.equals("south")) { 78 dlg.panelMain.panelHaz.southButton.doClick(); 79 setCategory(Cat.CARD_SOUTH); 80 setColour(Col.YELLOW_BLACK); 81 } else if (cat.equals("west")) { 82 dlg.panelMain.panelHaz.westButton.doClick(); 83 setCategory(Cat.CARD_WEST); 84 setColour(Col.YELLOW_BLACK_YELLOW); 85 } 86 87 if (keys.containsKey("seamark:buoy_cardinal:shape")) { 88 str = keys.get("seamark:buoy_cardinal:shape"); 89 90 if (str.equals("pillar")) { 91 dlg.panelMain.panelHaz.pillarButton.doClick(); 92 setShape(Styl.PILLAR); 93 } else if (str.equals("spar")) { 94 dlg.panelMain.panelHaz.sparButton.doClick(); 95 setShape(Styl.SPAR); 96 } 97 } else if (keys.containsKey("seamark:beacon_cardinal:colour")) { 98 if (keys.containsKey("seamark:beacon_cardinal:shape")) { 99 str = keys.get("seamark:beacon_cardinal:shape"); 100 101 if (str.equals("tower")) { 102 setShape(Styl.TOWER); 103 dlg.panelMain.panelHaz.towerButton.doClick(); 104 } else { 105 dlg.panelMain.panelHaz.beaconButton.doClick(); 106 setShape(Styl.BEACON); 107 } 108 } else { 109 dlg.panelMain.panelHaz.beaconButton.doClick(); 110 setShape(Styl.BEACON); 111 } 112 } else if (keys.containsKey("seamark:type") 113 && (keys.get("seamark:type").equals("light_float"))) { 114 dlg.panelMain.panelHaz.floatButton.doClick(); 115 setShape(Styl.FLOAT); 116 } 129 117 130 118 // refreshLights(); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkIsol.java
r24779 r24786 3 3 import java.util.Map; 4 4 5 import javax.swing.ImageIcon;6 7 import org.openstreetmap.josm.Main;8 import org.openstreetmap.josm.command.ChangePropertyCommand;9 5 import org.openstreetmap.josm.data.osm.Node; 10 6 11 import oseam.Messages;12 7 import oseam.dialogs.OSeaMAction; 13 8 import oseam.seamarks.SeaMark; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLat.java
r24779 r24786 3 3 import java.util.Map; 4 4 5 import javax.swing.ImageIcon;6 7 import org.openstreetmap.josm.Main;8 import org.openstreetmap.josm.command.ChangePropertyCommand;9 5 import org.openstreetmap.josm.data.osm.Node; 10 6 11 import oseam.Messages;12 7 import oseam.dialogs.OSeaMAction; 13 8 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLight.java
r24779 r24786 3 3 import java.util.Map; 4 4 5 import javax.swing.ImageIcon;6 7 import org.openstreetmap.josm.Main;8 import org.openstreetmap.josm.command.ChangePropertyCommand;9 5 import org.openstreetmap.josm.data.osm.Node; 10 6 11 import oseam.Messages;12 7 import oseam.dialogs.OSeaMAction; 13 8 import oseam.seamarks.SeaMark; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSaw.java
r24779 r24786 3 3 import java.util.Map; 4 4 5 import javax.swing.ImageIcon;6 7 import org.openstreetmap.josm.Main;8 import org.openstreetmap.josm.command.ChangePropertyCommand;9 5 import org.openstreetmap.josm.data.osm.Node; 10 6 11 import oseam.Messages;12 7 import oseam.dialogs.OSeaMAction; 13 8 import oseam.seamarks.SeaMark; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSpec.java
r24779 r24786 3 3 import java.util.Map; 4 4 5 import javax.swing.ImageIcon;6 7 import org.openstreetmap.josm.Main;8 import org.openstreetmap.josm.command.ChangePropertyCommand;9 5 import org.openstreetmap.josm.data.osm.Node; 10 6 11 import oseam.Messages;12 7 import oseam.dialogs.OSeaMAction; 13 8 import oseam.seamarks.SeaMark; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkUkn.java
r24779 r24786 1 1 package oseam.seamarks; 2 3 import javax.swing.ImageIcon;4 5 import org.openstreetmap.josm.Main;6 2 7 3 import oseam.dialogs.OSeaMAction; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r24779 r24786 11 11 abstract public class SeaMark { 12 12 13 /** 14 * CONSTANTS 15 */ 13 public enum Type {UNKNOWN_TYPE, LATERAL, CARDINAL, SAFE_WATER, ISOLATED_DANGER, SPECIAL_PURPOSE, LIGHT} 16 14 17 /** 18 * Colours 19 */ 15 public enum Cat {UNKNOWN_CAT, PORT_HAND, STARBOARD_HAND, PREF_PORT_HAND, PREF_STARBOARD_HAND, CARD_NORTH, CARD_EAST, CARD_SOUTH, CARD_WEST, LIGHT_HOUSE, LIGHT_MAJOR, LIGHT_MINOR, LIGHT_VESSEL} 20 16 21 public final static int UNKNOWN_COLOUR = 0; 22 public final static int RED = 1; 23 public final static int GREEN = 2; 24 public final static int RED_GREEN_RED = 3; 25 public final static int GREEN_RED_GREEN = 4; 26 public final static int RED_WHITE = 5; 27 public final static int BLACK_YELLOW = 6; 28 public final static int BLACK_YELLOW_BLACK = 7; 29 public final static int YELLOW_BLACK = 8; 30 public final static int YELLOW_BLACK_YELLOW = 9; 31 public final static int BLACK_RED_BLACK = 10; 32 public final static int YELLOW = 11; 17 public final static boolean IALA_A = false; 18 public final static boolean IALA_B = true; 19 20 public enum Styl {UNKNOWN_SHAPE, PILLAR, SPAR, CAN, CONE, SPHERE, BARREL, FLOAT, SUPER, BEACON, TOWER, STAKE, PERCH} 21 22 public enum Col {UNKNOWN_COLOUR, RED, GREEN, RED_GREEN_RED, GREEN_RED_GREEN, RED_WHITE, BLACK_YELLOW, BLACK_YELLOW_BLACK, YELLOW_BLACK, YELLOW_BLACK_YELLOW, BLACK_RED_BLACK, YELLOW} 23 33 24 public final static int WHITE_LIGHT = 1; 34 25 public final static int RED_LIGHT = 2; 35 26 public final static int GREEN_LIGHT = 3; 36 37 /**38 * Types - correspond to TypeIndex39 */40 public final static int UNKNOWN_TYPE = 0;41 public final static int LATERAL = 1;42 public final static int CARDINAL = 2;43 public final static int SAFE_WATER = 3;44 public final static int ISOLATED_DANGER = 4;45 public final static int SPECIAL_PURPOSE = 5;46 public final static int LIGHT = 6;47 48 /**49 * Categories - correspond to CatIndex50 */51 public final static int UNKNOWN_CAT = 0;52 public final static int PORT_HAND = 1;53 public final static int STARBOARD_HAND = 2;54 public final static int PREF_PORT_HAND = 3;55 public final static int PREF_STARBOARD_HAND = 4;56 public final static int CARD_NORTH = 1;57 public final static int CARD_EAST = 2;58 public final static int CARD_SOUTH = 3;59 public final static int CARD_WEST = 4;60 public final static int LIGHT_HOUSE = 1;61 public final static int LIGHT_MAJOR = 2;62 public final static int LIGHT_MINOR = 3;63 public final static int LIGHT_VESSEL = 4;64 65 /**66 * Regions67 */68 public final static boolean IALA_A = false;69 public final static boolean IALA_B = true;70 71 /**72 * Shapes - correspond to StyleIndex73 */74 public final static int UNKNOWN_SHAPE = 0;75 public final static int LAT_CAN = 1;76 public final static int LAT_CONE = 1;77 public final static int LAT_PILLAR = 2;78 public final static int LAT_SPAR = 3;79 public final static int LAT_BEACON = 4;80 public final static int LAT_TOWER = 5;81 public final static int LAT_FLOAT = 6;82 public final static int LAT_PERCH = 7;83 public final static int CARD_PILLAR = 1;84 public final static int CARD_SPAR = 2;85 public final static int CARD_BEACON = 3;86 public final static int CARD_TOWER = 4;87 public final static int CARD_FLOAT = 5;88 public final static int SAFE_PILLAR = 1;89 public final static int SAFE_SPAR = 2;90 public final static int SAFE_SPHERE = 3;91 public final static int SAFE_BEACON = 4;92 public final static int SAFE_FLOAT = 5;93 public final static int ISOL_PILLAR = 1;94 public final static int ISOL_SPAR = 2;95 public final static int ISOL_BEACON = 3;96 public final static int ISOL_TOWER = 4;97 public final static int ISOL_FLOAT = 5;98 public final static int SPEC_PILLAR = 1;99 public final static int SPEC_CAN = 2;100 public final static int SPEC_CONE = 3;101 public final static int SPEC_SPAR = 4;102 public final static int SPEC_BEACON = 5;103 public final static int SPEC_TOWER = 6;104 public final static int SPEC_FLOAT = 7;105 public final static int SPEC_SPHERE = 8;106 public final static int SPEC_BARREL = 9;107 27 108 28 /** … … 148 68 } 149 69 150 public void setDlg(OSeaMAction d lg) {151 this.dlg = d lg;70 public void setDlg(OSeaMAction dia) { 71 this.dlg = dia; 152 72 } 153 73 … … 156 76 } 157 77 158 private Node Node = null;78 private Node node = null; 159 79 160 80 public Node getNode() { 161 return Node;81 return node; 162 82 } 163 83 164 public void setNode(Node nod e) {165 Node = node;84 public void setNode(Node nod) { 85 node = nod; 166 86 } 167 87 168 private boolean Region = false;88 private boolean region = false; 169 89 170 90 public boolean getRegion() { 171 return Region;91 return region; 172 92 } 173 93 174 public void setRegion(boolean reg ion) {175 Region = region;94 public void setRegion(boolean reg) { 95 region = reg; 176 96 } 177 97 178 private int Colour =UNKNOWN_COLOUR;98 private Col colour = Col.UNKNOWN_COLOUR; 179 99 180 public intgetColour() {181 return Colour;100 public Col getColour() { 101 return colour; 182 102 } 183 103 184 public void setColour(int colour) { 185 if (colour < UNKNOWN_COLOUR || colour > RED_WHITE) { 186 return; 187 } 188 Colour = colour; 189 104 public void setColour(Col col) { 105 colour = col; 190 106 } 191 107 192 private String ErrMsg = null;108 private String errMsg = null; 193 109 194 110 public String getErrMsg() { 195 return ErrMsg;111 return errMsg; 196 112 } 197 113 198 public void setErrMsg(String errMsg) {199 ErrMsg = errMsg;114 public void setErrMsg(String msg) { 115 errMsg = msg; 200 116 } 201 117 202 private String Name;118 private String name; 203 119 204 120 public String getName() { 205 return Name;121 return name; 206 122 } 207 123 208 public void setName(String nam e) {209 Name = name;124 public void setName(String nam) { 125 name = nam; 210 126 } 211 127 212 private int MarkIndex = 0;128 private Cat category = Cat.UNKNOWN_CAT; 213 129 214 public int getMarkIndex() {215 return MarkIndex;130 public Cat getCategory() { 131 return category; 216 132 } 217 133 218 public void set MarkIndex(int buoyIndex) {219 MarkIndex = buoyIndex;134 public void setCategory(Cat cat) { 135 category = cat; 220 136 } 221 137 222 private int StyleIndex = 0;138 private Styl shape = Styl.UNKNOWN_SHAPE; 223 139 224 public int getStyleIndex() {225 return StyleIndex;140 public Styl getShape() { 141 return shape; 226 142 } 227 143 228 public void setS tyleIndex(int styleIndex) {229 StyleIndex = styleIndex;144 public void setShape(Styl styl) { 145 shape = styl; 230 146 } 231 147
Note:
See TracChangeset
for help on using the changeset viewer.