Changeset 23393 in osm for applications
- Timestamp:
- 2010-09-29T00:12:24+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/build.xml
r23392 r23393 46 46 <property name="plugin.build.dir" value="build"/> 47 47 <property name="plugin.src.dir" value="src"/> 48 <property name="smed.build.dir" value="../../../smed/build"/> 49 <property name="smed.src.dir" value="../../../smed/src"/> 48 50 <!-- this is the directory where the plugin jar is copied to --> 49 51 <property name="plugin.dist.dir" value="../../../../dist"/> 50 52 <property name="ant.build.javac.target" value="1.5"/> 51 <property name="plugin.dist.dir" value="../../../../dist"/>52 53 <property name="plugin.jar" value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/> 53 54 … … 63 64 <!-- 64 65 ********************************************************** 66 ** init_smed - initializes the build of smed 67 ********************************************************** 68 --> 69 <target name="init_smed"> 70 <mkdir dir="${smed.build.dir}"/> 71 </target> 72 73 <!-- 74 ********************************************************** 75 ** compile_smed - compiles the source tree of smed 76 ********************************************************** 77 --> 78 <target name="compile_smed" depends="init_smed"> 79 <echo message="compiling sources for smed.jar ... "/> 80 <javac srcdir="${smed.src.dir}" classpath="${josm}" debug="true" destdir="${smed.build.dir}"> 81 <compilerarg value="-Xlint:deprecation"/> 82 <compilerarg value="-Xlint:unchecked"/> 83 </javac> 84 </target> 85 86 <!-- 87 ********************************************************** 88 ** dist_smed - creates smed.jar 89 ********************************************************** 90 --> 91 <target name="dist_smed" depends="compile_smed"> 92 <echo message="creating smed.jar ... "/> 93 94 <copy todir="${smed.build.dir}/images"> 95 <fileset dir="${smed.src.dir}/images"/> 96 </copy> 97 98 <copy todir="${smed.build.dir}/images"> 99 <fileset dir="../../../smed/images"/> 100 </copy> 101 102 <copy todir="${smed.build.dir}/smed/msg"> 103 <fileset dir="${smed.src.dir}/smed/msg"/> 104 </copy> 105 106 <copy todir="${smed.build.dir}"> 107 <fileset dir="../../../smed"> 108 <include name="*.txt" /> 109 </fileset> 110 </copy> 111 112 <jar destfile="${smed}" basedir="${smed.build.dir}"> 113 <!-- 114 ************************************************ 115 ** configure these properties. Most of them will be copied to the plugins 116 ** manifest file. Property values will also show up in the list available 117 ** plugins: http://josm.openstreetmap.de/wiki/Plugins. 118 ** 119 ************************************************ 120 --> 121 <manifest> 122 <attribute name="Author" value="Werner"/> 123 <attribute name="Plugin-Class" value="smed.Smed"/> 124 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 125 <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/> 126 <attribute name="Plugin-Icon" value="images/Smed.png"/> 127 <attribute name="Plugin-Link" value="http://openseamap.org/"/> 128 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 129 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 130 </manifest> 131 </jar> 132 </target> 133 134 <!-- 135 ********************************************************** 65 136 ** compile - complies the source tree 66 137 ********************************************************** 67 138 --> 68 <target name="compile" depends="init ">139 <target name="compile" depends="init,dist_smed"> 69 140 <echo message="compiling sources for ${plugin.jar} ... "/> 70 141 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}"> … … 73 144 </javac> 74 145 </target> 146 75 147 76 148 <!-- -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/OSeaM.java
r23382 r23393 10 10 public class OSeaM implements SmedPluggable { 11 11 12 private OSeaMAction os = null;12 private OSeaMAction osm = null; 13 13 14 14 @Override 15 15 public JComponent getComponent() { 16 os = new OSeaMAction();17 os .init();18 return os .getPM01SeaMap();16 osm = new OSeaMAction(); 17 osm.init(); 18 return osm.getPM01SeaMap(); 19 19 } 20 20 … … 39 39 @Override 40 40 public boolean stop() { 41 // TODO Auto-generated method stub42 return false;41 osm.closePanel(); 42 return true; 43 43 } 44 44 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r23387 r23393 55 55 // SmpDialogAction 56 56 private Buoy buoy = null; // Variable f�r Objekte des Typs "Tonne" // 57 private boolean isOpen = false; // zeigt den Status des Dialogs an58 57 private Node onode = null; // gemerkter Knoten 59 58 private Buoy obuoy = null; // gemerkte Tonne // @jve:decl-index=0: … … 187 186 } 188 187 189 public boolean isOpen() {190 return isOpen;191 }192 193 public void setOpen(boolean isOpen) {194 this.isOpen = isOpen;195 }196 197 188 public String getOs() { 198 189 return Os; … … 211 202 } 212 203 213 public void CloseDialog() {204 public void closePanel() { 214 205 onode = null; 215 206 DataSet.removeSelectionListener(SmpListener); 216 207 Selection = null; 217 218 /*219 if (isOpen)220 dM01SeaMap.dispose();221 */222 isOpen = false;223 208 } 224 209 … … 226 211 onode = null; 227 212 obuoy = null; 228 setOpen(true);229 213 230 214 /* -
applications/editors/josm/plugins/smed/src/smed/Smed.java
r23382 r23393 32 32 33 33 private JMenuItem item; 34 private SmedTabAction SmedTab;35 private List<SmedPluggable> plugins = null;34 private SmedTabAction smedTab; 35 // private List<SmedPluggable> plugins = null; 36 36 37 37 public Smed(PluginInformation info) { … … 135 135 } 136 136 137 SmedTab = new SmedTabAction(); 138 item = Main.main.menu.toolsMenu.add(SmedTab); 139 137 smedTab = new SmedTabAction(); 138 item = Main.main.menu.toolsMenu.add(smedTab); 139 smedTab.setOsmItem(item); 140 140 141 item.setEnabled(false); 141 142 … … 148 149 } else { 149 150 item.setEnabled(false); 150 // SmpDialog.CloseDialog();151 smedTab.closeDialog(); 151 152 } 152 153 } 153 154 155 /* 154 156 public void setPlugins(List<SmedPluggable> plugins) { 155 157 this.plugins = plugins; 156 158 157 159 } 160 */ 158 161 159 162 } -
applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabAction.java
r23389 r23393 10 10 11 11 import javax.swing.JFrame; 12 import javax.swing.JMenuItem; 12 13 import javax.swing.SwingUtilities; 13 14 import javax.swing.UIManager; … … 28 29 private SmedTabbedPane smedTabs = new SmedTabbedPane(); 29 30 private SmedMenuBar smedMenu = new SmedMenuBar(); 30 31 private JFrame frame = null; 32 private boolean isOpen = false; 33 private JMenuItem osmItem; 34 31 35 public SmedTabAction() { 32 36 super( "Seekarten Editor", "Smed","Seekarten Editor", Shortcut.registerShortcut( … … 44 48 } 45 49 }); 50 51 isOpen = true; 52 if (osmItem == null) return; 53 54 osmItem.setEnabled(false); 46 55 } 47 56 … … 49 58 protected void createAndShowTabs() { 50 59 //Create and set up the window. 51 JFrameframe = new JFrame("TabbedPaneDemo");60 frame = new JFrame("TabbedPaneDemo"); 52 61 frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 53 62 frame.setResizable(false); … … 65 74 66 75 76 public void closeDialog() { 77 List<SmedPluggable> plugins = SmedTabbedPane.getPlugins(); 78 79 if(plugins != null) { 80 for(SmedPluggable p : plugins) p.stop(); 81 } 82 83 if(isOpen) { 84 frame.setVisible(false); 85 frame.dispose(); 86 } 87 88 isOpen = false; 89 } 90 91 92 public void setOsmItem(JMenuItem item) { 93 osmItem = item; 94 } 95 67 96 } -
applications/editors/josm/plugins/smed_about/build.xml
r23382 r23393 48 48 <property name="smed.build.dir" value="../smed/build"/> 49 49 <property name="smed.src.dir" value="../smed/src"/> 50 <property name="smed.plugins" value="../smed/plugins"/>51 50 <!-- this is the directory where the plugin jar is copied to --> 52 51 <property name="ant.build.javac.target" value="1.5"/> -
applications/editors/josm/plugins/smed_ex/build.xml
r23382 r23393 48 48 <property name="smed.build.dir" value="../smed/build"/> 49 49 <property name="smed.src.dir" value="../smed/src"/> 50 <property name="smed.plugins" value="../smed/plugins"/>51 50 <!-- this is the directory where the plugin jar is copied to --> 52 51 <property name="ant.build.javac.target" value="1.5"/>
Note:
See TracChangeset
for help on using the changeset viewer.