Changeset 23012 in osm for applications/editors/josm
- Timestamp:
- 2010-09-06T15:31:55+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
r23009 r23012 121 121 private JLabel lM01TypeOfMark = null; 122 122 public JComboBox cbM01TypeOfMark = null; 123 p rivateJLabel lM01CatOfMark = null;123 public JLabel lM01CatOfMark = null; 124 124 public JComboBox cbM01CatOfMark = null; 125 p rivateJLabel lM01StyleOfMark = null;125 public JLabel lM01StyleOfMark = null; 126 126 public JComboBox cbM01StyleOfMark = null; 127 127 private JLabel lM01Name = null; … … 631 631 632 632 rbM01Fired1 = new JRadioButton(Messages.getString("SmpDialogAction.140"), true); //$NON-NLS-1$ 633 rbM01Fired1.setBounds(new Rectangle(8 0, 240, 65, 30));633 rbM01Fired1.setBounds(new Rectangle(85, 240, 70, 30)); 634 634 rbM01FiredN = new JRadioButton(Messages.getString("SmpDialogAction.141"), false); //$NON-NLS-1$ 635 rbM01FiredN.setBounds(new Rectangle(1 45, 240, 80, 30));635 rbM01FiredN.setBounds(new Rectangle(155, 240, 80, 30)); 636 636 bgM01Fired = new ButtonGroup(); 637 637 bgM01Fired.add(rbM01Fired1); … … 722 722 cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.148")); //$NON-NLS-1$ 723 723 724 cbM01TypeOfMark.setBounds(new Rectangle( 50, 25, 150, 25));725 cbM01TypeOfMark.setEditable(false);724 cbM01TypeOfMark.setBounds(new Rectangle(45, 25, 165, 25)); 725 // cbM01TypeOfMark.setEditable(false); 726 726 cbM01TypeOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 727 727 cbM01TypeOfMark.setEnabled(true); … … 750 750 case SeaMark.LATERAL: 751 751 if (!(buoy instanceof BuoyLat)) { 752 buoy = new BuoyLat(dia, n); 752 753 buoy.setBuoyIndex(0); 753 754 cbM01CatOfMark.removeAllItems(); … … 757 758 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.155")); //$NON-NLS-1$ 758 759 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.156")); //$NON-NLS-1$ 759 cbM01CatOfMark.setEnabled(true);760 760 } 761 761 break; … … 763 763 case SeaMark.CARDINAL: 764 764 if (!(buoy instanceof BuoyCard)) { 765 buoy = new BuoyCard(dia, n); 765 766 buoy.setBuoyIndex(0); 766 767 cbM01CatOfMark.removeAllItems(); … … 770 771 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.160")); //$NON-NLS-1$ 771 772 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.161")); //$NON-NLS-1$ 772 cbM01CatOfMark.setEnabled(true);773 773 } 774 774 break; 775 775 776 776 case SeaMark.SAFE_WATER: 777 if (!(buoy instanceof BuoySaw)) 777 if (!(buoy instanceof BuoySaw)) { 778 778 buoy = new BuoySaw(dia, n); 779 } 779 780 buoy.setBuoyIndex(type); 780 781 break; 781 782 782 783 case SeaMark.ISOLATED_DANGER: 783 if (!(buoy instanceof BuoyIsol)) 784 if (!(buoy instanceof BuoyIsol)) { 784 785 buoy = new BuoyIsol(dia, n); 786 } 785 787 buoy.setBuoyIndex(type); 786 788 break; 787 789 788 790 case SeaMark.SPECIAL_PURPOSE: 789 if (!(buoy instanceof BuoySpec)) 791 if (!(buoy instanceof BuoySpec)) { 790 792 buoy = new BuoySpec(dia, n); 793 } 791 794 buoy.setBuoyIndex(type); 795 break; 796 797 case SeaMark.LIGHT: 798 if (!(buoy instanceof BuoyNota)) { 799 buoy = new BuoyNota(dia, n); 800 buoy.setBuoyIndex(0); 801 cbM01CatOfMark.removeAllItems(); 802 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$ 803 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.206")); //$NON-NLS-1$ 804 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.207")); //$NON-NLS-1$ 805 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.208")); //$NON-NLS-1$ 806 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.209")); //$NON-NLS-1$ 807 } 792 808 break; 793 809 } … … 806 822 if (cbM01CatOfMark == null) { 807 823 cbM01CatOfMark = new JComboBox(); 808 cbM01CatOfMark.setBounds(new Rectangle( 75, 55, 125, 25));824 cbM01CatOfMark.setBounds(new Rectangle(60, 55, 150, 25)); 809 825 cbM01CatOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 826 cbM01CatOfMark.setEnabled(true); 827 810 828 cbM01CatOfMark.addActionListener(new ActionListener() { 811 829 public void actionPerformed(ActionEvent e) { … … 833 851 buoy.setBuoyIndex(cat); 834 852 } 853 if (cbM01TypeOfMark.getSelectedIndex() == SeaMark.LIGHT) { 854 if (!(buoy instanceof BuoyNota)) 855 buoy = new BuoyNota(dia, n); 856 buoy.setBuoyIndex(cat); 857 } 835 858 836 859 buoy.refreshStyles(); … … 847 870 if (cbM01StyleOfMark == null) { 848 871 cbM01StyleOfMark = new JComboBox(); 849 cbM01StyleOfMark.setBounds(new Rectangle( 50, 85, 150, 25));872 cbM01StyleOfMark.setBounds(new Rectangle(45, 85, 165, 25)); 850 873 cbM01StyleOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 851 874 cbM01StyleOfMark.addActionListener(new ActionListener() { … … 879 902 if (cM01TopMark == null) { 880 903 cM01TopMark = new JCheckBox(); 881 cM01TopMark.setBounds(new Rectangle(10, 170, 90, 20));904 cM01TopMark.setBounds(new Rectangle(10, 170, 100, 20)); 882 905 cM01TopMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 883 906 cM01TopMark.setText(Messages.getString("SmpDialogAction.166")); //$NON-NLS-1$ … … 1009 1032 if (cM01Fired == null) { 1010 1033 cM01Fired = new JCheckBox(); 1011 cM01Fired.setBounds(new Rectangle(10, 245, 7 0, 20));1034 cM01Fired.setBounds(new Rectangle(10, 245, 75, 20)); 1012 1035 cM01Fired.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 1013 1036 cM01Fired.setText(Messages.getString("SmpDialogAction.177")); //$NON-NLS-1$ -
applications/editors/josm/plugins/toms/src/toms/msg/messages_de.properties
r23009 r23012 1 1 Toms.2=Hallo Welt 2 2 SmpDialogAction.0=Seezeichen Editor 3 SmpDialogAction.1=Klasse 3 SmpDialogAction.1=Klasse: 4 4 SmpDialogAction.101=IALA 5 SmpDialogAction.103=Typ 5 SmpDialogAction.103=Typ: 6 6 SmpDialogAction.109=Name: 7 7 SmpDialogAction.111=Andere Eigenschaften: … … 16 16 SmpDialogAction.129=Sektor: 17 17 SmpDialogAction.131=Farbe 18 SmpDialogAction.133=Brg: \u FFFD- \uFFFD, r:18 SmpDialogAction.133=Brg: \u00B0- \u00B0, r: 19 19 SmpDialogAction.134=-A 20 20 SmpDialogAction.140=einzeln 21 21 SmpDialogAction.141=geteiled 22 SmpDialogAction.142=* Wähle Seezeichen aus*22 SmpDialogAction.142=*Wähle Seezeichen aus* 23 23 SmpDialogAction.143=Laterales Zeichen 24 24 SmpDialogAction.144=Kardinales Zeichen … … 28 28 SmpDialogAction.148=Leuchtfeuer 29 29 SmpDialogAction.150=kein Seezeichen ausgewählt 30 SmpDialogAction.152=* 30 SmpDialogAction.152=*Wähle Kategorie aus* 31 31 SmpDialogAction.153=Backbord 32 32 SmpDialogAction.154=Steuerbord 33 33 SmpDialogAction.155=Abzweigung Backboard 34 34 SmpDialogAction.156=Abzweigung Steuerbord 35 SmpDialogAction.157=* 35 SmpDialogAction.157=*Wähle Kategorie aus* 36 36 SmpDialogAction.158=Nord 37 37 SmpDialogAction.159=Ost … … 63 63 SmpDialogAction.9=Seamap Editor 64 64 SmpDialogAction.4=OpenSeaMap Editor 65 SmpDialogAction.206=Lighthouse 66 SmpDialogAction.207=Major Light 67 SmpDialogAction.208=Minor Light 68 SmpDialogAction.209=Light Float 65 69 -
applications/editors/josm/plugins/toms/src/toms/msg/messages_en.properties
r23009 r23012 68 68 SmpDialogAction.97=Seamark Properties 69 69 SmpDialogAction.99=Region: 70 SmpDialogAction.206=Lighthouse 71 SmpDialogAction.207=Major Light 72 SmpDialogAction.208=Minor Light 73 SmpDialogAction.209=Light Float -
applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java
r22985 r23012 61 61 public final static int CARD_SOUTH = 3; 62 62 public final static int CARD_WEST = 4; 63 public final static int LIGHT_HOUSE = 1; 64 public final static int LIGHT_MAJOR = 2; 65 public final static int LIGHT_MINOR = 3; 66 public final static int LIGHT_FLOAT = 4; 63 67 64 68 /** … … 102 106 public final static int SPEC_BEACON = 6; 103 107 public final static int SPEC_TOWER = 7; 104 public final static int LIGHT_HOUSE = 1;105 public final static int LIGHT_MAJOR = 2;106 public final static int LIGHT_MINOR = 3;107 public final static int LIGHT_FLOAT = 4;108 108 109 109 /** -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r23009 r23012 331 331 dlg.rbM01RegionA.setEnabled(false); 332 332 dlg.rbM01RegionB.setEnabled(false); 333 dlg.cbM01CatOfMark.removeAllItems(); 334 dlg.cbM01CatOfMark.setVisible(false); 335 dlg.lM01CatOfMark.setVisible(false); 333 336 dlg.cbM01StyleOfMark.removeAllItems(); 334 dlg.cbM01StyleOfMark.setEnabled(false); 337 dlg.cbM01StyleOfMark.setVisible(false); 338 dlg.lM01StyleOfMark.setVisible(false); 335 339 dlg.tfM01Name.setText(""); 336 340 dlg.tfM01Name.setEnabled(false); 337 341 setName(""); 338 342 dlg.cM01TopMark.setSelected(false); 339 dlg.cM01TopMark.set Enabled(false);343 dlg.cM01TopMark.setVisible(false); 340 344 dlg.cbM01TopMark.removeAllItems(); 341 345 dlg.cbM01TopMark.setVisible(false); 342 346 setTopMark(false); 343 347 dlg.cM01Radar.setSelected(false); 344 dlg.cM01Radar.set Enabled(false);348 dlg.cM01Radar.setVisible(false); 345 349 dlg.cM01Racon.setSelected(false); 346 dlg.cM01Racon.set Enabled(false);350 dlg.cM01Racon.setVisible(false); 347 351 dlg.cbM01Racon.removeAllItems(); 348 352 dlg.cbM01Racon.setVisible(false); … … 351 355 dlg.lM01Racon.setVisible(false); 352 356 dlg.cM01Fog.setSelected(false); 353 dlg.cM01Fog.set Enabled(false);357 dlg.cM01Fog.setVisible(false); 354 358 dlg.cbM01Fog.removeAllItems(); 355 359 dlg.cbM01Fog.setVisible(false); … … 361 365 dlg.lM01FogPeriod.setVisible(false); 362 366 dlg.cM01Fired.setSelected(false); 363 dlg.cM01Fired.set Enabled(false);367 dlg.cM01Fired.setVisible(false); 364 368 setFired(false); 365 dlg.rbM01Fired1.set Enabled(false);366 dlg.rbM01FiredN.set Enabled(false);369 dlg.rbM01Fired1.setVisible(false); 370 dlg.rbM01FiredN.setVisible(false); 367 371 dlg.cbM01Kennung.removeAllItems(); 368 372 dlg.cbM01Kennung.setVisible(false); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
r22979 r23012 26 26 27 27 resetMask(); 28 dlg.cbM01CatOfMark.setEnabled(true); 29 dlg.cbM01CatOfMark.setVisible(true); 30 dlg.lM01CatOfMark.setVisible(true); 28 31 29 32 dlg.cbM01StyleOfMark.removeAllItems(); … … 34 37 dlg.cbM01StyleOfMark.addItem("Tower"); 35 38 dlg.cbM01StyleOfMark.addItem("Float"); 36 dlg.cbM01StyleOfMark.setEnabled(true); 39 dlg.cbM01StyleOfMark.setVisible(true); 40 dlg.lM01StyleOfMark.setVisible(true); 37 41 38 42 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r22979 r23012 33 33 dlg.cbM01StyleOfMark.addItem("Tower"); 34 34 dlg.cbM01StyleOfMark.addItem("Float"); 35 dlg.cbM01StyleOfMark.setEnabled(true); 35 dlg.cbM01StyleOfMark.setVisible(true); 36 dlg.lM01StyleOfMark.setVisible(true); 36 37 37 38 dlg.cbM01Kennung.removeAllItems(); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r22979 r23012 27 27 dlg.rbM01RegionA.setEnabled(true); 28 28 dlg.rbM01RegionB.setEnabled(true); 29 dlg.cbM01CatOfMark.setEnabled(true); 30 dlg.cbM01CatOfMark.setVisible(true); 31 dlg.lM01CatOfMark.setVisible(true); 29 32 30 33 dlg.cbM01StyleOfMark.removeAllItems(); … … 337 340 setStyleIndex(style); 338 341 dlg.cbM01StyleOfMark.setSelectedIndex(style); 342 dlg.cbM01StyleOfMark.setVisible(true); 343 dlg.lM01StyleOfMark.setVisible(true); 339 344 } 340 345 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
r22979 r23012 16 16 17 17 public class BuoyNota extends Buoy { 18 public BuoyNota(SmpDialogAction dia, int type) {18 public BuoyNota(SmpDialogAction dia, Node node) { 19 19 super(dia); 20 20 21 String str; 22 Map<String, String> keys; 23 keys = node.getKeys(); 24 setNode(node); 25 21 26 resetMask(); 27 28 dlg.cbM01CatOfMark.setEnabled(true); 29 dlg.cbM01CatOfMark.setVisible(true); 30 dlg.lM01CatOfMark.setVisible(true); 22 31 23 32 dlg.cbM01Kennung.removeAllItems(); 24 33 dlg.cbM01Kennung.addItem("Not set"); 25 34 dlg.cbM01Kennung.addItem("Fl"); 26 dlg.cbM01Kennung.addItem("Fl(2)"); 27 dlg.cbM01Kennung.addItem("Fl(3)"); 28 dlg.cbM01Kennung.addItem("Fl(4)"); 29 dlg.cbM01Kennung.addItem("Fl(5)"); 30 dlg.cbM01Kennung.addItem("Oc(2)"); 31 dlg.cbM01Kennung.addItem("Oc(3)"); 35 dlg.cbM01Kennung.addItem("Fl()"); 36 dlg.cbM01Kennung.addItem("Oc()"); 32 37 dlg.cbM01Kennung.addItem("Q"); 33 38 dlg.cbM01Kennung.addItem("IQ"); 34 39 dlg.cbM01Kennung.setSelectedIndex(0); 35 40 36 setBuoyIndex(type);37 setStyleIndex(0);38 41 setLightColour(); 39 42 40 43 setFired(true); 41 44 setTopMark(false); 42 refreshStyles();43 45 paintSign(); 44 }45 46 public void refreshStyles() {47 int type = getBuoyIndex();48 int style = getStyleIndex();49 50 dlg.cbM01StyleOfMark.removeAllItems();51 dlg.cbM01StyleOfMark.addItem("Not set");52 dlg.cbM01StyleOfMark.addItem("Lighthouse");53 dlg.cbM01StyleOfMark.addItem("Major Light");54 dlg.cbM01StyleOfMark.addItem("Minor Light");55 dlg.cbM01StyleOfMark.addItem("Light Float");56 57 if (style >= dlg.cbM01StyleOfMark.getItemCount())58 style = 0;59 setStyleIndex(style);60 dlg.cbM01StyleOfMark.setSelectedIndex(style);61 46 } 62 47 … … 70 55 dlg.cM01Fired.setSelected(true); 71 56 dlg.cM01Fired.setEnabled(false); 72 dlg.cM01TopMark.set Enabled(false);57 dlg.cM01TopMark.setVisible(false); 73 58 dlg.cM01TopMark.setSelected(false); 74 59 … … 90 75 91 76 case SeaMark.LIGHT_FLOAT: 92 dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(93 "/images/Major_Float.png")));77 // dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource( 78 // "/images/Light_Float.png"))); 94 79 break; 95 80 … … 115 100 case LIGHT_MINOR: 116 101 super.saveSign("minor_light"); 117 break;118 case LIGHT_FLOAT:119 super.saveSign("major_floating_light");120 102 break; 121 103 default: -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r22979 r23012 33 33 dlg.cbM01StyleOfMark.addItem("Beacon"); 34 34 dlg.cbM01StyleOfMark.addItem("Float"); 35 dlg.cbM01StyleOfMark.setVisible(true); 36 dlg.lM01StyleOfMark.setVisible(true); 35 37 36 38 dlg.cbM01Kennung.removeAllItems(); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r22979 r23012 35 35 dlg.cbM01StyleOfMark.addItem("Beacon"); 36 36 dlg.cbM01StyleOfMark.addItem("Tower"); 37 dlg.cbM01StyleOfMark.setVisible(true); 38 dlg.lM01StyleOfMark.setVisible(true); 37 39 38 40 dlg.cbM01Kennung.removeAllItems(); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java
r22979 r23012 14 14 super(dia); 15 15 resetMask(); 16 dlg.cbM01TypeOfMark.setSelectedIndex(0); 16 17 dlg.cbM01CatOfMark.removeAllItems(); 17 18 dlg.cbM01CatOfMark.setEnabled(false);
Note:
See TracChangeset
for help on using the changeset viewer.