1 19 20 package org.netbeans.modules.xml.xam.ui.customizer; 21 22 import javax.swing.JComponent ; 23 import javax.swing.JPanel ; 24 import org.openide.util.Lookup; 25 26 30 public abstract class AbstractCustomizer extends JPanel implements Customizer { 31 32 35 private boolean saveFlag; 36 37 40 private boolean resetFlag; 41 42 45 public boolean canApply() { 46 return saveFlag; 47 } 48 49 54 protected void setSaveEnabled(boolean flag) { 55 firePropertyChange(PROP_ACTION_APPLY,saveFlag,flag); 56 saveFlag = flag; 57 } 58 59 64 protected void setResetEnabled(boolean flag) { 65 firePropertyChange(PROP_ACTION_RESET,resetFlag,flag); 66 resetFlag = flag; 67 } 68 69 72 public JComponent getComponent() { 73 return this; 74 } 75 76 79 public Lookup getLookup(){ 80 return Lookup.EMPTY; 81 } 82 83 } 84 | Popular Tags |