Revision 5024 trunk/libraries/libCorePlugin/src/com/iver/core/mdiManager/NewSkin.java
NewSkin.java | ||
---|---|---|
347 | 347 |
* @see com.iver.andami.ui.mdiManager.MDIManager#getViewInfo(com.iver.andami.ui.mdiManager.View) |
348 | 348 |
*/ |
349 | 349 |
public ViewInfo getViewInfo(View v) { |
350 |
return vis.getViewInfo(v); |
|
350 |
//ViewInfo vi = new ViewInfo(); |
|
351 |
ViewInfo vi = vis.getViewInfo(v); |
|
352 |
JInternalFrame f = fvs.getJInternalFrame(v); |
|
353 |
vi.setX(f.getX()); |
|
354 |
vi.setY(f.getY()); |
|
355 |
vi.setHeight(f.getHeight()); |
|
356 |
vi.setWidth(f.getWidth()); |
|
357 |
// isClosed() doesn't work as (I) expected, why? Using isShowing instead |
|
358 |
vi.setClosed(!f.isShowing()); |
|
359 |
vi.setNormalBounds(f.getNormalBounds()); |
|
360 |
vi.setMaximized(f.isMaximum()); |
|
361 |
return vi; |
|
351 | 362 |
} |
352 | 363 |
|
353 | 364 |
/** |
... | ... | |
668 | 679 |
JDesktopPane pnl = f.getDesktopPane(); |
669 | 680 |
pnl.remove(f); |
670 | 681 |
f.setSize(new Dimension(vi.getWidth(),vi.getHeight())); |
682 |
f.setLocation(vi.getX(), vi.getY()); |
|
671 | 683 |
if (vi.isPalette()) { |
672 | 684 |
pnl.add(f, JDesktopPane.PALETTE_LAYER); |
673 | 685 |
f.setFocusable(false); |
674 | 686 |
} else { |
675 | 687 |
pnl.add(f, JDesktopPane.DEFAULT_LAYER); |
676 | 688 |
f.setFocusable(true); |
689 |
if (vi.isClosed()) { |
|
690 |
closeView(v); |
|
691 |
} |
|
677 | 692 |
} |
693 |
|
|
694 |
if (vi.isMaximized()) { |
|
695 |
try { |
|
696 |
f.setMaximum(true); |
|
697 |
} catch (PropertyVetoException e) { |
|
698 |
// TODO Auto-generated catch block |
|
699 |
//e.printStackTrace(); |
|
700 |
} |
|
701 |
f.setNormalBounds(vi.getNormalBounds()); |
|
702 |
} |
|
678 | 703 |
activateJInternalFrame(f); |
679 | 704 |
} |
680 | 705 |
} |
Also available in: Unified diff