?? treatmentwizard.java
字號:
/* * Oct 25, 2002 * * Document me! */package cdt.projects.tree.wizards.treatment;import javax.swing.*;import javax.swing.text.Position;import javax.swing.tree.TreePath;import cdt.projects.Project;import cdt.projects.tree.nodes.Node;import cdt.projects.tree.nodes.Hold;import cdt.projects.tree.wizards.diffdx.DifferentialWizard1;import cdt.wizard.WizardFrame;public class TreatmentWizard extends WizardFrame { /** The JFrame acting as the parent to this wizard. */ private JFrame parent; /** * Creates the differential diagnosis wizard. * * @param parent The parent JFrame, in this case typically an instance of * {@link cdt.Frame1 Frame1}. */ public TreatmentWizard(JFrame parent) { super(parent); this.parent = parent; JTree projectTree = Project.currentProject.getTree(); // Finds the 'Treatment' folder in the ProjectTree TreePath treePath = projectTree.getNextMatch("Treatment", 0, Position.Bias.Forward); Node treatmentFolder = null; if(null != treePath && treePath.getLastPathComponent() instanceof Hold) { treatmentFolder = (Node)treePath.getLastPathComponent(); } else { treatmentFolder = new Hold("Treatment"); treatmentFolder.setFile(Node.foldername(treatmentFolder.getName())); Hold rootNode = (Hold)projectTree.getPathForRow(0).getLastPathComponent(); rootNode.addNodeInto(treatmentFolder); } projectTree.updateUI(); putData("oldTreatmentFolder", treatmentFolder); init(); } /** * Sets up the layout of this page. */ public void customize() { showPreviousButton(false); showFinishButton(false); setTitle("Treatment Wizard"); JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.add(new JLabel("This wizard configures the treatment section for an interactive case, " +"and")); panel.add(new JLabel("will overwrite any old treatment information that you may have")); panel.add(new JLabel(" ")); panel.add(new JLabel("Please hit the 'next' button to begin the differential diagnosis" + " creation process.")); centerPanel.add(panel); } /** * Moves to the next page in the wizard. */ public void nextAction() { pushFrame(this); setVisible(false); Project.currentProject.getTree().firePageNeededEvent(); // Creates the next page in the wizard new TreatmentWizard1(parent); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -