Changeset 23000 in osm for applications/editors/josm
- Timestamp:
- 2010-09-05T08:49:28+02:00 (14 years ago)
- 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 64 64 * lokale Variable, private 65 65 */ 66 private SmpDialogAction dia = null; // Variable f ür den Handle von66 private SmpDialogAction dia = null; // Variable für den Handle von 67 67 // 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" // 69 69 // @jve:decl-index=0: 70 70 private boolean isOpen = false; // zeigt den Status des Dialogs an 71 71 private Node onode = null; // gemerkter Knoten 72 72 private Buoy obuoy = null; // gemerkte Tonne // @jve:decl-index=0: 73 private JMenuItem SmpItem = null; // Info über item in der Werkzeugleiste73 private JMenuItem SmpItem = null; // Info über item in der Werkzeugleiste 74 74 private String smt = ""; // value vom key "seamark:type" // @jve:decl-index=0: 75 75 private String smb = ""; // value vom key "seamark" // @jve:decl-index=0: … … 79 79 private String UserHome = ""; // @jve:decl-index=0: 80 80 81 // SelectionChangedListner der in die Eventqueue von josm eingeh ängt wird81 // SelectionChangedListner der in die Eventqueue von josm eingehängt wird 82 82 private SelectionChangedListener SmpListener = new SelectionChangedListener() { 83 83 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { … … 146 146 private JLabel lM01Kennung = null; 147 147 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; 150 151 private JLabel lM01Group = null; 151 152 public JTextField tfM01Group = null; 152 153 private JLabel lM01RepeatTime = null; 153 154 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; 155 159 private JLabel lM01Bearing = null; 156 160 public JTextField tfM01Bearing = null; 157 161 public JTextField tfM02Bearing = null; 158 162 public JTextField tfM01Radius = null; 159 public JTextField tfM01Height = null;160 private JLabel lM01Range = null;161 163 public JTextField tfM01Range = null; 162 164 public JButton bM01Save = null; … … 260 262 SmpItem.setEnabled(false); 261 263 262 // Ausprobe: M öglichkeit der Benachrichtigung, wenn etwas neu264 // Ausprobe: Möglichkeit der Benachrichtigung, wenn etwas neu 263 265 // selektiert wird (ueber SelectionChangedListener) 264 266 // private Collection<? extends OsmPrimitive> sel; 265 267 // siehe org.openstreetmap.josm.plugins.osb -> OsbLayer.java 266 // Einh ängen des Listeners in die Eventqueue von josm268 // Einhängen des Listeners in die Eventqueue von josm 267 269 DataSet.selListeners.add(SmpListener); 268 270 // DataSet.addSelectionListener(SmpListener); … … 574 576 lM01Kennung.setText("Character:"); 575 577 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"); 580 587 581 588 lM01Group = new JLabel(); 582 lM01Group.setBounds(new Rectangle( 190, 270, 100, 20));589 lM01Group.setBounds(new Rectangle(204, 270, 100, 20)); 583 590 lM01Group.setFont(new Font("Dialog", Font.PLAIN, 12)); 584 lM01Group.setText("Group: ( 591 lM01Group.setText("Group: ( )"); 585 592 586 593 lM01RepeatTime = new JLabel(); … … 589 596 lM01RepeatTime.setText("Period: s"); 590 597 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 591 608 lM01Bearing = new JLabel(); 592 lM01Bearing.setBounds(new Rectangle( 35, 295, 180, 20));609 lM01Bearing.setBounds(new Rectangle(228, 295, 180, 20)); 593 610 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:"); 605 612 606 613 rbM01RegionA = new JRadioButton("-A", Main.pref.get("tomsplugin.IALA") … … 680 687 pM01SeaMap.add(getCbM01Kennung(), null); 681 688 pM01SeaMap.add(lM01Kennung, null); 682 pM01SeaMap.add(getCbM01Sector(), null);683 689 pM01SeaMap.add(lM01Group, null); 684 690 pM01SeaMap.add(getTfM01Group(), null); 685 691 pM01SeaMap.add(lM01Sector, null); 692 pM01SeaMap.add(getCbM01Sector(), null); 693 pM01SeaMap.add(lM01Colour, null); 694 pM01SeaMap.add(getCbM01Colour(), null); 686 695 pM01SeaMap.add(lM01Bearing, null); 687 696 pM01SeaMap.add(getTfM01Bearing(), null); … … 1069 1078 } 1070 1079 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 1071 1162 private JComboBox getCbM01Sector() { 1072 1163 if (cbM01Sector == null) { 1073 1164 cbM01Sector = new JComboBox(); 1074 cbM01Sector.setBounds(new Rectangle( 120, 270, 50, 20));1165 cbM01Sector.setBounds(new Rectangle(55, 295, 50, 20)); 1075 1166 cbM01Sector.setFont(new Font("Dialog", Font.PLAIN, 12)); 1076 cbM01Sector.addItem(" 0");1167 cbM01Sector.addItem("Com"); 1077 1168 cbM01Sector.addItem("1"); 1078 1169 cbM01Sector.addItem("2"); … … 1093 1184 } 1094 1185 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 1134 1186 private JTextField getTfM01Bearing() { 1135 1187 if (tfM01Bearing == null) { 1136 1188 tfM01Bearing = new JTextField(); 1137 tfM01Bearing.setBounds(new Rectangle( 40, 295, 30, 20));1189 tfM01Bearing.setBounds(new Rectangle(255, 295, 30, 20)); 1138 1190 tfM01Bearing.addFocusListener(new FocusAdapter() { 1139 1191 public void focusLost(FocusEvent e) { … … 1148 1200 if (tfM02Bearing == null) { 1149 1201 tfM02Bearing = new JTextField(); 1150 tfM02Bearing.setBounds(new Rectangle( 85, 295, 30, 20));1202 tfM02Bearing.setBounds(new Rectangle(300, 295, 30, 20)); 1151 1203 tfM02Bearing.addFocusListener(new FocusAdapter() { 1152 1204 public void focusLost(FocusEvent e) { … … 1161 1213 if (tfM01Radius == null) { 1162 1214 tfM01Radius = new JTextField(); 1163 tfM01Radius.setBounds(new Rectangle( 140, 295, 30, 20));1215 tfM01Radius.setBounds(new Rectangle(355, 295, 30, 20)); 1164 1216 tfM01Radius.addFocusListener(new FocusAdapter() { 1165 1217 public void focusLost(FocusEvent e) { … … 1169 1221 } 1170 1222 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;1197 1223 } 1198 1224 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r22979 r23000 364 364 dlg.cbM01Kennung.removeAllItems(); 365 365 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); 366 371 dlg.cbM01Sector.setEnabled(false); 367 372 dlg.tfM01Group.setText(""); … … 375 380 dlg.tfM01Radius.setText(""); 376 381 dlg.tfM01Radius.setEnabled(false); 377 dlg.tfM01Height.setText("");378 dlg.tfM01Height.setEnabled(false);379 dlg.tfM01Range.setText("");380 dlg.tfM01Range.setEnabled(false);381 382 382 383 dlg.bM01Save.setEnabled(false);
Note:
See TracChangeset
for help on using the changeset viewer.