Changeset 23445 in osm for applications/editors/josm/plugins/smed/plugs
- Timestamp:
- 2010-10-02T21:19:01+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/OSeaM.java
r23443 r23445 12 12 13 13 private OSeaMAction osm = null; 14 public SmedPluginManager manager = null;14 public static SmedPluginManager manager = null; 15 15 private int index = -1; 16 16 … … 60 60 @Override 61 61 public boolean hasFocus() { 62 osm.hasFocus = true;63 62 osm.setQueued(); 64 System.out.println("OSeaM has Focus"); 63 65 64 return true; 66 65 } … … 69 68 public boolean lostFocus() { 70 69 osm.setDequeued(); 70 71 71 return true; 72 72 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r23443 r23445 37 37 38 38 import oseam.Messages; 39 import oseam.OSeaM; 39 40 import oseam.seamarks.SeaMark; 40 41 import oseam.seamarks.buoys.Buoy; … … 65 66 private String UserHome = ""; // @jve:decl-index=0: //$NON-NLS-1$ 66 67 public boolean hasFocus = false; 68 public static String errMsg = ""; 67 69 68 70 // SelectionChangedListner der in die Eventqueue von josm eingehängt wird … … 159 161 public JButton bM01Close = null; 160 162 public JCheckBox cM01IconVisible = null; 161 public JTextField sM01StatusBar = null;162 163 163 164 public boolean paintlock = false; … … 234 235 235 236 public void setQueued() { 236 System.out.println("OSeaM is queued"); 237 hasFocus = true; 238 OSeaM.manager.showVisualMessage(errMsg); 237 239 DataSet.addSelectionListener(SmpListener); 238 240 } 239 241 240 242 public void setDequeued() { 241 System.out.println("OSeaM is dequeued"); 243 hasFocus = false; 244 242 245 DataSet.removeSelectionListener(SmpListener); 243 246 } … … 716 719 pM01SeaMap.add(lM01RadarMark, null); 717 720 pM01SeaMap.add(getBM01Save(), null); 718 pM01SeaMap.add(getSM01StatusBar(), null);719 721 pM01SeaMap.add(getBM01Close(), null); 720 722 pM01SeaMap.add(getCM01IconVisible(), null); … … 1406 1408 return cM01IconVisible; 1407 1409 } 1408 1409 private JTextField getSM01StatusBar() {1410 if (sM01StatusBar == null) {1411 sM01StatusBar = new JTextField();1412 sM01StatusBar.setBounds(new Rectangle(7, 355, 385, 20));1413 sM01StatusBar.setBackground(SystemColor.activeCaptionBorder);1414 }1415 return sM01StatusBar;1416 }1417 1418 1410 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/buoys/Buoy.java
r23382 r23445 13 13 14 14 import oseam.Messages; 15 import oseam.OSeaM; 15 16 import oseam.dialogs.OSeaMAction; 16 17 import oseam.seamarks.SeaMark; 17 18 18 19 19 abstract public class Buoy extends SeaMark { … … 512 512 513 513 public void paintSign() { 514 515 if (getErrMsg() != null) { 516 String str = getErrMsg(); 517 518 OSeaM.manager.showVisualMessage(str); 519 OSeaMAction.errMsg = str; 520 } 514 521 515 522 if (dlg.paintlock) … … 797 804 String str = dlg.tfM01Name.getText(); 798 805 if (!str.isEmpty()) 799 Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:name",800 str));801 Main.main.undoRedo 802 .add(new ChangePropertyCommand(Node, "seamark:type",type));806 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 807 "seamark:name", str)); 808 Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:type", 809 type)); 803 810 } 804 811 … … 845 852 if ((Bearing1[i] != null) && (Bearing2[i] != null) 846 853 && (Radius[i] != null)) 847 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 848 "seamark:light:" + i, "red:" + Bearing1[i] + ":" 849 + Bearing2[i] + ":" + Radius[i])); 854 Main.main.undoRedo.add(new ChangePropertyCommand( 855 Node, "seamark:light:" + i, "red:" 856 + Bearing1[i] + ":" + Bearing2[i] 857 + ":" + Radius[i])); 850 858 } else if (colour.equals("G")) { 851 859 Main.main.undoRedo.add(new ChangePropertyCommand(Node, … … 853 861 if ((Bearing1[i] != null) && (Bearing2[i] != null) 854 862 && (Radius[i] != null)) 855 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 856 "seamark:light:" + i, "green:" + Bearing1[i] + ":" 857 + Bearing2[i] + ":" + Radius[i])); 863 Main.main.undoRedo.add(new ChangePropertyCommand( 864 Node, "seamark:light:" + i, "green:" 865 + Bearing1[i] + ":" + Bearing2[i] 866 + ":" + Radius[i])); 858 867 } else if (colour.equals("W")) { 859 868 Main.main.undoRedo.add(new ChangePropertyCommand(Node, … … 861 870 if ((Bearing1[i] != null) && (Bearing2[i] != null) 862 871 && (Radius[i] != null)) 863 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 864 "seamark:light:" + i, "white:" + Bearing1[i] + ":" 865 + Bearing2[i] + ":" + Radius[i])); 872 Main.main.undoRedo.add(new ChangePropertyCommand( 873 Node, "seamark:light:" + i, "white:" 874 + Bearing1[i] + ":" + Bearing2[i] 875 + ":" + Radius[i])); 866 876 } 867 877 … … 887 897 888 898 if (Bearing1[i] != null) 889 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 890 "seamark:light:" + i + ":sector_start", Bearing1[i])); 899 Main.main.undoRedo 900 .add(new ChangePropertyCommand(Node, 901 "seamark:light:" + i + ":sector_start", 902 Bearing1[i])); 891 903 892 904 if (Bearing2[i] != null) … … 917 929 "seamark:radar_transponder:category", "racon")); 918 930 if (!getRaconGroup().isEmpty()) 919 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 920 "seamark:radar_transponder:group", getRaconGroup())); 931 Main.main.undoRedo 932 .add(new ChangePropertyCommand(Node, 933 "seamark:radar_transponder:group", 934 getRaconGroup())); 921 935 break; 922 936 case RATYPE_RAMARK: -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/buoys/BuoyCard.java
r23382 r23445 177 177 return; 178 178 super.paintSign(); 179 180 dlg.sM01StatusBar.setText(getErrMsg());181 179 182 180 if (isValid()) { -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/buoys/BuoyIsol.java
r23382 r23445 115 115 116 116 super.paintSign(); 117 118 dlg.sM01StatusBar.setText(getErrMsg());119 117 120 118 if (isValid()) { -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/buoys/BuoyLat.java
r23382 r23445 363 363 super.paintSign(); 364 364 365 dlg.sM01StatusBar.setText(getErrMsg());366 367 365 if (isValid()) { 368 366 dlg.tfM01Name.setEnabled(true); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/buoys/BuoyNota.java
r23382 r23445 87 87 super.paintSign(); 88 88 89 dlg.sM01StatusBar.setText(getErrMsg());90 91 89 if (isValid()) { 92 90 dlg.cM01Radar.setVisible(true); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/buoys/BuoySaw.java
r23382 r23445 110 110 return; 111 111 super.paintSign(); 112 113 dlg.sM01StatusBar.setText(getErrMsg());114 112 115 113 if (isValid()) { -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/buoys/BuoySpec.java
r23382 r23445 166 166 return; 167 167 super.paintSign(); 168 169 dlg.sM01StatusBar.setText(getErrMsg());170 168 171 169 if (isValid()) { -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/buoys/BuoyUkn.java
r23382 r23445 16 16 super.paintSign(); 17 17 18 if (getErrMsg() != null)19 dlg.sM01StatusBar.setText(getErrMsg());20 21 18 setErrMsg(null); 22 19 } -
applications/editors/josm/plugins/smed/plugs/smed_about/src/smed_about/SmedAbout.java
r23443 r23445 13 13 public class SmedAbout implements SmedPluggable{ 14 14 15 public SmedPluginManager manager = null; 16 15 17 private boolean visible = true; 16 18 private int index = -1; 19 private String msg = ""; 17 20 18 21 private JPanel jPanel = null; // @jve:decl-index=0:visual-constraint="43,24" … … 39 42 @Override 40 43 public void setPluginManager(SmedPluginManager manager) { 41 // TODO Auto-generated method stub 42 44 this.manager = manager; 43 45 } 44 46 45 47 @Override 46 48 public String getInfo() { 47 48 49 return "something about the programm"; 49 50 } … … 51 52 @Override 52 53 public JComponent getComponent() { 53 54 manager.showVisualMessage(msg); 54 55 return getJPanel(); 55 56 } … … 87 88 @Override 88 89 public ImageIcon getIcon() { 89 90 90 return null; 91 91 } … … 93 93 @Override 94 94 public boolean hasFocus() { 95 // TODO Auto-generated method stub96 return false;95 manager.showVisualMessage(msg); 96 return true; 97 97 } 98 98 -
applications/editors/josm/plugins/smed/plugs/smed_ex/src/smed_ex/SmedEx.java
r23443 r23445 8 8 import smed.plug.ifc.SmedPluginManager; 9 9 import javax.swing.JPanel; 10 import java.awt.GridBagLayout;11 10 import java.awt.Dimension; 12 11 import javax.swing.JButton; 12 13 13 import java.awt.Rectangle; 14 14 import java.awt.event.ActionEvent; … … 20 20 public SmedPluginManager manager = null; 21 21 private int index = -1; 22 private String msg = "press button 'Hello World!' and see, how it works"; 22 23 23 24 private JPanel jPanel = null; // @jve:decl-index=0:visual-constraint="78,30" … … 44 45 @Override 45 46 public JComponent getComponent() { 46 47 manager.showVisualMessage(msg); 47 48 return getJPanel(); 48 49 } … … 109 110 @Override 110 111 public boolean hasFocus() { 111 // TODO Auto-generated method stub112 return false;112 manager.showVisualMessage(msg); 113 return true; 113 114 } 114 115
Note:
See TracChangeset
for help on using the changeset viewer.