Package org.esa.snap.rcp.preferences
Class DefaultConfigController
- java.lang.Object
-
- org.netbeans.spi.options.OptionsPanelController
-
- org.esa.snap.rcp.preferences.DefaultConfigController
-
- Direct Known Subclasses:
ColorManipulationController,GeoLocationController,GraticuleLayerController,ImageLayerController,ImageViewController,MaskLayerController,NoDataLayerController,OtherOptionsController,QuicklookOptionsController,RgbController,ToolAdapterOptionsController,UiBehaviorController,VFSOptionsController,WorldMapLayerController,WriteOptionsController
public abstract class DefaultConfigController extends org.netbeans.spi.options.OptionsPanelControllerAbstract superclass for preferences pages. Subclasses need to be annotated with eitherOptionsPanelController.TopLevelRegistrationorOptionsPanelController.SubRegistration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.netbeans.spi.options.OptionsPanelController
org.netbeans.spi.options.OptionsPanelController.ContainerRegistration, org.netbeans.spi.options.OptionsPanelController.Keywords, org.netbeans.spi.options.OptionsPanelController.KeywordsRegistration, org.netbeans.spi.options.OptionsPanelController.SubRegistration, org.netbeans.spi.options.OptionsPanelController.TopLevelRegistration
-
-
Constructor Summary
Constructors Constructor Description DefaultConfigController()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener propertyChangeListener)voidapplyChanges()voidcancel()protected voidconfigure(com.bc.ceres.swing.binding.BindingContext context)Configure the passed binding context.protected JPanelcreatePanel(com.bc.ceres.swing.binding.BindingContext context)Create a panel that allows the user to set the parameters in the givenBindingContext.protected abstract PropertySetcreatePropertySet()Create aPropertySetobject instance that holds all parameters.protected PropertyContainercreatePropertySet(Object bean)Creates a PropertyContainer for any bean.protected com.bc.ceres.swing.binding.BindingContextgetBindingContext()JComponentgetComponent(org.openide.util.Lookup lookup)booleanisChanged()protected booleanisInitialised()booleanisValid()voidremovePropertyChangeListener(PropertyChangeListener propertyChangeListener)protected voidsetChanged(boolean changed)voidupdate()
-
-
-
Method Detail
-
createPropertySet
protected abstract PropertySet createPropertySet()
Create aPropertySetobject instance that holds all parameters. Clients that want to maintain properties need to overwrite this method.- Returns:
- An instance of
PropertySet, holding all configuration parameters. - See Also:
createPropertySet(Object)
-
createPanel
protected JPanel createPanel(com.bc.ceres.swing.binding.BindingContext context)
Create a panel that allows the user to set the parameters in the givenBindingContext. Clients that want to create their own panel representation on the given properties need to overwrite this method.- Parameters:
context- TheBindingContextfor the panel.- Returns:
- A JPanel instance for the given
BindingContext, nevernull.
-
configure
protected void configure(com.bc.ceres.swing.binding.BindingContext context)
Configure the passed binding context. This is intended to be used to createenablementsin order to add dependencies between property states. The default implementation does nothing.- Parameters:
context- TheBindingContextto configure.- See Also:
Enablement,BindingContext.bindEnabledState(String, boolean, com.bc.ceres.swing.binding.Enablement.Condition),BindingContext.bindEnabledState(String, boolean, String, Object)
-
getBindingContext
protected com.bc.ceres.swing.binding.BindingContext getBindingContext()
-
createPropertySet
protected final PropertyContainer createPropertySet(Object bean)
Creates a PropertyContainer for any bean. The bean parameters need to be annotated withPreference.- Parameters:
bean- a bean with fields annoted withPreference.- Returns:
- an instance of
PropertyContainer, fit for passing within overriddencreatePropertySet().
-
update
public void update()
- Specified by:
updatein classorg.netbeans.spi.options.OptionsPanelController
-
applyChanges
public void applyChanges()
- Specified by:
applyChangesin classorg.netbeans.spi.options.OptionsPanelController
-
cancel
public void cancel()
- Specified by:
cancelin classorg.netbeans.spi.options.OptionsPanelController
-
isValid
public boolean isValid()
- Specified by:
isValidin classorg.netbeans.spi.options.OptionsPanelController
-
setChanged
protected void setChanged(boolean changed)
-
isChanged
public boolean isChanged()
- Specified by:
isChangedin classorg.netbeans.spi.options.OptionsPanelController
-
getComponent
public JComponent getComponent(org.openide.util.Lookup lookup)
- Specified by:
getComponentin classorg.netbeans.spi.options.OptionsPanelController
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
- Specified by:
addPropertyChangeListenerin classorg.netbeans.spi.options.OptionsPanelController
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
- Specified by:
removePropertyChangeListenerin classorg.netbeans.spi.options.OptionsPanelController
-
isInitialised
protected boolean isInitialised()
-
-