1 19 20 package org.openide.loaders; 21 22 import java.io.IOException ; 23 import java.util.Set ; 24 import javax.swing.event.ChangeListener ; 25 import org.netbeans.api.progress.ProgressHandle; 26 import org.openide.WizardDescriptor; 27 28 32 class TemplateWizardIteratorWrapper implements WizardDescriptor.Iterator<WizardDescriptor>, ChangeListener { 33 34 private TemplateWizardIterImpl iterImpl; 35 36 37 private TemplateWizardIteratorWrapper (TemplateWizardIterImpl iterImpl) { 38 this.iterImpl = iterImpl; 39 } 40 41 public TemplateWizardIterImpl getOriginalIterImpl () { 42 return iterImpl; 43 } 44 45 47 public void first () { 48 iterImpl.first (); 49 } 50 51 53 public void setIterator (TemplateWizard.Iterator it, boolean notify) { 54 iterImpl.setIterator (it, notify); 55 } 56 57 59 public TemplateWizard.Iterator getIterator () { 60 return iterImpl.getIterator (); 61 } 62 63 66 public WizardDescriptor.Panel<WizardDescriptor> current() { 67 return iterImpl.current (); 68 } 69 70 71 74 public String name() { 75 return iterImpl.name (); 76 } 77 78 81 public boolean hasNext() { 82 return iterImpl.hasNext (); 83 } 84 85 88 public boolean hasPrevious() { 89 return iterImpl.hasPrevious (); 90 } 91 92 96 public void nextPanel() { 97 iterImpl.nextPanel (); 98 } 99 100 104 public void previousPanel() { 105 iterImpl.previousPanel (); 106 } 107 108 109 public void stateChanged(final javax.swing.event.ChangeEvent p1) { 110 iterImpl.stateChanged (p1); 111 } 112 113 116 public synchronized void addChangeListener(javax.swing.event.ChangeListener listener) { 117 iterImpl.addChangeListener (listener); 118 } 119 122 public synchronized void removeChangeListener (javax.swing.event.ChangeListener listener) { 123 iterImpl.removeChangeListener (listener); 124 } 125 126 public void initialize (WizardDescriptor wiz) { 127 iterImpl.initialize (wiz); 128 } 129 130 public void uninitialize() { 131 iterImpl.uninitialize (); 132 } 133 134 public void uninitialize (WizardDescriptor wiz) { 135 iterImpl.uninitialize (wiz); 136 } 137 138 public Set <DataObject> instantiate () throws IOException { 139 return iterImpl.instantiate (); 140 } 141 142 public Set <DataObject> instantiate (ProgressHandle handle) throws IOException { 143 return iterImpl.instantiate (handle); 144 } 145 146 static class InstantiatingIterator extends TemplateWizardIteratorWrapper implements WizardDescriptor.InstantiatingIterator<WizardDescriptor> { 147 public InstantiatingIterator (TemplateWizardIterImpl it) { 148 super (it); 149 } 150 } 151 152 static class AsynchronousInstantiatingIterator extends InstantiatingIterator implements WizardDescriptor.AsynchronousInstantiatingIterator<WizardDescriptor> { 153 public AsynchronousInstantiatingIterator (TemplateWizardIterImpl it) { 154 super (it); 155 } 156 } 157 158 static class ProgressInstantiatingIterator extends InstantiatingIterator implements WizardDescriptor.ProgressInstantiatingIterator<WizardDescriptor> { 159 private TemplateWizardIterImpl itImpl; 160 public ProgressInstantiatingIterator (TemplateWizardIterImpl it) { 161 super (it); 162 itImpl = it; 163 } 164 } 165 166 } 167 | Popular Tags |