Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected Color mainColour
protected Color borderColour
protected int totalWidth
protected int totalHeight
protected int borderWidth
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)
colour
- the colour.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()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.