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