Ignore:
Timestamp:
2012-09-21T19:52:00+02:00 (12 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed2
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/build.xml

    r28648 r28722  
    7171        <copy todir="${plugin.build.dir}/resources">
    7272            <fileset dir="resources"/>
     73        </copy>
     74        <copy todir="${plugin.build.dir}/images">
     75            <fileset dir="${plugin.src.dir}/images"/>
    7376        </copy>
    7477        <copy todir="${plugin.build.dir}/images">
  • applications/editors/josm/plugins/smed2/src/S57/S57obj.java

    r28648 r28722  
    7979        private static final EnumMap<Obj, String> ObjSTR = new EnumMap<Obj, String>(Obj.class);
    8080        static {
    81                 ObjSTR.put(Obj.UNKOBJ, "");     ObjSTR.put(Obj.ADMARE, "administration");       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");
    8282                ObjSTR.put(Obj.ACHARE, "anchorage"); ObjSTR.put(Obj.BCNCAR, "beacon_cardinal"); ObjSTR.put(Obj.BCNISD, "beacon_isolated_danger");
    8383                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  
    6262        private static final EnumMap<CatACH, S57enum> Catach = new EnumMap<CatACH, S57enum>(CatACH.class); static {Catach.put(CatACH.ACH_UNKN, new S57enum(0, ""));
    6363                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"));
    6565                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"));
    6666                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  
    77import java.awt.Rectangle;
    88import java.awt.event.ActionListener;
     9import java.io.File;
    910
    1011import javax.swing.*;
     12
     13import org.openstreetmap.josm.Main;
     14
     15import S57.S57dat;
    1116
    1217public class PanelMain extends JPanel {
     
    2126                public void actionPerformed(java.awt.event.ActionEvent e) {
    2227//                      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      }
    2341                }
    2442        };
     
    3755               
    3856    messageBar = new JTextField();
    39     messageBar.setBounds(new Rectangle(10, 430, 350, 20));
     57    messageBar.setBounds(new Rectangle(40, 430, 320, 20));
    4058    messageBar.setEditable(false);
    4159    messageBar.setBackground(Color.WHITE);
    4260    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);
    4365                saveButton = new JButton();
    4466                saveButton.setBounds(new Rectangle(370, 430, 100, 20));
  • applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java

    r28705 r28722  
    11package smed2;
    22
     3import java.awt.Dialog;
    34import java.awt.Dimension;
    45import java.awt.event.ActionEvent;
     
    5253                });
    5354                frame.setSize(new Dimension(480, 480));
     55                frame.setLocation(100, 200);
     56                frame.setAlwaysOnTop(true);
    5457                frame.setVisible(true);
    5558                panelMain = new PanelMain();
Note: See TracChangeset for help on using the changeset viewer.