|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.extensions.jfcunit.finder.IconMatcher
Class for comparing that two Icon
s match.
Field Summary | |
private int |
m_ich
Height of the icon. |
private javax.swing.Icon |
m_icon
The icon of the first component. |
private int[] |
m_iconData
iconData read from the icon given. |
private int |
m_icw
width of the icon. |
private int |
m_incr
Increment for performing spot checks across the icons to speed performance of not equals comparisons. |
private int |
m_size
Size of the icon. |
Constructor Summary | |
IconMatcher(javax.swing.Icon icon)
Constructor accepting all arguments needed to filter the component. |
Method Summary | |
javax.swing.Icon |
getIcon()
Get the icon to be matched. |
private int[] |
iconToArray(javax.swing.Icon icon)
Paint the icon into an array of int. |
boolean |
matches(javax.swing.Icon other)
Method that returns true if the given icon matches the one in this matcher. |
void |
setIcon(javax.swing.Icon icon)
Set the Icon to be matched. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private javax.swing.Icon m_icon
private int[] m_iconData
private int m_ich
private int m_icw
private int m_incr
private int m_size
Constructor Detail |
public IconMatcher(javax.swing.Icon icon) throws java.lang.InterruptedException
icon
- The desired pattern for the icon of the component.
java.lang.InterruptedException
- when the PixelGrabber.grabPixels()
is interrupted.Method Detail |
public final void setIcon(javax.swing.Icon icon) throws java.lang.InterruptedException
icon
- Icon icon to match.
java.lang.InterruptedException
- may be thrown when
converting the icon to an array.public final javax.swing.Icon getIcon()
public boolean matches(javax.swing.Icon other)
other
- The other Icon to be compared
private int[] iconToArray(javax.swing.Icon icon) throws java.lang.InterruptedException
icon
- Icon to be painted.
java.lang.InterruptedException
- when
PixelGrabber.grabPixels() is interrupted.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |