org.xnap.gui.component
Class CloseableTabbedPane.EventIcon
java.lang.Object
org.xnap.gui.component.CloseableTabbedPane.EventIcon
- All Implemented Interfaces:
- javax.swing.Icon
- Enclosing class:
- CloseableTabbedPane
protected class CloseableTabbedPane.EventIcon
- extends java.lang.Object
- implements javax.swing.Icon
Acts as a proxy class for the closing icon.
The idea for this class stems from limewire's CancelSearchIconProxy
class, thanks for going open source guys.
Method Summary |
boolean |
contains(int xEvent,
int yEvent)
Verifies if x and y are within the icon's borders. |
int |
getIconHeight()
|
int |
getIconWidth()
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Overwrites paintIcon to get hold of the coordinates of the icon,
this is a rather rude approach just to find out if the icon
was pressed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CloseableTabbedPane.EventIcon
public CloseableTabbedPane.EventIcon(javax.swing.Icon icon)
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interface javax.swing.Icon
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interface javax.swing.Icon
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Overwrites paintIcon to get hold of the coordinates of the icon,
this is a rather rude approach just to find out if the icon
was pressed.
- Specified by:
paintIcon
in interface javax.swing.Icon
contains
public boolean contains(int xEvent,
int yEvent)
- Verifies if x and y are within the icon's borders.
Copyright © 2001-2005 XNap Team. All Rights Reserved.