private void ensureLatestClauseBase() { DlgWait dlgWait = new DlgWait(rootFrame); Thread thread = new Thread(new CreateClauseBase(dlgWait)); thread.start(); dlgWait.setVisible(true); }
private void ensureLatestClauseBase() { if (clauseBase != null && !xmlTextIsDirty) { return; } DlgWait dlgWait = new DlgWait(GuiTest.this); Thread thread = new Thread(new CreateClauseBase(dlgWait)); thread.start(); dlgWait.setVisible(true); }
public void run() { System.out.println("RELOADING"); try { jellyfishBase.reloadClauseBase(language); clauseBase = jellyfishBase.getClauseBase(language); } catch (Exception ex) { String trace = Common.traceToString(ex); dlgWait.setVisible(false); JOptionPane.showMessageDialog( rootFrame, trace, "Error While Loading", JOptionPane.ERROR_MESSAGE); ex.printStackTrace(System.out); } finally { dlgWait.setVisible(false); } }
public void run() { String xml = txtXml.getText(); java.io.ByteArrayInputStream inputStream = new ByteArrayInputStream(xml.getBytes()); ClauseBase newClauseBase = new ClauseBase(tokenizer); try { newClauseBase.build(inputStream); clauseBase = newClauseBase; setXmlTextIsDirty(false); } catch (Exception ex) { ex.printStackTrace(System.out); JOptionPane.showMessageDialog(rootPane, Common.traceToString(ex)); } finally { try { inputStream.close(); } catch (IOException ex) { } } dlgWait.setVisible(false); }