Changeset 30298 in osm for applications/editors/josm/plugins/smed2/src/panels/PanelMain.java
- Timestamp:
- 2014-02-19T10:26:43+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/panels/PanelMain.java
r30285 r30298 52 52 if (e.getSource() == importButton) { 53 53 Smed2Action.panelS57.setVisible(true); 54 messageBar.setText("Select S-57 ENC file for import");54 setStatus("Select S-57 ENC file for import", Color.yellow); 55 55 int returnVal = ifc.showOpenDialog(Main.parent); 56 56 if (returnVal == JFileChooser.APPROVE_OPTION) { … … 60 60 } catch (IOException e1) { 61 61 Smed2Action.panelS57.setVisible(false); 62 messageBar.setText("IO Exception");62 setStatus("IO Exception", Color.red); 63 63 } 64 64 } else { 65 65 Smed2Action.panelS57.setVisible(false); 66 messageBar.setText("");66 clrStatus(); 67 67 } 68 68 } … … 76 76 if (e.getSource() == exportButton) { 77 77 Smed2Action.panelS57.setVisible(true); 78 messageBar.setText("Select S-57 ENC file for export");78 setStatus("Select S-57 ENC file for export", Color.yellow); 79 79 int returnVal = efc.showOpenDialog(Main.parent); 80 80 if (returnVal == JFileChooser.APPROVE_OPTION) { … … 83 83 } catch (IOException e1) { 84 84 Smed2Action.panelS57.setVisible(false); 85 messageBar.setText("IO Exception");85 setStatus("IO Exception", Color.red); 86 86 } 87 87 } else { 88 88 Smed2Action.panelS57.setVisible(false); 89 messageBar.setText("");89 clrStatus(); 90 90 } 91 91 } … … 153 153 g2.setBackground(new Color(0xb5d0d0)); 154 154 if (img != null) g2.clearRect(0, 0, img.getWidth(), img.getHeight()); 155 g2.drawImage(img, 0, 0, null);; 155 g2.drawImage(img, 0, 0, null); 156 } 157 158 public static void setStatus(String text, Color bg) { 159 messageBar.setBackground(bg); 160 messageBar.setText(text); 161 } 162 163 public static void clrStatus() { 164 messageBar.setBackground(Color.white); 165 messageBar.setText(""); 156 166 } 157 167
Note:
See TracChangeset
for help on using the changeset viewer.
