de.cau.cs.kieler.sim.kiem.config.managers
Class ContributionManager

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.config.managers.AbstractManager
      extended by de.cau.cs.kieler.sim.kiem.config.managers.ContributionManager

public final class ContributionManager
extends AbstractManager

Holds both combo boxes for selecting a configuration.

Rating proposed yellow
(2010-01-27)

Field Summary
static int MATCHING_COMBO
          the selector should use the list of matching schedules ordered by priority.
static int RECENT_COMBO
          the selector should use the list of most recently used schedules.
 
Method Summary
 ControlContribution[] getContributions()
          Getter for all control contributions in this plugin.
static ContributionManager getInstance()
          Returns the singleton instance.
 ScheduleSelector getMatchingCombo()
          Getter for the matchingCombo.
 ScheduleSelector getRecentCombo()
          Getter for the recentCombo.
 boolean isComponentEnabled(int componentId)
          Determine whether a component should be visible or not.
 boolean isInAdvancedMode()
          Getter for the isInAdvancedMode.
 boolean isSummaryMessageDisabled()
          Getter for the isSummaryMessageDisabled.
 void load()
          load the saved data from the preference store.
 void save()
          Saves the data inside the manager into the plugin's preference store.
 void setInAdvancedMode(boolean isInAdvancedModeParam)
          Setter for the isInAdvancedMode.
 void setSummaryMessageDisabled(boolean isSummaryMessageDisabledParam)
          Setter for the isSummaryMessageDisabled.
 void toggleCombo(int comboId, boolean enabled)
          Set the visibility of components.
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.config.managers.AbstractManager
addEventListener, load, notifyListeners, remove, removeEventListener, save, saveAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MATCHING_COMBO

public static final int MATCHING_COMBO
the selector should use the list of matching schedules ordered by priority.

See Also:
Constant Field Values

RECENT_COMBO

public static final int RECENT_COMBO
the selector should use the list of most recently used schedules.

See Also:
Constant Field Values
Method Detail

getInstance

public static ContributionManager getInstance()
Returns the singleton instance.

Returns:
the instance

getContributions

public ControlContribution[] getContributions()
Getter for all control contributions in this plugin.

Returns:
the array of contributions.

getMatchingCombo

public ScheduleSelector getMatchingCombo()
Getter for the matchingCombo.

Returns:
the matchingCombo

getRecentCombo

public ScheduleSelector getRecentCombo()
Getter for the recentCombo.

Returns:
the recentCombo

isComponentEnabled

public boolean isComponentEnabled(int componentId)
Determine whether a component should be visible or not.

Parameters:
componentId - the id of the component.
Returns:
true if it should be visible false if not or if there is no component with the provided id.

toggleCombo

public void toggleCombo(int comboId,
                        boolean enabled)
Set the visibility of components.

Parameters:
comboId - the component id.
enabled - true if the component should be visible, false if not.

isSummaryMessageDisabled

public boolean isSummaryMessageDisabled()
Getter for the isSummaryMessageDisabled.

Returns:
the isSummaryMessageDisabled flag

setSummaryMessageDisabled

public void setSummaryMessageDisabled(boolean isSummaryMessageDisabledParam)
Setter for the isSummaryMessageDisabled.

Parameters:
isSummaryMessageDisabledParam - the isInAdvancedMode to set

isInAdvancedMode

public boolean isInAdvancedMode()
Getter for the isInAdvancedMode.

Returns:
the isInAdvancedMode

setInAdvancedMode

public void setInAdvancedMode(boolean isInAdvancedModeParam)
Setter for the isInAdvancedMode.

Parameters:
isInAdvancedModeParam - the isInAdvancedMode to set

load

public void load()
load the saved data from the preference store.

Specified by:
load in class AbstractManager

save

public void save()
Saves the data inside the manager into the plugin's preference store.

Specified by:
save in class AbstractManager