Changeset 28938 in osm for applications/editors/josm/plugins/smed2/src/panels/PanelMain.java
- Timestamp:
- 2012-11-15T19:05:19+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/panels/PanelMain.java
r28722 r28938 7 7 import java.awt.Rectangle; 8 8 import java.awt.event.ActionListener; 9 import java.io.File;10 9 11 10 import javax.swing.*; 12 11 13 12 import org.openstreetmap.josm.Main; 13 14 import smed2.Smed2Action; 14 15 15 16 import S57.S57dat; … … 28 29 } 29 30 }; 30 p ublicJButton openButton = null;31 private JButton openButton = null; 31 32 final JFileChooser fc = new JFileChooser(); 32 33 private ActionListener alOpen = new ActionListener() { 33 34 public void actionPerformed(java.awt.event.ActionEvent e) { 34 35 if (e.getSource() == openButton) { 36 messageBar.setText("Select file"); 35 37 int returnVal = fc.showOpenDialog(Main.parent); 36 38 if (returnVal == JFileChooser.APPROVE_OPTION) { 37 new S57dat(fc.getSelectedFile()); 38 messageBar.setText("Opening file"); 39 } 39 Smed2Action.panelS57.startImport(fc.getSelectedFile()); 40 } else { 41 messageBar.setText(""); 42 } 40 43 } 41 44 } … … 55 58 56 59 messageBar = new JTextField(); 57 messageBar.setBounds( new Rectangle(40, 430, 320, 20));60 messageBar.setBounds(40, 430, 320, 20); 58 61 messageBar.setEditable(false); 59 62 messageBar.setBackground(Color.WHITE); 60 63 add(messageBar); 61 64 openButton = new JButton(new ImageIcon(getClass().getResource("/images/fileButton.png"))); 62 openButton.setBounds( new Rectangle(10, 430, 20, 20));65 openButton.setBounds(10, 430, 20, 20); 63 66 add(openButton); 64 67 openButton.addActionListener(alOpen); 65 68 saveButton = new JButton(); 66 saveButton.setBounds( new Rectangle(370, 430, 100, 20));69 saveButton.setBounds(370, 430, 100, 20); 67 70 saveButton.setText(tr("Save")); 68 71 add(saveButton);
Note:
See TracChangeset
for help on using the changeset viewer.