| Method from javax.swing.plaf.synth.SynthDesktopPaneUI$SynthDesktopManager Detail: |
public void deiconifyFrame(JInternalFrame f) {
JInternalFrame.JDesktopIcon desktopIcon = f.getDesktopIcon();
Container c = desktopIcon.getParent();
if (c != null) {
c = c.getParent();
if (c != null) {
c.add(f);
if (f.isMaximum()) {
int w = c.getWidth();
int h = c.getHeight() - taskBar.getHeight();
if (f.getWidth() != w || f.getHeight() != h) {
setBoundsForFrame(f, 0, 0, w, h);
}
}
if (f.isSelected()) {
f.moveToFront();
} else {
try {
f.setSelected(true);
} catch (PropertyVetoException e2) {
}
}
}
}
}
|
public void iconifyFrame(JInternalFrame f) {
JInternalFrame.JDesktopIcon desktopIcon;
Container c = f.getParent();
JDesktopPane d = f.getDesktopPane();
boolean findNext = f.isSelected();
if (c == null) {
return;
}
desktopIcon = f.getDesktopIcon();
if (!f.isMaximum()) {
f.setNormalBounds(f.getBounds());
}
c.remove(f);
c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
try {
f.setSelected(false);
} catch (PropertyVetoException e2) {
}
// Get topmost of the remaining frames
if (findNext) {
for (Component comp : c.getComponents()) {
if (comp instanceof JInternalFrame) {
try {
((JInternalFrame)comp).setSelected(true);
} catch (PropertyVetoException e2) {
}
((JInternalFrame)comp).moveToFront();
return;
}
}
}
}
|
public void maximizeFrame(JInternalFrame f) {
if (f.isIcon()) {
try {
f.setIcon(false);
} catch (PropertyVetoException e2) {
}
} else {
f.setNormalBounds(f.getBounds());
Component desktop = f.getParent();
setBoundsForFrame(f, 0, 0,
desktop.getWidth(),
desktop.getHeight() - taskBar.getHeight());
}
try {
f.setSelected(true);
} catch (PropertyVetoException e2) {
}
}
|
protected void removeIconFor(JInternalFrame f) {
super.removeIconFor(f);
taskBar.validate();
}
|
public void setBoundsForFrame(JComponent f,
int newX,
int newY,
int newWidth,
int newHeight) {
super.setBoundsForFrame(f, newX, newY, newWidth, newHeight);
if (taskBar != null && newY >= taskBar.getY()) {
f.setLocation(f.getX(), taskBar.getY()-f.getInsets().top);
}
}
|