Ignore:
Timestamp:
2010-09-05T08:49:28+02:00 (14 years ago)
Author:
malcolmh
Message:

more mask items

Location:
applications/editors/josm/plugins/toms/src/toms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java

    r22985 r23000  
    6464         * lokale Variable, private
    6565         */
    66         private SmpDialogAction dia = null; // Variable für den Handle von
     66        private SmpDialogAction dia = null; // Variable für den Handle von
    6767                                                                                                                                                        // SmpDialogAction
    68         private Buoy buoy = null; // Variable für Objekte des Typs "Tonne" //
     68        private Buoy buoy = null; // Variable für Objekte des Typs "Tonne" //
    6969                                                                                                                // @jve:decl-index=0:
    7070        private boolean isOpen = false; // zeigt den Status des Dialogs an
    7171        private Node onode = null; // gemerkter Knoten
    7272        private Buoy obuoy = null; // gemerkte Tonne // @jve:decl-index=0:
    73         private JMenuItem SmpItem = null; // Info über item in der Werkzeugleiste
     73        private JMenuItem SmpItem = null; // Info über item in der Werkzeugleiste
    7474        private String smt = ""; // value vom key "seamark:type" // @jve:decl-index=0:
    7575        private String smb = ""; // value vom key "seamark" // @jve:decl-index=0:
     
    7979        private String UserHome = ""; // @jve:decl-index=0:
    8080
    81         // SelectionChangedListner der in die Eventqueue von josm eingehängt wird
     81        // SelectionChangedListner der in die Eventqueue von josm eingehängt wird
    8282        private SelectionChangedListener SmpListener = new SelectionChangedListener() {
    8383                public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
     
    146146        private JLabel lM01Kennung = null;
    147147        public JComboBox cbM01Kennung = null;
    148         private JLabel lM01Sector = null;
    149         public JComboBox cbM01Sector = null;
     148        private JLabel lM01Height = null;
     149        public JTextField tfM01Height = null;
     150        private JLabel lM01Range = null;
    150151        private JLabel lM01Group = null;
    151152        public JTextField tfM01Group = null;
    152153        private JLabel lM01RepeatTime = null;
    153154        public JTextField tfM01RepeatTime = null;
    154         private JLabel lM01Height = null;
     155        private JLabel lM01Sector = null;
     156        public JComboBox cbM01Sector = null;
     157        private JLabel lM01Colour = null;
     158        public JComboBox cbM01Colour = null;
    155159        private JLabel lM01Bearing = null;
    156160        public JTextField tfM01Bearing = null;
    157161        public JTextField tfM02Bearing = null;
    158162        public JTextField tfM01Radius = null;
    159         public JTextField tfM01Height = null;
    160         private JLabel lM01Range = null;
    161163        public JTextField tfM01Range = null;
    162164        public JButton bM01Save = null;
     
    260262                SmpItem.setEnabled(false);
    261263
    262                 // Ausprobe: Möglichkeit der Benachrichtigung, wenn etwas neu
     264                // Ausprobe: Möglichkeit der Benachrichtigung, wenn etwas neu
    263265                // selektiert wird (ueber SelectionChangedListener)
    264266                // private Collection<? extends OsmPrimitive> sel;
    265267                // siehe org.openstreetmap.josm.plugins.osb -> OsbLayer.java
    266                 // Einhängen des Listeners in die Eventqueue von josm
     268                // Einhängen des Listeners in die Eventqueue von josm
    267269                DataSet.selListeners.add(SmpListener);
    268270                // DataSet.addSelectionListener(SmpListener);
     
    574576                        lM01Kennung.setText("Character:");
    575577
    576                         lM01Sector = new JLabel();
    577                         lM01Sector.setBounds(new Rectangle(80, 270, 180, 20));
    578                         lM01Sector.setFont(new Font("Dialog", Font.PLAIN, 12));
    579                         lM01Sector.setText("Sector:");
     578                        lM01Height = new JLabel();
     579                        lM01Height.setBounds(new Rectangle(10, 270, 100, 20));
     580                        lM01Height.setFont(new Font("Dialog", Font.PLAIN, 12));
     581                        lM01Height.setText("Height:         m");
     582
     583                        lM01Range = new JLabel();
     584                        lM01Range.setBounds(new Rectangle(108, 270, 100, 20));
     585                        lM01Range.setFont(new Font("Dialog", Font.PLAIN, 12));
     586                        lM01Range.setText("Range:         M");
    580587
    581588                        lM01Group = new JLabel();
    582                         lM01Group.setBounds(new Rectangle(190, 270, 100, 20));
     589                        lM01Group.setBounds(new Rectangle(204, 270, 100, 20));
    583590                        lM01Group.setFont(new Font("Dialog", Font.PLAIN, 12));
    584                         lM01Group.setText("Group: (          )");
     591                        lM01Group.setText("Group: (         )");
    585592
    586593                        lM01RepeatTime = new JLabel();
     
    589596                        lM01RepeatTime.setText("Period:          s");
    590597
     598                        lM01Sector = new JLabel();
     599                        lM01Sector.setBounds(new Rectangle(10, 295, 180, 20));
     600                        lM01Sector.setFont(new Font("Dialog", Font.PLAIN, 12));
     601                        lM01Sector.setText("Sector:");
     602
     603                        lM01Colour = new JLabel();
     604                        lM01Colour.setBounds(new Rectangle(120, 295, 180, 20));
     605                        lM01Colour.setFont(new Font("Dialog", Font.PLAIN, 12));
     606                        lM01Colour.setText("Colour:");
     607
    591608                        lM01Bearing = new JLabel();
    592                         lM01Bearing.setBounds(new Rectangle(35, 295, 180, 20));
     609                        lM01Bearing.setBounds(new Rectangle(228, 295, 180, 20));
    593610                        lM01Bearing.setFont(new Font("Dialog", Font.PLAIN, 12));
    594                         lM01Bearing.setText("         �-        �, r:");
    595 
    596                         lM01Height = new JLabel();
    597                         lM01Height.setBounds(new Rectangle(190, 295, 100, 20));
    598                         lM01Height.setFont(new Font("Dialog", Font.PLAIN, 12));
    599                         lM01Height.setText("Height:           m");
    600 
    601                         lM01Range = new JLabel();
    602                         lM01Range.setBounds(new Rectangle(300, 295, 100, 20));
    603                         lM01Range.setFont(new Font("Dialog", Font.PLAIN, 12));
    604                         lM01Range.setText("Range:          M");
     611                        lM01Bearing.setText("Brg:         ¼-        ¼, r:");
    605612
    606613                        rbM01RegionA = new JRadioButton("-A", Main.pref.get("tomsplugin.IALA")
     
    680687                        pM01SeaMap.add(getCbM01Kennung(), null);
    681688                        pM01SeaMap.add(lM01Kennung, null);
    682                         pM01SeaMap.add(getCbM01Sector(), null);
    683689                        pM01SeaMap.add(lM01Group, null);
    684690                        pM01SeaMap.add(getTfM01Group(), null);
    685691                        pM01SeaMap.add(lM01Sector, null);
     692                        pM01SeaMap.add(getCbM01Sector(), null);
     693                        pM01SeaMap.add(lM01Colour, null);
     694                        pM01SeaMap.add(getCbM01Colour(), null);
    686695                        pM01SeaMap.add(lM01Bearing, null);
    687696                        pM01SeaMap.add(getTfM01Bearing(), null);
     
    10691078        }
    10701079
     1080        private JTextField getTfM01Height() {
     1081                if (tfM01Height == null) {
     1082                        tfM01Height = new JTextField();
     1083                        tfM01Height.setBounds(new Rectangle(54, 270, 30, 20));
     1084                        tfM01Height.addFocusListener(new FocusAdapter() {
     1085                                public void focusLost(FocusEvent e) {
     1086                                        buoy.setName(tfM01Height.getText());
     1087                                }
     1088                        });
     1089                }
     1090                return tfM01Height;
     1091        }
     1092
     1093        private JTextField getTfM01Range() {
     1094                if (tfM01Range == null) {
     1095                        tfM01Range = new JTextField();
     1096                        tfM01Range.setBounds(new Rectangle(151, 270, 30, 20));
     1097                        tfM01Range.addFocusListener(new FocusAdapter() {
     1098                                public void focusLost(FocusEvent e) {
     1099                                        buoy.setName(tfM01Range.getText());
     1100                                }
     1101                        });
     1102                }
     1103                return tfM01Range;
     1104        }
     1105
     1106        private JTextField getTfM01Group() {
     1107                if (tfM01Group == null) {
     1108                        tfM01Group = new JTextField();
     1109                        tfM01Group.setBounds(new Rectangle(255, 270, 30, 20));
     1110                        tfM01Group.addFocusListener(new FocusAdapter() {
     1111                                public void focusLost(FocusEvent e) {
     1112                                        buoy.setLightGroup(tfM01Group.getText());
     1113                                }
     1114                        });
     1115                }
     1116                return tfM01Group;
     1117        }
     1118
     1119        private JTextField getTfM01RepeatTime() {
     1120                if (tfM01RepeatTime == null) {
     1121                        tfM01RepeatTime = new JTextField();
     1122                        tfM01RepeatTime.setBounds(new Rectangle(345, 270, 30, 20));
     1123                        tfM01RepeatTime.addActionListener(new ActionListener() {
     1124                                public void actionPerformed(ActionEvent e) {
     1125                                        String s = tfM01RepeatTime.getText();
     1126
     1127                                        buoy.setLightPeriod(s);
     1128                                        buoy.paintSign();
     1129                                }
     1130                        });
     1131
     1132                        tfM01RepeatTime.addFocusListener(new FocusAdapter() {
     1133                                public void focusLost(FocusEvent e) {
     1134                                        String s = tfM01RepeatTime.getText();
     1135
     1136                                        buoy.setLightPeriod(s);
     1137                                        buoy.paintSign();
     1138                                }
     1139                        });
     1140                }
     1141
     1142                return tfM01RepeatTime;
     1143        }
     1144
     1145        private JComboBox getCbM01Colour() {
     1146                if (cbM01Colour == null) {
     1147                        cbM01Colour = new JComboBox();
     1148                        cbM01Colour.setBounds(new Rectangle(165, 295, 40, 20));
     1149                        cbM01Colour.setFont(new Font("Dialog", Font.PLAIN, 12));
     1150                        cbM01Colour.addItem("W");
     1151                        cbM01Colour.addItem("R");
     1152                        cbM01Colour.addItem("G");
     1153                        cbM01Colour.addActionListener(new ActionListener() {
     1154                                public void actionPerformed(ActionEvent e) {
     1155                                        int col = cbM01Colour.getSelectedIndex();
     1156                                }
     1157                        });
     1158                }
     1159                return cbM01Colour;
     1160        }
     1161
    10711162        private JComboBox getCbM01Sector() {
    10721163                if (cbM01Sector == null) {
    10731164                        cbM01Sector = new JComboBox();
    1074                         cbM01Sector.setBounds(new Rectangle(120, 270, 50, 20));
     1165                        cbM01Sector.setBounds(new Rectangle(55, 295, 50, 20));
    10751166                        cbM01Sector.setFont(new Font("Dialog", Font.PLAIN, 12));
    1076                         cbM01Sector.addItem("0");
     1167                        cbM01Sector.addItem("Com");
    10771168                        cbM01Sector.addItem("1");
    10781169                        cbM01Sector.addItem("2");
     
    10931184        }
    10941185
    1095         private JTextField getTfM01RepeatTime() {
    1096                 if (tfM01RepeatTime == null) {
    1097                         tfM01RepeatTime = new JTextField();
    1098                         tfM01RepeatTime.setBounds(new Rectangle(345, 270, 30, 20));
    1099                         tfM01RepeatTime.addActionListener(new ActionListener() {
    1100                                 public void actionPerformed(ActionEvent e) {
    1101                                         String s = tfM01RepeatTime.getText();
    1102 
    1103                                         buoy.setLightPeriod(s);
    1104                                         buoy.paintSign();
    1105                                 }
    1106                         });
    1107 
    1108                         tfM01RepeatTime.addFocusListener(new FocusAdapter() {
    1109                                 public void focusLost(FocusEvent e) {
    1110                                         String s = tfM01RepeatTime.getText();
    1111 
    1112                                         buoy.setLightPeriod(s);
    1113                                         buoy.paintSign();
    1114                                 }
    1115                         });
    1116                 }
    1117 
    1118                 return tfM01RepeatTime;
    1119         }
    1120 
    1121         private JTextField getTfM01Group() {
    1122                 if (tfM01Group == null) {
    1123                         tfM01Group = new JTextField();
    1124                         tfM01Group.setBounds(new Rectangle(243, 270, 30, 20));
    1125                         tfM01Group.addFocusListener(new FocusAdapter() {
    1126                                 public void focusLost(FocusEvent e) {
    1127                                         buoy.setLightGroup(tfM01Group.getText());
    1128                                 }
    1129                         });
    1130                 }
    1131                 return tfM01Group;
    1132         }
    1133 
    11341186        private JTextField getTfM01Bearing() {
    11351187                if (tfM01Bearing == null) {
    11361188                        tfM01Bearing = new JTextField();
    1137                         tfM01Bearing.setBounds(new Rectangle(40, 295, 30, 20));
     1189                        tfM01Bearing.setBounds(new Rectangle(255, 295, 30, 20));
    11381190                        tfM01Bearing.addFocusListener(new FocusAdapter() {
    11391191                                public void focusLost(FocusEvent e) {
     
    11481200                if (tfM02Bearing == null) {
    11491201                        tfM02Bearing = new JTextField();
    1150                         tfM02Bearing.setBounds(new Rectangle(85, 295, 30, 20));
     1202                        tfM02Bearing.setBounds(new Rectangle(300, 295, 30, 20));
    11511203                        tfM02Bearing.addFocusListener(new FocusAdapter() {
    11521204                                public void focusLost(FocusEvent e) {
     
    11611213                if (tfM01Radius == null) {
    11621214                        tfM01Radius = new JTextField();
    1163                         tfM01Radius.setBounds(new Rectangle(140, 295, 30, 20));
     1215                        tfM01Radius.setBounds(new Rectangle(355, 295, 30, 20));
    11641216                        tfM01Radius.addFocusListener(new FocusAdapter() {
    11651217                                public void focusLost(FocusEvent e) {
     
    11691221                }
    11701222                return tfM01Radius;
    1171         }
    1172 
    1173         private JTextField getTfM01Height() {
    1174                 if (tfM01Height == null) {
    1175                         tfM01Height = new JTextField();
    1176                         tfM01Height.setBounds(new Rectangle(243, 295, 30, 20));
    1177                         tfM01Height.addFocusListener(new FocusAdapter() {
    1178                                 public void focusLost(FocusEvent e) {
    1179                                         buoy.setName(tfM01Height.getText());
    1180                                 }
    1181                         });
    1182                 }
    1183                 return tfM01Height;
    1184         }
    1185 
    1186         private JTextField getTfM01Range() {
    1187                 if (tfM01Range == null) {
    1188                         tfM01Range = new JTextField();
    1189                         tfM01Range.setBounds(new Rectangle(345, 295, 30, 20));
    1190                         tfM01Range.addFocusListener(new FocusAdapter() {
    1191                                 public void focusLost(FocusEvent e) {
    1192                                         buoy.setName(tfM01Range.getText());
    1193                                 }
    1194                         });
    1195                 }
    1196                 return tfM01Range;
    11971223        }
    11981224
  • applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java

    r22979 r23000  
    364364                dlg.cbM01Kennung.removeAllItems();
    365365                dlg.cbM01Kennung.setEnabled(false);
     366                dlg.tfM01Height.setText("");
     367                dlg.tfM01Height.setEnabled(false);
     368                dlg.tfM01Range.setText("");
     369                dlg.tfM01Range.setEnabled(false);
     370                dlg.cbM01Colour.setEnabled(false);
    366371                dlg.cbM01Sector.setEnabled(false);
    367372                dlg.tfM01Group.setText("");
     
    375380                dlg.tfM01Radius.setText("");
    376381                dlg.tfM01Radius.setEnabled(false);
    377                 dlg.tfM01Height.setText("");
    378                 dlg.tfM01Height.setEnabled(false);
    379                 dlg.tfM01Range.setText("");
    380                 dlg.tfM01Range.setEnabled(false);
    381382
    382383                dlg.bM01Save.setEnabled(false);
Note: See TracChangeset for help on using the changeset viewer.