private void importXML() { master.setCursor(new Cursor(Cursor.WAIT_CURSOR)); isConsumed = true; XMLReader x; ArrayList<ArrayList<DatabaseObject>> objs = null; if (master.getStore().hasProperty("file")) { x = new XMLReader(); x.setOverwriteExisting(true); try { x.newDoc(new File(master.getStore().getProperty("file")), false); objs = x.getObjects(); jTable1.setModel( ImportTableModel.getModel(objs, !master.getStore().getProperty("overwrite", false))); jLabel2.setText( jLabel2.getText() + " " + master.getStore().getProperty("file") + " (" + jTable1.getRowCount() + ")"); TableFormat.format(jTable1, 0, 0); TableFormat.format(jTable1, 1, 33); TableFormat.format(jTable1, 2, 100); } catch (Exception ex) { Popup.error(ex); Log.Debug(ex); } finally { master.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } } }
/** Reset the columns to initial sizes (if set) */ public synchronized void reset() { if (desiredColSizes != null) { createDefaultColumnsFromModel(); TableFormat.resizeCols(this, desiredColSizes, fixedCols); } else { createDefaultColumnsFromModel(); } if (persistanceHandler != null) { persistanceHandler.restore(); persistanceHandler.set(); } }