Changeset 27863 in osm for applications/editors/josm
- Timestamp:
- 2012-02-18T18:03:10+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/colorscheme/build.xml
r26605 r27863 18 18 ** 19 19 ** To build against the core in ../../core, create a correct manifest and deploy to 20 ** SVN, 20 ** SVN, 21 21 ** set the properties commit.message and plugin.main.version 22 22 ** and run … … 27 27 <project name="colorscheme" default="dist" basedir="."> 28 28 <property name="commit.message" value="Uses new constructor for Plugin"/> 29 <property name="plugin.main.version" value="4 394"/>29 <property name="plugin.main.version" value="4968"/> 30 30 <property name="josm" location="../../core/dist/josm-custom.jar"/> 31 31 <property name="plugin.dist.dir" value="../../dist"/> … … 87 87 </target> 88 88 <!-- 89 ************************** Publishing the plugin *********************************** 89 ************************** Publishing the plugin *********************************** 90 90 --> 91 91 <!-- 92 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 92 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 93 93 ** property ${coreversion.info.entry.revision} 94 94 ** … … 136 136 </target> 137 137 <!-- 138 ** commits the plugin.jar 138 ** commits the plugin.jar 139 139 --> 140 140 <target name="commit-dist"> 141 141 <echo> 142 142 ***** Properties of published ${plugin.jar} ***** 143 Commit message : '${commit.message}' 143 Commit message : '${commit.message}' 144 144 Plugin-Mainversion: ${plugin.main.version} 145 145 JOSM build version: ${coreversion.info.entry.revision} 146 146 Plugin-Version : ${version.entry.commit.revision} 147 ***** / Properties of published ${plugin.jar} ***** 148 147 ***** / Properties of published ${plugin.jar} ***** 148 149 149 Now commiting ${plugin.jar} ... 150 150 </echo> -
applications/editors/josm/plugins/colorscheme/src/at/dallermassl/josm/plugin/colorscheme/ColorSchemePreference.java
r21563 r27863 28 28 29 29 import org.openstreetmap.josm.Main; 30 import org.openstreetmap.josm.gui.preferences. ColorPreference;30 import org.openstreetmap.josm.gui.preferences.display.ColorPreference; 31 31 import org.openstreetmap.josm.gui.preferences.PreferenceDialog; 32 32 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 33 33 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 34 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting; 35 import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting; 34 36 import org.openstreetmap.josm.tools.GBC; 35 37 36 public class ColorSchemePreference implements PreferenceSetting {38 public class ColorSchemePreference implements SubPreferenceSetting { 37 39 private static final String PREF_KEY_SCHEMES_PREFIX = "colorschemes."; 38 40 private static final String PREF_KEY_SCHEMES_NAMES = PREF_KEY_SCHEMES_PREFIX + "names"; … … 53 55 * @see org.openstreetmap.josm.gui.preferences.PreferenceSetting#addGui(org.openstreetmap.josm.gui.preferences.PreferenceDialog) 54 56 */ 57 @Override 55 58 public void addGui(final PreferenceTabbedPane gui) { 56 59 JPanel panel = new JPanel(new GridBagLayout()); … … 125 128 JScrollPane scrollpane = new JScrollPane(panel); 126 129 scrollpane.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 )); 127 gui.displaycontent.addTab(tr("Color Schemes"), scrollpane); 130 gui.getDisplayPreference().displaycontent.addTab(tr("Color Schemes"), scrollpane); 131 } 132 133 @Override 134 public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) { 135 return gui.getDisplayPreference(); 128 136 } 129 137 … … 141 149 } 142 150 151 @Override 143 152 public boolean ok() { 144 153 return false;// nothing to do 154 } 155 156 @Override 157 public boolean isExpert() { 158 return false; 145 159 } 146 160 -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/Preferences.java
r19347 r27863 5 5 6 6 import org.openstreetmap.josm.Main; 7 import org.openstreetmap.josm.gui.preferences. PreferenceSetting;7 import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting; 8 8 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 9 9 /** … … 11 11 * @author radek 12 12 */ 13 public class Preferences extends javax.swing.JPanel implements PreferenceSetting { 13 public class Preferences extends DefaultTabPreferenceSetting { 14 15 public JPanel thisPanel; 14 16 15 17 public int optimize; … … 38 40 /** Creates new form Preferences */ 39 41 private Preferences() { 42 super("czech_flag", 43 "Nastavení CzechAddressPlugin", 44 "Nastavení pluginu pro úpravu a zadávání adres na území ČR."); 45 thisPanel = new JPanel(); 40 46 initComponents(); 41 47 addBuildingTag = Main.pref.getBoolean(KEY_BUILDINGTAG, buildingCheckBox.isSelected()); … … 73 79 buildingCheckBox = new javax.swing.JCheckBox(); 74 80 75 setLayout(new java.awt.GridLayout(1, 0));81 thisPanel.setLayout(new java.awt.GridLayout(1, 0)); 76 82 77 83 addNewTagCheckBox.setText("Novým primitivám přidávat tag:"); … … 153 159 ); 154 160 155 add(mainPanel);161 thisPanel.add(mainPanel); 156 162 }// </editor-fold>//GEN-END:initComponents 157 163 … … 174 180 175 181 public void addGui(PreferenceTabbedPane gui) { 176 JPanel p = gui.createPreferenceTab("czech_flag", 177 "Nastavení CzechAddressPlugin", 178 "Nastavení pluginu pro úpravu a zadávání adres na území ČR."); 182 JPanel p = gui.createPreferenceTab(this); 179 183 p.add(mainPanel); 180 184 reloadSettings(); -
applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/ExtToolsPreference.java
r21930 r27863 8 8 import javax.swing.JScrollPane; 9 9 10 import org.openstreetmap.josm.gui.preferences. PreferenceSetting;10 import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting; 11 11 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 12 12 import org.openstreetmap.josm.tools.GBC; … … 14 14 import ext_tools.ExtToolsPlugin; 15 15 16 public class ExtToolsPreference implementsPreferenceSetting {16 public class ExtToolsPreference extends DefaultTabPreferenceSetting { 17 17 18 18 ExtToolsPlugin plugin; 19 19 20 20 public ExtToolsPreference(ExtToolsPlugin plugin) { 21 super("ext", tr("External tools"), tr("Use external scripts in JOSM")); 21 22 this.plugin = plugin; 22 23 } … … 24 25 @Override 25 26 public void addGui(PreferenceTabbedPane gui) { 26 JPanel p = gui.createPreferenceTab("ext", tr("External tools"), 27 tr("Use external scripts in JOSM")); 27 JPanel p = gui.createPreferenceTab(this); 28 28 MyToolsPanel tp = new MyToolsPanel(plugin.myTools); 29 29 tp.refresh(); -
applications/editors/josm/plugins/graphview/build.xml
r26990 r27863 27 27 <project name="graphview" default="dist" basedir="."> 28 28 <property name="commit.message" value="option to change graph colors; closes ticket 5523 in JOSM Trac"/> 29 <property name="plugin.main.version" value="4 549"/>29 <property name="plugin.main.version" value="4968"/> 30 30 <property name="josm" location="../../core/dist/josm-custom.jar"/> 31 31 <property name="plugin.build.dir" value="build"/> -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewPreferenceEditor.java
r26481 r27863 36 36 import javax.swing.event.ChangeListener; 37 37 38 import org.openstreetmap.josm.gui.preferences. PreferenceSetting;38 import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting; 39 39 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 40 40 import org.openstreetmap.josm.plugins.graphview.plugin.dialogs.AccessParameterDialog.BookmarkAction; … … 45 45 import org.openstreetmap.josm.tools.GBC; 46 46 47 public class GraphViewPreferenceEditor implementsPreferenceSetting {47 public class GraphViewPreferenceEditor extends DefaultTabPreferenceSetting { 48 48 49 49 private File rulesetFolder; … … 71 71 private JPanel arrowPreviewPanel; 72 72 73 public GraphViewPreferenceEditor() { 74 super("graphview", tr("Graphview"), 75 tr("Settings for the Graphview plugin that visualizes routing graphs.")); 76 } 77 73 78 public void addGui(PreferenceTabbedPane gui) { 74 79 75 80 readPreferences(); 76 81 77 preferencePanel = gui.createPreferenceTab("graphview", tr("Graphview"), 78 tr("Settings for the Graphview plugin that visualizes routing graphs.")); 82 preferencePanel = gui.createPreferenceTab(this); 79 83 80 84 JPanel mainPanel = createMainPanel(); -
applications/editors/josm/plugins/imagery-xml-bounds/build.xml
r27015 r27863 32 32 <property name="commit.message" value="Commit message"/> 33 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="4 577"/>34 <property name="plugin.main.version" value="4987"/> 35 35 <!-- should not be necessary to change the following properties --> 36 36 <property name="josm" location="../../core/dist/josm-custom.jar"/> … … 150 150 </target> 151 151 <!-- 152 ************************** Publishing the plugin *********************************** 153 --> 154 <!-- 155 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 152 ************************** Publishing the plugin *********************************** 153 --> 154 <!-- 155 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 156 156 ** property ${coreversion.info.entry.revision} 157 157 --> … … 197 197 <echo> 198 198 ***** Properties of published ${plugin.jar} ***** 199 Commit message : '${commit.message}' 199 Commit message : '${commit.message}' 200 200 Plugin-Mainversion: ${plugin.main.version} 201 201 JOSM build version: ${coreversion.info.entry.revision} 202 202 Plugin-Version : ${version.entry.commit.revision} 203 ***** / Properties of published ${plugin.jar} ***** 204 203 ***** / Properties of published ${plugin.jar} ***** 204 205 205 Now commiting ${plugin.jar} ... 206 206 </echo> -
applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsPreferenceSetting.java
r27015 r27863 18 18 import javax.swing.JButton; 19 19 20 import org.openstreetmap.josm.gui.preferences.ImageryPreference; 21 import org.openstreetmap.josm.gui.preferences.ImageryPreference.ImageryProvidersPanel; 22 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 20 import org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference; 21 import org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference.ImageryProvidersPanel; 22 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting; 23 import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting; 23 24 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 24 25 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.EditEntriesAction; 25 26 26 27 /** 27 * 28 * 28 29 * @author Don-vip 29 30 * 30 31 */ 31 public class XmlBoundsPreferenceSetting implements PreferenceSetting {32 public class XmlBoundsPreferenceSetting implements SubPreferenceSetting { 32 33 33 @Override 34 public void addGui(PreferenceTabbedPane gui) { 35 for (PreferenceSetting ps : gui.getSettings()) { 36 if (ps instanceof ImageryPreference) { 37 ImageryProvidersPanel ipp = ((ImageryPreference) ps).getProvidersPanel(); 38 EditEntriesAction action = new EditEntriesAction(ipp.defaultTable, ipp.defaultModel); 39 ipp.middleToolbar.add(new JButton(action)); 40 // TODO 41 break; 42 } 43 } 44 } 34 @Override 35 public void addGui(PreferenceTabbedPane gui) { 36 ImageryProvidersPanel ipp = gui.getImageryPreference().getProvidersPanel(); 37 EditEntriesAction action = new EditEntriesAction(ipp.defaultTable, ipp.defaultModel); 38 ipp.middleToolbar.add(new JButton(action)); 39 } 45 40 46 @Override 47 public boolean ok() { 48 return false; 49 } 41 @Override 42 public boolean ok() { 43 return false; 44 } 45 46 @Override 47 public boolean isExpert() { 48 return false; 49 } 50 51 public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) { 52 return gui.getImageryPreference(); 53 } 54 50 55 } -
applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/EditEntriesAction.java
r27015 r27863 30 30 import org.openstreetmap.josm.actions.JosmAction; 31 31 import org.openstreetmap.josm.data.imagery.ImageryInfo; 32 import org.openstreetmap.josm.gui.preferences. ImageryPreference.ImageryProvidersPanel.ImageryDefaultLayerTableModel;32 import org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference.ImageryProvidersPanel.ImageryDefaultLayerTableModel; 33 33 import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsConstants; 34 34 import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsLayer; … … 39 39 40 40 protected static final String ACTION_NAME = tr("Edit"); 41 41 42 42 private final JTable defaultTable; 43 43 private final ImageryDefaultLayerTableModel defaultModel; 44 44 45 45 private final List<ImageryInfo> entries; 46 46 47 47 public EditEntriesAction(JTable defaultTable, ImageryDefaultLayerTableModel defaultModel) { 48 48 putValue(SHORT_DESCRIPTION, tr("edit bounds for selected defaults")); … … 59 59 setEnabled(false); 60 60 } 61 61 62 62 @Override 63 63 public void actionPerformed(ActionEvent e) { … … 83 83 entries.clear(); 84 84 for (int row : defaultTable.getSelectedRows()) { 85 ImageryInfo info = defaultModel.getRow(row); 85 ImageryInfo info = defaultModel.getRow(row); 86 86 if (info != null && info.getBounds() != null) { 87 87 entries.add(info); -
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java
r19624 r27863 11 11 12 12 import org.openstreetmap.josm.Main; 13 import org.openstreetmap.josm.gui.preferences. PreferenceSetting;13 import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting; 14 14 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 15 15 import org.openstreetmap.josm.tools.GBC; 16 16 import org.openstreetmap.josm.tools.I18n; 17 17 18 public class LakewalkerPreferences implementsPreferenceSetting {18 public class LakewalkerPreferences extends DefaultTabPreferenceSetting { 19 19 public static final String[] DIRECTIONS = new String[] 20 20 {marktr("east"), marktr("northeast"), marktr("north"), marktr("northwest"), … … 68 68 protected JLabel sourceLabel = new JLabel(tr("Source text")); 69 69 70 public LakewalkerPreferences() { 71 super("lakewalker.png", I18n.tr("Lakewalker Plugin Preferences"), tr("A plugin to trace water bodies on Landsat imagery.")); 72 } 73 70 74 public void addGui(PreferenceTabbedPane gui) { 71 75 maxSegsConfig.setToolTipText(tr("Maximum number of segments allowed in each generated way. Default 250.")); … … 85 89 86 90 String description = tr("A plugin to trace water bodies on Landsat imagery."); 87 JPanel prefPanel = gui.createPreferenceTab( "lakewalker.png", I18n.tr("Lakewalker Plugin Preferences"), description);91 JPanel prefPanel = gui.createPreferenceTab(this); 88 92 buildPreferences(prefPanel); 89 93
Note:
See TracChangeset
for help on using the changeset viewer.