1 19 20 package org.netbeans.modules.options.generaleditor; 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 29 34 public final class GeneralEditorPanelController extends OptionsPanelController { 35 36 37 public void update () { 38 getGeneralEditorPanel ().update (); 39 } 40 41 public void applyChanges () { 42 getGeneralEditorPanel ().applyChanges (); 43 } 44 45 public void cancel () { 46 getGeneralEditorPanel ().cancel (); 47 } 48 49 public boolean isValid () { 50 return getGeneralEditorPanel ().dataValid (); 51 } 52 53 public boolean isChanged () { 54 return getGeneralEditorPanel ().isChanged (); 55 } 56 57 public HelpCtx getHelpCtx () { 58 return new HelpCtx ("netbeans.optionsDialog.editor.general"); 59 } 60 61 public JComponent getComponent (Lookup masterLookup) { 62 return getGeneralEditorPanel (); 63 } 64 65 public void addPropertyChangeListener (PropertyChangeListener l) { 66 getGeneralEditorPanel ().addPropertyChangeListener (l); 67 } 68 69 public void removePropertyChangeListener (PropertyChangeListener l) { 70 getGeneralEditorPanel ().removePropertyChangeListener (l); 71 } 72 73 74 private GeneralEditorPanel generalEditorPanel; 75 76 private GeneralEditorPanel getGeneralEditorPanel () { 77 if (generalEditorPanel == null) 78 generalEditorPanel = new GeneralEditorPanel (); 79 return generalEditorPanel; 80 } 81 } 82 83 | Popular Tags |