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

minor code cleaning

parent 39823b39
Branches
Tags
No related merge requests found
...@@ -32,7 +32,6 @@ import fr.soleil.docking.vl.SoleilDockingDesktop; ...@@ -32,7 +32,6 @@ import fr.soleil.docking.vl.SoleilDockingDesktop;
public class VlDockView implements IView, Dockable, DockingActionListener, FocusListener { public class VlDockView implements IView, Dockable, DockingActionListener, FocusListener {
protected Object id; protected Object id;
protected boolean enabled; protected boolean enabled;
protected boolean visible;
protected String title; protected String title;
protected Component component; protected Component component;
protected Icon icon; protected Icon icon;
...@@ -84,17 +83,17 @@ public class VlDockView implements IView, Dockable, DockingActionListener, Focus ...@@ -84,17 +83,17 @@ public class VlDockView implements IView, Dockable, DockingActionListener, Focus
@Override @Override
public boolean isVisible() { public boolean isVisible() {
DockableState state = dockingDesktop.getDockableState(this); DockableState state = dockingDesktop.getDockableState(this);
boolean tempVisible = false; boolean visible = false;
if (state != null) { if (state != null) {
Location location = state.getLocation(); Location location = state.getLocation();
tempVisible = (location != Location.CLOSED) && (location != Location.HIDDEN); visible = (location != Location.CLOSED) && (location != Location.HIDDEN);
} }
return visible || tempVisible; return visible;
} }
@Override @Override
public void setVisible(boolean visible) { public void setVisible(boolean visible) {
this.visible = visible; if (visible != isVisible()) {
if (visible) { if (visible) {
dockingDesktop.showDockable(this); dockingDesktop.showDockable(this);
} else { } else {
...@@ -103,6 +102,7 @@ public class VlDockView implements IView, Dockable, DockingActionListener, Focus ...@@ -103,6 +102,7 @@ public class VlDockView implements IView, Dockable, DockingActionListener, Focus
component.setVisible(visible); component.setVisible(visible);
component.setEnabled(visible); component.setEnabled(visible);
} }
}
@Override @Override
public void select() { public void select() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment