/** * Fired when action got executed. * * @param e the event */ public void actionPerformed(ActionEvent e) { if (!checkModified()) return; if (m_Script.getFilename() == null) return; try { m_Script.start(m_Args); } catch (Exception ex) { ex.printStackTrace(); JOptionPane.showMessageDialog( FileScriptingPanel.this, "Error running script:\n" + ex, "Error", JOptionPane.ERROR_MESSAGE); } } }
/** * Fired when action got executed. * * @param e the event */ public void actionPerformed(ActionEvent e) { if (!checkModified()) return; if (m_Script.getFilename() == null) return; try { m_Script.start(m_Args); } catch (Exception ex) { ex.printStackTrace(); JOptionPane.showMessageDialog( FileScriptingPanel.this, "Error running script:\n" + ex, "Error", JOptionPane.ERROR_MESSAGE); } } }
/** * Fired when action got executed. * * @param e the event */ public void actionPerformed(ActionEvent e) { boolean ok; int retVal; if (!checkModified()) return; retVal = m_FileChooser.showOpenDialog(FileScriptingPanel.this); if (retVal != JFileChooser.APPROVE_OPTION) return; ok = m_Script.open(m_FileChooser.getSelectedFile()); m_TextCode.setCaretPosition(0); if (!ok) JOptionPane.showMessageDialog( FileScriptingPanel.this, "Couldn't open file '" + m_FileChooser.getSelectedFile() + "'!"); notifyTitleUpdatedListeners(new TitleUpdatedEvent(FileScriptingPanel.this)); } }
/** * Fired when action got executed. * * @param e the event */ public void actionPerformed(ActionEvent e) { boolean ok; int retVal; if (!checkModified()) return; retVal = m_FileChooser.showOpenDialog(FileScriptingPanel.this); if (retVal != JFileChooser.APPROVE_OPTION) return; ok = m_Script.open(m_FileChooser.getSelectedFile()); m_TextCode.setCaretPosition(0); if (!ok) JOptionPane.showMessageDialog( FileScriptingPanel.this, "Couldn't open file '" + m_FileChooser.getSelectedFile() + "'!"); notifyTitleUpdatedListeners(new TitleUpdatedEvent(FileScriptingPanel.this)); } }
WindowEvent event; if (!checkModified()) return;
WindowEvent event; if (!checkModified()) return;