/** Construct a new dialog. */ public JArchiveDialog() { super("Archive Tool"); pPrivilegeDetails = new PrivilegeDetails(); /* create dialog body components */ { JPanel cpanel = new JPanel(); { cpanel.setName("ButtonDialogPanel"); cpanel.setLayout(new BoxLayout(cpanel, BoxLayout.Y_AXIS)); cpanel.add(UIFactory.createPanelLabel("Candidate Versions:")); cpanel.add(Box.createRigidArea(new Dimension(0, 4))); { ArchiveCandidateTableModel model = new ArchiveCandidateTableModel(); pCandidateTableModel = model; JTablePanel tpanel = new JTablePanel(model); pCandidateTablePanel = tpanel; cpanel.add(tpanel); } cpanel.add(Box.createRigidArea(new Dimension(0, 5))); { Box hbox = new Box(BoxLayout.X_AXIS); hbox.add(Box.createHorizontalGlue()); hbox.add(Box.createRigidArea(new Dimension(10, 0))); { JButton btn = UIFactory.createDialogButton( "Search...", "candidate-search", this, "Search for new candidate checked-in versions to archive."); hbox.add(btn); } hbox.add(Box.createRigidArea(new Dimension(20, 0))); { JButton btn = UIFactory.createDialogButton( "Clear", "clear-candidate", this, "Clear the displayed candidate checked-in versions."); hbox.add(btn); } hbox.add(Box.createRigidArea(new Dimension(10, 0))); hbox.add(Box.createHorizontalGlue()); cpanel.add(hbox); } } JPanel apanel = new JPanel(); { apanel.setName("ButtonDialogPanel"); apanel.setLayout(new BoxLayout(apanel, BoxLayout.Y_AXIS)); { Box box = new Box(BoxLayout.X_AXIS); box.add(Box.createRigidArea(new Dimension(4, 0))); { JLabel label = new JLabel("Versions to Archive:"); label.setName("PanelLabel"); box.add(label); } box.add(Box.createHorizontalGlue()); { JLabel label = new JLabel("Total Size: ???"); pArchiveSizeLabel = label; label.setName("PanelLabel"); box.add(label); } box.add(Box.createRigidArea(new Dimension(23, 0))); apanel.add(box); } apanel.add(Box.createRigidArea(new Dimension(0, 4))); { NodeVersionSizeTableModel model = new NodeVersionSizeTableModel(880); pArchiveTableModel = model; JTablePanel tpanel = new JTablePanel(model); pArchiveTablePanel = tpanel; apanel.add(tpanel); } apanel.add(Box.createRigidArea(new Dimension(0, 5))); { Box hbox = new Box(BoxLayout.X_AXIS); hbox.add(Box.createHorizontalGlue()); hbox.add(Box.createRigidArea(new Dimension(10, 0))); { JButton btn = UIFactory.createDialogButton( "Add", "add-archive", this, "Add the selected candidate versions to the list of versions to be " + "archived."); hbox.add(btn); } hbox.add(Box.createRigidArea(new Dimension(10, 0))); { JButton btn = UIFactory.createDialogButton( "Add All", "add-all-archive", this, "Add all candidate versions to the list of versions to be archived."); hbox.add(btn); } hbox.add(Box.createRigidArea(new Dimension(20, 0))); { JButton btn = UIFactory.createDialogButton( "Remove", "remove-archive", this, "Remove the selected versions from the list of versions to be archived."); hbox.add(btn); } hbox.add(Box.createRigidArea(new Dimension(10, 0))); { JButton btn = UIFactory.createDialogButton( "Clear", "remove-all-archive", this, "Clear the list of versions to be archived."); hbox.add(btn); } hbox.add(Box.createRigidArea(new Dimension(20, 0))); { JButton btn = UIFactory.createDialogButton( "Calc Sizes", "calc-archive", this, "Calculate the amount of disk space needed to archive the files " + "associated with the checked-in versions."); hbox.add(btn); } hbox.add(Box.createRigidArea(new Dimension(10, 0))); hbox.add(Box.createHorizontalGlue()); apanel.add(hbox); } } JSplitPane body = new JVertSplitPanel(cpanel, apanel); body.setAlignmentX(0.5f); String extra[][] = {{"Archive...", "archive"}}; JButton btns[] = super.initUI("Archive Tool:", body, null, null, extra, "Close", null); pArchiveButton = btns[0]; pArchiveButton.setEnabled(false); updatePanel(); pack(); } pQueryDialog = new JArchiveQueryDialog(this); pArchiveParamsDialog = new JArchiveParamsDialog(this); }