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.OptionsPanelController
Abstract superclass for preferences pages. Subclasses need to be annotated with eitherOptionsPanelController.TopLevelRegistration
orOptionsPanelController.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 void
addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
void
applyChanges()
void
cancel()
protected void
configure(com.bc.ceres.swing.binding.BindingContext context)
Configure the passed binding context.protected JPanel
createPanel(com.bc.ceres.swing.binding.BindingContext context)
Create a panel that allows the user to set the parameters in the givenBindingContext
.protected abstract PropertySet
createPropertySet()
Create aPropertySet
object instance that holds all parameters.protected PropertyContainer
createPropertySet(Object bean)
Creates a PropertyContainer for any bean.protected com.bc.ceres.swing.binding.BindingContext
getBindingContext()
JComponent
getComponent(org.openide.util.Lookup lookup)
boolean
isChanged()
protected boolean
isInitialised()
boolean
isValid()
void
removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
protected void
setChanged(boolean changed)
void
update()
-
-
-
Method Detail
-
createPropertySet
protected abstract PropertySet createPropertySet()
Create aPropertySet
object 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
- TheBindingContext
for 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 createenablements
in order to add dependencies between property states. The default implementation does nothing.- Parameters:
context
- TheBindingContext
to 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:
update
in classorg.netbeans.spi.options.OptionsPanelController
-
applyChanges
public void applyChanges()
- Specified by:
applyChanges
in classorg.netbeans.spi.options.OptionsPanelController
-
cancel
public void cancel()
- Specified by:
cancel
in classorg.netbeans.spi.options.OptionsPanelController
-
isValid
public boolean isValid()
- Specified by:
isValid
in classorg.netbeans.spi.options.OptionsPanelController
-
setChanged
protected void setChanged(boolean changed)
-
isChanged
public boolean isChanged()
- Specified by:
isChanged
in classorg.netbeans.spi.options.OptionsPanelController
-
getComponent
public JComponent getComponent(org.openide.util.Lookup lookup)
- Specified by:
getComponent
in classorg.netbeans.spi.options.OptionsPanelController
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
- Specified by:
addPropertyChangeListener
in classorg.netbeans.spi.options.OptionsPanelController
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
- Specified by:
removePropertyChangeListener
in classorg.netbeans.spi.options.OptionsPanelController
-
isInitialised
protected boolean isInitialised()
-
-