/*
* 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.
*/
/**
* From MacDockIconUI
*
* A JRSUI L&F implementation of JInternalFrame.JDesktopIcon
* @author
* @version
*/
public class AquaInternalFrameDockIconUI extends DesktopIconUI implements MouseListener, MouseMotionListener, ComponentListener {
protected boolean fTrackingIcon = false;
return new AquaInternalFrameDockIconUI();
}
}
fDesktopIcon = null;
}
protected void installComponents() {
fIconPane = new ScaledImageLabel();
}
protected void uninstallComponents() {
}
protected void installListeners() {
fDesktopIcon.addMouseListener(this);
fFrame.addComponentListener(this);
}
protected void uninstallListeners() {
fFrame.removeComponentListener(this);
fDesktopIcon.removeMouseListener(this);
}
}
}
}
}
void updateIcon() {
}
}
if (fTrackingIcon) {
fTrackingIcon = false;
if (fIconPane.mouseInIcon(e)) {
try {
} catch(final PropertyVetoException e2) {}
} else {
}
}
}
// if the mouse was completely outside fIconPane, hide the label
}
}
}
}
}
ScaledImageLabel() {
}
void updateIcon() {
return;
}
// Protect us from unsized frames, like in JCK test DefaultDesktopManager2008
width = 128;
height = 128;
}
g.dispose();
// Sending in -1 for width xor height causes it to maintain aspect ratio
final ImageIcon icon = new ImageIcon(fImage.getScaledInstance((int)(width * scale), -1, Image.SCALE_SMOOTH));
}
if (!fTrackingIcon) {
super.paint(g);
return;
}
super.paint(g);
}
}
}
}
super(text);
setOpaque(false);
setSize(SwingUtilities.computeStringWidth(metrics, getText()) + ROUND_ADDITIONAL_WIDTH * 2, metrics.getAscent() + NUB_HEIGHT + ROUND_ADDITIONAL_HEIGHT);
}
}
}
if (p instanceof JRootPane) {
if (p.getParent() instanceof JInternalFrame) continue;
break;
}
}
setLocation(p.x, p.y);
if (parent instanceof JLayeredPane) {
}
}
public void hide() {
}
}
}