net.ctdp.rfdynhud.properties
Interface PropertiesKeeper

All Known Implementing Classes:
AbstractAssembledWidget, AbstractPropertiesKeeper, AbstractRevNeedleMeterWidget, AssembledWidget, InternalWidget, NeedleMeterWidget, StatefulWidget, Widget, WidgetsConfiguration

public interface PropertiesKeeper

Interface for all classes, that keep properties.

Author:
Marvin Froehlich (CTDP)

Method Summary
 void getProperties(PropertiesContainer propsCont, boolean forceAll)
          Puts all editable properties to the editor.
 void loadProperty(PropertyLoader loader)
          Loads (and parses) a certain property from a config file.
 void onPropertyChanged(Property property, java.lang.Object oldValue, java.lang.Object newValue)
          Invoked when a kept Property has changed.
 void saveProperties(PropertyWriter writer)
          Saves all settings to the config file.
 

Method Detail

onPropertyChanged

void onPropertyChanged(Property property,
                       java.lang.Object oldValue,
                       java.lang.Object newValue)
Invoked when a kept Property has changed.

Parameters:
property - the changed property
oldValue - the old value
newValue - the new value

saveProperties

void saveProperties(PropertyWriter writer)
                    throws java.io.IOException
Saves all settings to the config file.

Parameters:
writer - the widgets configuration writer to write properties to
Throws:
java.io.IOException - if something went wrong

loadProperty

void loadProperty(PropertyLoader loader)
Loads (and parses) a certain property from a config file.

Parameters:
loader - the property loader to load properties from

getProperties

void getProperties(PropertiesContainer propsCont,
                   boolean forceAll)
Puts all editable properties to the editor.

Parameters:
propsCont - the container to add the properties to
forceAll - If true, all properties provided by this PropertiesKeeper must be added. If false, only the properties, that are relevant for the current PropertiesKeeper's situation have to be added, some can be ignored.