Skip to content
Snippets Groups Projects
Commit 0bbd70e6 authored by buczekp's avatar buczekp
Browse files

[LMS-1600] refactoring

SVN: 16916
parent 0e517d46
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ abstract public class DisposableSectionPanel extends SingleSectionPanel ...@@ -46,7 +46,7 @@ abstract public class DisposableSectionPanel extends SingleSectionPanel
} }
@Override @Override
protected void disposeComponents() public void disposeComponents()
{ {
if (disposableComponentOrNull != null) if (disposableComponentOrNull != null)
{ {
......
...@@ -42,9 +42,10 @@ abstract public class SingleSectionPanel extends ContentPanel ...@@ -42,9 +42,10 @@ abstract public class SingleSectionPanel extends ContentPanel
private boolean isContentVisible = false; private boolean isContentVisible = false;
/** /**
* whether additional components created for this section (e.g. browsers) should be automatically * Whether additional components created for this section (e.g. browsers) should be
* disposed (for sections that can temporarily removed from container as in * automatically disposed when the section is detached from its container. For sections that can
* {@link SectionsPanel} it should be turned off until detach from the container) * temporarily removed from container as in {@link SectionsPanel} it should be turned off and
* the container should dispose section components manually.
*/ */
private boolean autoDisposeComponents = true; private boolean autoDisposeComponents = true;
...@@ -95,14 +96,9 @@ abstract public class SingleSectionPanel extends ContentPanel ...@@ -95,14 +96,9 @@ abstract public class SingleSectionPanel extends ContentPanel
return isContentVisible; return isContentVisible;
} }
public void enableAutoDisposeComponents()
{
setAutoDisposeComponents(true);
}
public void disableAutoDisposeComponents() public void disableAutoDisposeComponents()
{ {
setAutoDisposeComponents(false); this.autoDisposeComponents = false;
} }
protected boolean isAutoDisposeComponents() protected boolean isAutoDisposeComponents()
...@@ -110,11 +106,6 @@ abstract public class SingleSectionPanel extends ContentPanel ...@@ -110,11 +106,6 @@ abstract public class SingleSectionPanel extends ContentPanel
return autoDisposeComponents; return autoDisposeComponents;
} }
private void setAutoDisposeComponents(boolean autoDisposeComponent)
{
this.autoDisposeComponents = autoDisposeComponent;
}
@Override @Override
protected void onDetach() protected void onDetach()
{ {
...@@ -126,7 +117,7 @@ abstract public class SingleSectionPanel extends ContentPanel ...@@ -126,7 +117,7 @@ abstract public class SingleSectionPanel extends ContentPanel
} }
/** disposes components created for the section (by default does nothing) */ /** disposes components created for the section (by default does nothing) */
protected void disposeComponents() public void disposeComponents()
{ {
} }
......
...@@ -540,7 +540,7 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod ...@@ -540,7 +540,7 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod
public void dispose() public void dispose()
{ {
debug("dispose a tab"); debug("dispose a browser");
self.disposeCache(); self.disposeCache();
} }
......
...@@ -158,7 +158,7 @@ public class SectionsPanel extends ContentPanel ...@@ -158,7 +158,7 @@ public class SectionsPanel extends ContentPanel
{ {
for (SectionElement el : elements) for (SectionElement el : elements)
{ {
el.getPanel().enableAutoDisposeComponents(); el.getPanel().disposeComponents();
} }
super.onDetach(); super.onDetach();
} }
......
...@@ -73,7 +73,7 @@ public class DataViewSection extends SingleSectionPanel ...@@ -73,7 +73,7 @@ public class DataViewSection extends SingleSectionPanel
} }
@Override @Override
protected void disposeComponents() public void disposeComponents()
{ {
disposeCurrentReport(); disposeCurrentReport();
} }
......
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