1 2 24 package org.enhydra.tool.archive.wizard; 25 26 import javax.swing.JPanel ; 28 import java.lang.ref.WeakReference ; 29 30 public class RefPanel extends JPanel { 32 private WeakReference wizardRef = null; 33 34 public RefPanel() {} 35 36 protected void setWorkingRoot(String root) { 37 getWizard().setWorkingRoot(root); 38 } 39 40 protected String getWorkingRoot() { 41 return getWizard().getWorkingRoot(); 42 } 43 44 protected void setWizard(ArchiveWizard wizard) { 45 wizardRef = new WeakReference (wizard); 46 } 47 48 49 50 protected ArchiveWizard getWizard() { 51 ArchiveWizard wizard = null; 52 53 if (wizardRef != null) { 54 wizard = (ArchiveWizard) wizardRef.get(); 55 } 56 return wizard; 57 } 58 59 } 60 | Popular Tags |