Revision 11979 trunk/libraries/libCorePlugin/src/com/iver/core/mdiManager/NewSkin.java
NewSkin.java | ||
---|---|---|
914 | 914 |
|
915 | 915 |
public void changeWindowInfo(IWindow w, WindowInfo wi){ |
916 | 916 |
JInternalFrame f = fws.getJInternalFrame(w); |
917 |
f.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
|
|
918 |
JDesktopPane pnl = f.getDesktopPane();
|
|
919 |
pnl.remove(f);
|
|
920 |
int width;
|
|
921 |
int height;
|
|
922 |
if (wi.getWidth()!=-1)
|
|
923 |
width = wi.getWidth();
|
|
924 |
else
|
|
925 |
width = f.getWidth();
|
|
926 |
if (wi.getHeight()!=-1)
|
|
927 |
height = wi.getHeight();
|
|
928 |
else
|
|
929 |
height = f.getHeight();
|
|
930 |
f.setSize(new Dimension(width, height));
|
|
931 |
f.setLocation(wi.getX(), wi.getY());
|
|
932 |
if (wi.isPalette()) {
|
|
933 |
pnl.add(f, JDesktopPane.PALETTE_LAYER);
|
|
934 |
f.setFocusable(false);
|
|
935 |
} else {
|
|
936 |
pnl.add(f, JDesktopPane.DEFAULT_LAYER);
|
|
937 |
f.setFocusable(true);
|
|
938 |
if (wi.isClosed()) {
|
|
939 |
closeWindow(w);
|
|
940 |
}
|
|
941 |
}
|
|
917 |
f.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
|
|
918 |
JDesktopPane pnl = f.getDesktopPane();
|
|
919 |
pnl.remove(f);
|
|
920 |
int width;
|
|
921 |
int height;
|
|
922 |
if (wi.getWidth()!=-1)
|
|
923 |
width = wi.getWidth();
|
|
924 |
else
|
|
925 |
width = f.getWidth();
|
|
926 |
if (wi.getHeight()!=-1)
|
|
927 |
height = wi.getHeight();
|
|
928 |
else
|
|
929 |
height = f.getHeight();
|
|
930 |
f.setSize(new Dimension(width, height));
|
|
931 |
f.setLocation(wi.getX(), wi.getY());
|
|
932 |
if (wi.isPalette()) {
|
|
933 |
pnl.add(f, JDesktopPane.PALETTE_LAYER);
|
|
934 |
f.setFocusable(false);
|
|
935 |
} else {
|
|
936 |
pnl.add(f, JDesktopPane.DEFAULT_LAYER);
|
|
937 |
f.setFocusable(true);
|
|
938 |
if (wi.isClosed()) {
|
|
939 |
closeWindow(w);
|
|
940 |
}
|
|
941 |
}
|
|
942 | 942 |
|
943 |
if (wi.isMaximized()) {
|
|
944 |
try {
|
|
945 |
f.setMaximum(true);
|
|
946 |
} catch (PropertyVetoException e) {
|
|
947 |
// TODO Auto-generated catch block
|
|
948 |
//e.printStackTrace();
|
|
949 |
}
|
|
950 |
f.setNormalBounds(wi.getNormalBounds());
|
|
951 |
}
|
|
952 |
activateJInternalFrame(f);
|
|
953 |
} |
|
943 |
if (wi.isMaximized()) {
|
|
944 |
try {
|
|
945 |
f.setMaximum(true);
|
|
946 |
} catch (PropertyVetoException e) {
|
|
947 |
// TODO Auto-generated catch block
|
|
948 |
//e.printStackTrace();
|
|
949 |
}
|
|
950 |
f.setNormalBounds(wi.getNormalBounds());
|
|
951 |
}
|
|
952 |
activateJInternalFrame(f);
|
|
953 |
}
|
|
954 | 954 |
|
955 |
public void refresh(IWindow win) { |
|
956 |
Component frame = fws.getFrame(win); |
|
957 |
if (frame!=null) |
|
958 |
frame.setVisible(true); |
|
959 |
} |
|
960 |
|
|
955 | 961 |
public void setBackgroundImage(ImageIcon image, String typeDesktop) { |
956 | 962 |
this.image=image; |
957 | 963 |
this.typeDesktop=typeDesktop; |
Also available in: Unified diff