fi.helsinki.dacopan.settings
Class GlobalSettingsMSC

java.lang.Object
  extended by fi.helsinki.dacopan.settings.GlobalSettingsMSC
All Implemented Interfaces:
Saveable

public class GlobalSettingsMSC
extends java.lang.Object
implements Saveable

Class which contains the global -- not scenario- or dataview specific -- MSC settings which are saved in the global settings file.

Contains the SettingsMSC for all layers and a map of chosen variable fields in the MSC animation for each protocol. The id of the protocol is used since the protocol objects cannot be serialized with a dataview in which the do not exist


Nested Class Summary
 class GlobalSettingsMSC.VariableFields
          Inner class for the center- and column variable list pairs stored in the map.
 
Constructor Summary
GlobalSettingsMSC()
          Constructor creating an empy object
 
Method Summary
 java.lang.Object getData()
          Returns the data that should be saved in the scenario file.
 SettingsMSC getSettingsMSC()
          Gets the global MSC settings
 GlobalSettingsMSC.VariableFields getVariableFields(long protocolId)
          Gets the variableFields for the wanted protocol
 void putVariableFields(long protocolId, VariableDefinition[] variablesCenter, VariableDefinition[] variablesColumns)
          Inserts the center- and column- variables for the protocol.
 void setData(java.lang.Object data)
          Sets the data loaded from the scenario file.
 void setSettingsMSC(SettingsMSC newSettingsMSC)
          Stores the global MSC settings, other than the variable fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalSettingsMSC

public GlobalSettingsMSC()
Constructor creating an empy object

Method Detail

putVariableFields

public void putVariableFields(long protocolId,
                              VariableDefinition[] variablesCenter,
                              VariableDefinition[] variablesColumns)
Inserts the center- and column- variables for the protocol.

Parameters:
protocolId - the id of the protocol, used instead of Protocol, because it's dataview-independent when serializing.
variablesCenter - the center variables
variablesColumns - the column variables

getVariableFields

public GlobalSettingsMSC.VariableFields getVariableFields(long protocolId)
Gets the variableFields for the wanted protocol

Parameters:
protocolId - id of the protocol
Returns:

setSettingsMSC

public void setSettingsMSC(SettingsMSC newSettingsMSC)
Stores the global MSC settings, other than the variable fields.

Parameters:
newSettingsMSC - The new settings

getSettingsMSC

public SettingsMSC getSettingsMSC()
Gets the global MSC settings

Returns:
The global SettingsMSC object

getData

public java.lang.Object getData()
Description copied from interface: Saveable
Returns the data that should be saved in the scenario file.

Specified by:
getData in interface Saveable
Returns:
arbitrary data (might be null)

setData

public void setData(java.lang.Object data)
Description copied from interface: Saveable
Sets the data loaded from the scenario file.

Specified by:
setData in interface Saveable
Parameters:
data - loaded object


© Dacopan2 team, 2005-