Methods Summary |
---|
protected com.sun.java.swing.plaf.motif.MotifDesktopIconUI$DesktopIconActionListener | createDesktopIconActionListener()
return new DesktopIconActionListener();
|
protected com.sun.java.swing.plaf.motif.MotifDesktopIconUI$DesktopIconMouseListener | createDesktopIconMouseListener()
return new DesktopIconMouseListener();
|
protected com.sun.java.swing.plaf.motif.MotifDesktopIconUI$IconButton | createIconButton(javax.swing.Icon i)
return new IconButton(i);
|
protected com.sun.java.swing.plaf.motif.MotifDesktopIconUI$IconLabel | createIconLabel(javax.swing.JInternalFrame frame)
return new IconLabel(frame);
|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent c)
return new MotifDesktopIconUI();
|
public javax.swing.Icon | getDefaultIcon()Returns the default desktop icon.
return defaultIcon;
|
javax.swing.JInternalFrame$JDesktopIcon | getDesktopIcon()
return desktopIcon;
|
javax.swing.JInternalFrame | getFrame()
return frame;
|
public java.awt.Dimension | getMaximumSize(javax.swing.JComponent c)
return getMinimumSize(c);
|
public java.awt.Dimension | getMinimumSize(javax.swing.JComponent c)
JInternalFrame iframe = desktopIcon.getInternalFrame();
int w = defaultIcon.getIconWidth();
int h = defaultIcon.getIconHeight() + LABEL_HEIGHT + LABEL_DIVIDER;
Border border = iframe.getBorder();
if(border != null) {
w += border.getBorderInsets(iframe).left +
border.getBorderInsets(iframe).right;
h += border.getBorderInsets(iframe).bottom +
border.getBorderInsets(iframe).top;
}
return new Dimension(w, h);
|
public java.awt.Dimension | getPreferredSize(javax.swing.JComponent c)
return getMinimumSize(c);
|
protected void | hideSystemMenu()
systemMenu.setVisible(false);
|
protected void | installComponents()
|
protected void | installDefaults()
super.installDefaults();
setDefaultIcon(UIManager.getIcon("DesktopIcon.icon"));
iconButton = createIconButton(defaultIcon);
// An underhanded way of creating a system popup menu.
sysMenuTitlePane = new MotifInternalFrameTitlePane(frame);
systemMenu = sysMenuTitlePane.getSystemMenu();
MotifBorders.FrameBorder border = new MotifBorders.FrameBorder(desktopIcon);
desktopIcon.setLayout(new BorderLayout());
iconButton.setBorder(border);
desktopIcon.add(iconButton, BorderLayout.CENTER);
iconLabel = createIconLabel(frame);
iconLabel.setBorder(border);
desktopIcon.add(iconLabel, BorderLayout.SOUTH);
desktopIcon.setSize(desktopIcon.getPreferredSize());
desktopIcon.validate();
JLayeredPane.putLayer(desktopIcon, JLayeredPane.getLayer(frame));
|
protected void | installListeners()
super.installListeners();
desktopIconActionListener = createDesktopIconActionListener();
desktopIconMouseListener = createDesktopIconMouseListener();
iconButton.addActionListener(desktopIconActionListener);
iconButton.addMouseListener(desktopIconMouseListener);
|
public void | setDefaultIcon(javax.swing.Icon newIcon)Sets the icon used as the default desktop icon.
defaultIcon = newIcon;
|
void | setDesktopIcon(javax.swing.JInternalFrame$JDesktopIcon d)
desktopIcon = d;
|
void | setFrame(javax.swing.JInternalFrame f)
frame = f ;
|
protected void | showSystemMenu()
systemMenu.show(iconButton, 0, getDesktopIcon().getHeight());
|
protected void | uninstallComponents()
|
protected void | uninstallDefaults()
super.uninstallDefaults();
desktopIcon.setLayout(null);
desktopIcon.remove(iconButton);
desktopIcon.remove(iconLabel);
|
protected void | uninstallListeners()
super.uninstallListeners();
iconButton.removeActionListener(desktopIconActionListener);
iconButton.removeMouseListener(desktopIconMouseListener);
sysMenuTitlePane.uninstallListeners();
|