|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.beanfabrics.swing.ErrorIconPainter
public class ErrorIconPainter
The ErrorIconPainter
is a helper class for painting an error icon on
top of any component.
Constructor Summary | |
---|---|
ErrorIconPainter()
Creates a new ErrorIconPainter with the default settings. |
Method Summary | |
---|---|
protected void |
checkHorizontalKey(int key)
Checks if the given integer is a valid key for horizontal alignment and throws an IllegalArgumentException if the key is invalid. |
protected void |
checkVerticalKey(int key)
Checks if the given integer is a valid key for vertical alignment and throws an IllegalArgumentException if the key is invalid. |
java.awt.Dimension |
getDimension()
Gets the size of the error icon. |
javax.swing.ImageIcon |
getErrorIcon()
Gets the error icon that is used when the component has no focus. |
javax.swing.ImageIcon |
getErrorIconFocused()
Returns the error icon that is used when the component has the focus. |
int |
getHorizontalAlignment()
Returns the horizontal alignment of the icon. |
java.awt.Insets |
getMargin()
Returns the margin of the error icon. |
java.awt.Point |
getOffset()
Returns the icon's offset position. |
int |
getVerticalAlignment()
Returns the vertical alignment of the icon. |
void |
paint(java.awt.Graphics g,
java.awt.Component c)
Paints the error icon onto the given Graphics object by using the
given component to calculate the icons loacation. |
void |
setErrorIcon(javax.swing.ImageIcon aErrorIcon)
Sets the error icon that sould be rendered when the component has no focus. |
void |
setErrorIconFocused(javax.swing.ImageIcon aErrorIconFocused)
Sets the error icon that sould be rendered when the component has the focus. |
void |
setHorizontalAlignment(int horizontalAlignment)
Sets the horizontal alignment of the icon. |
void |
setMargin(java.awt.Insets margin)
Sets the margin of the error icon. |
void |
setOffset(java.awt.Point offset)
Sets the icon's offset position. |
void |
setVerticalAlignment(int verticalAlignment)
Sets the vertical alignment of the icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorIconPainter()
ErrorIconPainter
with the default settings.
Method Detail |
---|
public java.awt.Insets getMargin()
public void setMargin(java.awt.Insets margin)
margin
- public int getHorizontalAlignment()
public void setHorizontalAlignment(int horizontalAlignment)
horizontalAlignment
- protected void checkHorizontalKey(int key)
IllegalArgumentException
if the key is invalid.
key
- public int getVerticalAlignment()
public void setVerticalAlignment(int verticalAlignment)
verticalAlignment
- protected void checkVerticalKey(int key)
IllegalArgumentException
if the key is invalid.
key
- public java.awt.Point getOffset()
public void setOffset(java.awt.Point offset)
offset
- public java.awt.Dimension getDimension()
public javax.swing.ImageIcon getErrorIcon()
public void setErrorIcon(javax.swing.ImageIcon aErrorIcon)
aErrorIcon
- public javax.swing.ImageIcon getErrorIconFocused()
public void setErrorIconFocused(javax.swing.ImageIcon aErrorIconFocused)
aErrorIconFocused
- public void paint(java.awt.Graphics g, java.awt.Component c)
Graphics
object by using the
given component to calculate the icons loacation.
g
- c
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |