/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
return new AquaInternalFramePaneUI();
}
if (c.isOpaque()) {
super.update(g, c);
return;
}
paint(g, c);
}
super.installUI(c);
fLayoutMgr = new DockLayoutManager();
c.setLayout(fLayoutMgr);
c.addMouseListener(this);
}
c.removeMouseListener(this);
}
if (fLayoutMgr != null) {
fLayoutMgr = null;
}
super.uninstallUI(c);
}
// Our superclass hardcodes DefaultDesktopManager - how rude!
protected void installDesktopManager() {
desktopManager = new AquaDockingDesktopManager();
}
}
protected void uninstallDesktopManager() {
if (manager instanceof AquaDockingDesktopManager) {
}
}
}
return fDock;
}
}
}
}
}
}
}
setBorder(this);
setVisible(false);
}
public void removeNotify() {
super.removeNotify();
}
void updateSize() {
final Dimension d = getPreferredSize();
setBounds((getParent().getWidth() - d.width) / 2, getParent().getHeight() - d.height, d.width, d.height);
}
super.add(c);
if (!isVisible()) {
setVisible(true);
}
updateSize();
validate();
return c;
}
super.remove(c);
if (getComponentCount() == 0) {
setVisible(false);
} else {
updateSize();
validate();
}
}
}
public boolean isBorderOpaque() {
return false;
}
public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int w, final int h) {
if (!(g instanceof Graphics2D)) return;
}
}
removeIconFor(f);
}
removeIconFor(f);
// <rdar://problem/3712485> removed f.show(). show() is now deprecated and
// it wasn't sending our frame to front nor selecting it. Now, we move it
// to front and select it manualy. (vm)
f.moveToFront();
try {
f.setSelected(true);
}
// paint the frame onto the icon before hiding the frame, else the contents won't show
super.iconifyFrame(f);
}
}
}
if (selectedFrame != null) {
try {
selectedFrame.setSelected(false);
} catch (PropertyVetoException ex) {}
}
}
}