|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ast.gui.ColourIcon
public class ColourIcon
Creates a rectangular Icon that is painted with a given colour and has a coloured border of a specified thickness.
Field Summary | |
---|---|
protected Color |
borderColour
Border colour of the icon. |
protected int |
borderWidth
Width of the coloured border. |
protected Color |
mainColour
Colour of the icon. |
protected int |
totalHeight
Height of the Icon. |
protected int |
totalWidth
Width of the icon. |
Constructor Summary | |
---|---|
ColourIcon(Color colour)
Create an icon with the given colour and defaults. |
|
ColourIcon(Color mainColour,
int width,
int height,
Color borderColour,
int thickness)
Create an icon with the given colours and sizes. |
Method Summary | |
---|---|
Color |
getBorderColour()
Get the border colour. |
int |
getBorderWidth()
Get the border width. |
int |
getIconHeight()
Get the icon height. |
int |
getIconWidth()
Get the icon width. |
Color |
getMainColour()
Get the icon colour. |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
Re-draw the Icon. |
void |
setBorderColour(Color borderColour)
Set the border colour. |
void |
setBorderWidth(int width)
Set the border width. |
void |
setIconHeight(int height)
Set the icon height. |
void |
setIconWidth(int width)
Set the icon width. |
void |
setMainColour(Color mainColour)
Set the icon colour. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Color mainColour
protected Color borderColour
protected int totalWidth
protected int totalHeight
protected int borderWidth
Constructor Detail |
---|
public ColourIcon(Color mainColour, int width, int height, Color borderColour, int thickness)
mainColour
- the colour.width
- the total width.height
- the total height.borderColour
- the colour of the border.thickness
- the thickness of the border.public ColourIcon(Color colour)
mainColour
- the colour.Method Detail |
---|
public void setMainColour(Color mainColour)
mainColour
- the colour.public Color getMainColour()
public void setBorderColour(Color borderColour)
borderColour
- the colour.public Color getBorderColour()
public void setIconWidth(int width)
width
- the total width of the icon.public int getIconWidth()
getIconWidth
in interface Icon
public void setIconHeight(int height)
height
- the total width of the icon.public int getIconHeight()
getIconHeight
in interface Icon
public void setBorderWidth(int width)
width
- the width of the border region.public int getBorderWidth()
public void paintIcon(Component c, Graphics g, int x, int y)
paintIcon
in interface Icon
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |