Skip to content
Snippets Groups Projects
Commit 07c807be authored by Gregory Viguier's avatar Gregory Viguier
Browse files

- new method initDockingCoreArea()

parent 1bdd7ff7
No related branches found
No related tags found
No related merge requests found
...@@ -31,11 +31,16 @@ public class VlDockDockingManager extends ADockingManager { ...@@ -31,11 +31,16 @@ public class VlDockDockingManager extends ADockingManager {
UIManager.getDefaults().put("TabbedDockableContainer.tabPlacement", 1); UIManager.getDefaults().put("TabbedDockableContainer.tabPlacement", 1);
} }
@Override
protected void initDockingArea() {
mainDockingDesktop = new SoleilDockingDesktop();
mainDockingDesktop.setOpaqueContents(true);
}
@Override @Override
public JComponent getDockingArea() { public JComponent getDockingArea() {
if (mainDockingDesktop == null) { if (mainDockingDesktop == null) {
mainDockingDesktop = (SoleilDockingDesktop) new SoleilDockingDesktop(); initDockingArea();
mainDockingDesktop.setOpaqueContents(true);
} }
return mainDockingDesktop; return mainDockingDesktop;
} }
...@@ -46,8 +51,7 @@ public class VlDockDockingManager extends ADockingManager { ...@@ -46,8 +51,7 @@ public class VlDockDockingManager extends ADockingManager {
@Override @Override
public JComponent createNewDockingArea(Color background) { public JComponent createNewDockingArea(Color background) {
SoleilDockingDesktop result = new SoleilDockingDesktop(false, false, SoleilDockingDesktop result = new SoleilDockingDesktop(false, false, true, false);
true, false);
if (background != null) { if (background != null) {
result.setBackground(background); result.setBackground(background);
} }
...@@ -55,16 +59,14 @@ public class VlDockDockingManager extends ADockingManager { ...@@ -55,16 +59,14 @@ public class VlDockDockingManager extends ADockingManager {
} }
@Override @Override
public void setDockingAreaBeackground(JComponent dockingArea, public void setDockingAreaBeackground(JComponent dockingArea, Color areaBackground) {
Color areaBackground) {
if (dockingArea != null) { if (dockingArea != null) {
dockingArea.setBackground(areaBackground); dockingArea.setBackground(areaBackground);
} }
} }
@Override @Override
public void loadPerspective(IPerspective perspective) public void loadPerspective(IPerspective perspective) throws DockingException {
throws DockingException {
DockingException dockingException = null; DockingException dockingException = null;
if (perspective.getByteArray().length > 0) { if (perspective.getByteArray().length > 0) {
...@@ -76,8 +78,7 @@ public class VlDockDockingManager extends ADockingManager { ...@@ -76,8 +78,7 @@ public class VlDockDockingManager extends ADockingManager {
ois = new ObjectInputStream(bais); ois = new ObjectInputStream(bais);
mainDockingDesktop.readXML(ois); mainDockingDesktop.readXML(ois);
} catch (Exception e) { } catch (Exception e) {
dockingException = new DockingException("Perspective.load() :" dockingException = new DockingException("Perspective.load() :" + " Unexpected Error", e);
+ " Unexpected Error", e);
} finally { } finally {
try { try {
if (ois != null) { if (ois != null) {
...@@ -86,8 +87,7 @@ public class VlDockDockingManager extends ADockingManager { ...@@ -86,8 +87,7 @@ public class VlDockDockingManager extends ADockingManager {
// Actually there is no effect to close bais ... // Actually there is no effect to close bais ...
} catch (IOException e) { } catch (IOException e) {
if (dockingException == null) { if (dockingException == null) {
dockingException = new DockingException( dockingException = new DockingException("I/O Exception", e);
"I/O Exception", e);
} else { } else {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -110,8 +110,8 @@ public class VlDockDockingManager extends ADockingManager { ...@@ -110,8 +110,8 @@ public class VlDockDockingManager extends ADockingManager {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
JOptionPane.showMessageDialog(mainDockingDesktop, JOptionPane.showMessageDialog(mainDockingDesktop,
"Perspective.save() :" + " Unexpected Error (see traces)", "Perspective.save() :" + " Unexpected Error (see traces)", "VLDock - Error",
"VLDock - Error", JOptionPane.ERROR_MESSAGE); JOptionPane.ERROR_MESSAGE);
} finally { } finally {
try { try {
ous.close(); ous.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment