Changeset 28722 in osm for applications/editors/josm
- Timestamp:
- 2012-09-21T19:52:00+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed2
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/build.xml
r28648 r28722 71 71 <copy todir="${plugin.build.dir}/resources"> 72 72 <fileset dir="resources"/> 73 </copy> 74 <copy todir="${plugin.build.dir}/images"> 75 <fileset dir="${plugin.src.dir}/images"/> 73 76 </copy> 74 77 <copy todir="${plugin.build.dir}/images"> -
applications/editors/josm/plugins/smed2/src/S57/S57obj.java
r28648 r28722 79 79 private static final EnumMap<Obj, String> ObjSTR = new EnumMap<Obj, String>(Obj.class); 80 80 static { 81 ObjSTR.put(Obj.UNKOBJ, ""); ObjSTR.put(Obj.ADMARE, "administrati on"); ObjSTR.put(Obj.AIRARE, "airfield"); ObjSTR.put(Obj.ACHBRT, "anchor_berth");81 ObjSTR.put(Obj.UNKOBJ, ""); ObjSTR.put(Obj.ADMARE, "administrative_area"); ObjSTR.put(Obj.AIRARE, "airfield"); ObjSTR.put(Obj.ACHBRT, "anchor_berth"); 82 82 ObjSTR.put(Obj.ACHARE, "anchorage"); ObjSTR.put(Obj.BCNCAR, "beacon_cardinal"); ObjSTR.put(Obj.BCNISD, "beacon_isolated_danger"); 83 83 ObjSTR.put(Obj.BCNLAT, "beacon_lateral"); ObjSTR.put(Obj.BCNSAW, "beacon_safe_water"); ObjSTR.put(Obj.BCNSPP, "beacon_special_purpose"); -
applications/editors/josm/plugins/smed2/src/S57/S57val.java
r28716 r28722 62 62 private static final EnumMap<CatACH, S57enum> Catach = new EnumMap<CatACH, S57enum>(CatACH.class); static {Catach.put(CatACH.ACH_UNKN, new S57enum(0, "")); 63 63 Catach.put(CatACH.ACH_UNRD, new S57enum(1, "unrestricted")); Catach.put(CatACH.ACH_DEEP, new S57enum(2, "deep_water")); Catach.put(CatACH.ACH_TANK, new S57enum(3, "tanker")); 64 Catach.put(CatACH.ACH_EXPL, new S57enum(4, "explosives")); Catach.put(CatACH.ACH_QUAR, new S57enum(5, "quarantine")); Catach.put(CatACH.ACH_SEAP, new S57enum(6, "sea -plane"));64 Catach.put(CatACH.ACH_EXPL, new S57enum(4, "explosives")); Catach.put(CatACH.ACH_QUAR, new S57enum(5, "quarantine")); Catach.put(CatACH.ACH_SEAP, new S57enum(6, "seaplane")); 65 65 Catach.put(CatACH.ACH_SMCF, new S57enum(7, "small_craft")); Catach.put(CatACH.ACH_SMCM, new S57enum(8, "small_craft_mooring")); Catach.put(CatACH.ACH_H24P, new S57enum(9, "24_hour")); 66 66 Catach.put(CatACH.ACH_LTPD, new S57enum(10, "limited_period")); Catach.put(CatACH.ACH_NPSH, new S57enum(11, "non_pushing")); Catach.put(CatACH.ACH_DRYC, new S57enum(12, "dry_cargo")); -
applications/editors/josm/plugins/smed2/src/panels/PanelMain.java
r28648 r28722 7 7 import java.awt.Rectangle; 8 8 import java.awt.event.ActionListener; 9 import java.io.File; 9 10 10 11 import javax.swing.*; 12 13 import org.openstreetmap.josm.Main; 14 15 import S57.S57dat; 11 16 12 17 public class PanelMain extends JPanel { … … 21 26 public void actionPerformed(java.awt.event.ActionEvent e) { 22 27 // item.saveSign(???); 28 } 29 }; 30 public JButton openButton = null; 31 final JFileChooser fc = new JFileChooser(); 32 private ActionListener alOpen = new ActionListener() { 33 public void actionPerformed(java.awt.event.ActionEvent e) { 34 if (e.getSource() == openButton) { 35 int returnVal = fc.showOpenDialog(Main.parent); 36 if (returnVal == JFileChooser.APPROVE_OPTION) { 37 new S57dat(fc.getSelectedFile()); 38 messageBar.setText("Opening file"); 39 } 40 } 23 41 } 24 42 }; … … 37 55 38 56 messageBar = new JTextField(); 39 messageBar.setBounds(new Rectangle( 10, 430, 350, 20));57 messageBar.setBounds(new Rectangle(40, 430, 320, 20)); 40 58 messageBar.setEditable(false); 41 59 messageBar.setBackground(Color.WHITE); 42 60 add(messageBar); 61 openButton = new JButton(new ImageIcon(getClass().getResource("/images/fileButton.png"))); 62 openButton.setBounds(new Rectangle(10, 430, 20, 20)); 63 add(openButton); 64 openButton.addActionListener(alOpen); 43 65 saveButton = new JButton(); 44 66 saveButton.setBounds(new Rectangle(370, 430, 100, 20)); -
applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java
r28705 r28722 1 1 package smed2; 2 2 3 import java.awt.Dialog; 3 4 import java.awt.Dimension; 4 5 import java.awt.event.ActionEvent; … … 52 53 }); 53 54 frame.setSize(new Dimension(480, 480)); 55 frame.setLocation(100, 200); 56 frame.setAlwaysOnTop(true); 54 57 frame.setVisible(true); 55 58 panelMain = new PanelMain();
Note:
See TracChangeset
for help on using the changeset viewer.