1 19 20 package org.apache.tools.ant.module; 21 22 import java.beans.PropertyChangeListener ; 23 import javax.swing.JComponent ; 24 import org.netbeans.spi.options.OptionsPanelController; 25 import org.openide.util.HelpCtx; 26 import org.openide.util.Lookup; 27 28 33 public final class AntPanelController extends OptionsPanelController { 34 35 @Override 36 public void update () { 37 getAntCustomizer ().update (); 38 } 39 40 @Override 41 public void applyChanges () { 42 getAntCustomizer ().applyChanges (); 43 } 44 45 @Override 46 public void cancel () { 47 getAntCustomizer ().cancel (); 48 } 49 50 @Override 51 public boolean isValid () { 52 return getAntCustomizer ().dataValid (); 53 } 54 55 @Override 56 public boolean isChanged () { 57 return getAntCustomizer ().isChanged (); 58 } 59 60 @Override 61 public HelpCtx getHelpCtx () { 62 return new HelpCtx ("netbeans.optionsDialog.advanced.ant"); 63 } 64 65 @Override 66 public JComponent getComponent (Lookup lookup) { 67 return getAntCustomizer (); 68 } 69 70 @Override 71 public void addPropertyChangeListener (PropertyChangeListener l) { 72 getAntCustomizer ().addPropertyChangeListener (l); 73 } 74 75 @Override 76 public void removePropertyChangeListener (PropertyChangeListener l) { 77 getAntCustomizer ().removePropertyChangeListener (l); 78 } 79 80 81 private AntCustomizer antCustomizer; 82 83 private AntCustomizer getAntCustomizer () { 84 if (antCustomizer == null) 85 antCustomizer = new AntCustomizer (); 86 return antCustomizer; 87 } 88 } 89 | Popular Tags |