|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.redfelineninja.awt.ColorBlockIcon
This icon is a single block of colour. This class could be used to provide a coloured button that will call a colour selector.
Constructor Summary | |
ColorBlockIcon()
|
|
ColorBlockIcon(java.awt.Color c)
|
|
ColorBlockIcon(java.awt.Color c,
java.awt.Dimension s)
|
Method Summary | |
boolean |
getAutoSize()
Detect whether this Icon will automatically resize to its environment. |
java.awt.Color |
getColor()
|
int |
getIconHeight()
Get the height of the icon. |
int |
getIconWidth()
Get the width of the icon. |
java.awt.Dimension |
getSize()
Returns the current size of this Icon. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
void |
setAutoSize(boolean a)
Set whether this icon should automatically resize to its environment. |
void |
setColor(java.awt.Color c)
|
void |
setSize(java.awt.Dimension s)
Set the size of the icon. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ColorBlockIcon()
public ColorBlockIcon(java.awt.Color c)
public ColorBlockIcon(java.awt.Color c, java.awt.Dimension s)
Method Detail |
public void setAutoSize(boolean a)
public boolean getAutoSize()
public void setSize(java.awt.Dimension s)
public java.awt.Dimension getSize()
public java.awt.Color getColor()
public void setColor(java.awt.Color c)
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |