Skip to content
Snippets Groups Projects
Commit 418c6b01 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT Committed by Patrick MADELA
Browse files

minor bug correction

parent 7a259b10
No related branches found
No related tags found
No related merge requests found
...@@ -75,8 +75,7 @@ public abstract class AbstractViewFactory implements IViewFactory { ...@@ -75,8 +75,7 @@ public abstract class AbstractViewFactory implements IViewFactory {
// this method // this method
} }
@Override protected IView addView(IView view, boolean warnSupport) {
public IView addView(IView view) {
IView added = null; IView added = null;
if (view != null) { if (view != null) {
Object id = view.getId(); Object id = view.getId();
...@@ -89,7 +88,7 @@ public abstract class AbstractViewFactory implements IViewFactory { ...@@ -89,7 +88,7 @@ public abstract class AbstractViewFactory implements IViewFactory {
} }
} }
} }
if (added != null) { if (warnSupport && (added != null)) {
synchronized (support) { synchronized (support) {
support.firePropertyChange(VIEWS, null, view); support.firePropertyChange(VIEWS, null, view);
} }
...@@ -97,6 +96,11 @@ public abstract class AbstractViewFactory implements IViewFactory { ...@@ -97,6 +96,11 @@ public abstract class AbstractViewFactory implements IViewFactory {
return added; return added;
} }
@Override
public IView addView(IView view) {
return addView(view, true);
}
@Override @Override
public IView removeView(Object id) { public IView removeView(Object id) {
IView toRemove; IView toRemove;
...@@ -122,7 +126,7 @@ public abstract class AbstractViewFactory implements IViewFactory { ...@@ -122,7 +126,7 @@ public abstract class AbstractViewFactory implements IViewFactory {
public IView addView(String title, Icon icon, Component component, Object id, JComponent dockingArea) { public IView addView(String title, Icon icon, Component component, Object id, JComponent dockingArea) {
IView view = createView(title, icon, component, id); IView view = createView(title, icon, component, id);
updateViewForDockingArea(view, dockingArea); updateViewForDockingArea(view, dockingArea);
return addView(view); return addView(view, false);
} }
protected abstract IView createView(String title, Icon icon, Component component, Object id); protected abstract IView createView(String title, Icon icon, Component component, Object id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment