/*
* 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.
*/
/**
* Motif rendition of the component.
*
* @author Thomas Ball
* @author Rich Schiavi
*/
{
// This is only used for its system menu, but we need a reference to it so
// we can remove its listeners.
return new MotifDesktopIconUI();
}
public MotifDesktopIconUI() {
}
protected void installDefaults(){
super.installDefaults();
// An underhanded way of creating a system popup menu.
}
protected void installComponents(){
}
protected void uninstallComponents(){
}
protected void installListeners(){
super.installListeners();
}
return desktopIcon;
}
desktopIcon = d;
}
return frame;
}
frame = f ;
}
protected void showSystemMenu(){
}
protected void hideSystemMenu(){
systemMenu.setVisible(false);
}
}
return new IconButton(i);
}
return new DesktopIconActionListener();
}
return new DesktopIconMouseListener();
}
protected void uninstallDefaults(){
super.uninstallDefaults();
}
protected void uninstallListeners(){
super.uninstallListeners();
}
int w = defaultIcon.getIconWidth();
}
return new Dimension(w, h);
}
return getMinimumSize(c);
}
return getMinimumSize(c);
}
/**
* Returns the default desktop icon.
*/
return defaultIcon;
}
/**
* Sets the icon used as the default desktop icon.
*/
}
super();
this.frame = f;
// Forward mouse events to titlebar for moves.
public void mouseDragged(MouseEvent e) {
}
public void mouseMoved(MouseEvent e) {
}
});
addMouseListener(new MouseListener() {
public void mouseClicked(MouseEvent e) {
}
public void mousePressed(MouseEvent e) {
}
public void mouseReleased(MouseEvent e) {
}
public void mouseEntered(MouseEvent e) {
}
public void mouseExited(MouseEvent e) {
}
});
}
e.getYOnScreen(), e.getClickCount(),
}
public boolean isFocusTraversable() {
return false;
}
}
int w = 4;
}
}
super.paint(g);
// touch-up frame
// fill background
getDescent();
}
}
}
super(icon);
// Forward mouse events to titlebar for moves.
public void mouseDragged(MouseEvent e) {
}
public void mouseMoved(MouseEvent e) {
}
});
addMouseListener(new MouseListener() {
public void mouseClicked(MouseEvent e) {
}
public void mousePressed(MouseEvent e) {
}
public void mouseReleased(MouseEvent e) {
if (!systemMenu.isShowing()) {
}
}
public void mouseEntered(MouseEvent e) {
}
public void mouseExited(MouseEvent e) {
}
});
}
}
public boolean isFocusTraversable() {
return false;
}
}
}
}
// if we drag or move we should deengage the popup
if (e.getClickCount() > 1) {
try {
} catch (PropertyVetoException e2){ }
systemMenu.setVisible(false);
/* the mouse release will not get reported correctly,
because the icon will no longer be in the hierarchy;
maybe that should be fixed, but until it is, we need
to do the required cleanup here. */
}
}
}
}