Skip to content
Snippets Groups Projects
Commit 4be3eaf8 authored by izabel's avatar izabel
Browse files

[LMS-1689], [LMS-1757]: save "collapse" state of "Properties Panel"

SVN: 17839
parent 3a9f2c87
No related branches found
No related tags found
No related merge requests found
......@@ -466,17 +466,19 @@ public class DisplaySettingsManager
return tabModifications.get(tabDisplayTypeID);
}
// TODO work in progress, ignore for now.
/**
* @return True if the given section is collapsed
*/
public final Boolean getPanelCollapsedSetting(String panelId)
@SuppressWarnings("deprecation")
public final Boolean tryGetPanelCollapsedSetting(String panelId)
{
return Boolean.FALSE;
return displaySettings.getPanelCollapsedSettings().get(panelId);
}
@SuppressWarnings("deprecation")
public final void updatePanelCollapsedSetting(String panelId, Boolean value)
{
displaySettings.getPanelCollapsedSettings().put(panelId, value);
}
//
......
......@@ -266,7 +266,9 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends
protected boolean isLeftPanelInitiallyCollapsed(final String displayIdSuffix)
{
final String panelId = LEFT_PANEL_PREFIX + displayIdSuffix;
return viewContext.getDisplaySettingsManager().getPanelCollapsedSetting(panelId);
Boolean collapsedOrNull =
viewContext.getDisplaySettingsManager().tryGetPanelCollapsedSetting(panelId);
return collapsedOrNull == null ? false : collapsedOrNull.booleanValue();
}
public void notify(List<IModule> modules)
......
......@@ -59,6 +59,8 @@ public class DisplaySettings implements Serializable, IsSerializable
private RealNumberFormatingParameters realNumberFormatingParameters =
new RealNumberFormatingParameters();
private Map<String, Boolean> panelCollapsedSettings = new HashMap<String, Boolean>();
/** @deprecated Should be used only by DisplaySettingsManager. */
@Deprecated
public final Map<String, List<ColumnSetting>> getColumnSettings()
......@@ -77,6 +79,17 @@ public class DisplaySettings implements Serializable, IsSerializable
return tabSettings;
}
/** @deprecated Should be used only by DisplaySettingsManager. */
@Deprecated
public Map<String, Boolean> getPanelCollapsedSettings()
{
if (panelCollapsedSettings == null)
{
panelCollapsedSettings = new HashMap<String, Boolean>();
}
return panelCollapsedSettings;
}
/** @deprecated Should be used only by DisplaySettingsManager. */
@Deprecated
public Map<String, String> getDropDownSettings()
......@@ -114,6 +127,12 @@ public class DisplaySettings implements Serializable, IsSerializable
this.columnSettings = columnSettings;
}
@SuppressWarnings("unused")
private final void setPanelCollapsedSettings(Map<String, Boolean> panelCollapsedSettings)
{
this.panelCollapsedSettings = panelCollapsedSettings;
}
@SuppressWarnings("unused")
private final void setTabSettings(Map<String, String> tabSettings)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment