|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.malai.widget.MButtonIcon
public class MButtonIcon
A button icon can be used in a Button (JButton, MButton) to display a colour in a button.
This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN
Malai is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
06/05/2010
Field Summary | |
---|---|
private java.awt.Color |
color
The colour of the icon |
static java.awt.Color |
EDGE
The colour of the borders of the icon |
static int |
HEIGHT
he height of the icon |
private static long |
serialVersionUID
|
static int |
WIDTH
The width of the icon |
Constructor Summary | |
---|---|
MButtonIcon(java.awt.Color color)
The constructor using a colour. |
Method Summary | |
---|---|
java.awt.Color |
getColor()
|
int |
getIconHeight()
|
int |
getIconWidth()
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
void |
setColor(java.awt.Color c)
Sets the colour of the interior of the icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.awt.Color color
public static final java.awt.Color EDGE
public static final int WIDTH
public static final int HEIGHT
Constructor Detail |
---|
public MButtonIcon(java.awt.Color color)
color
- The colour of the icon.
java.lang.IllegalArgumentException
- if the given colour is null.Method Detail |
---|
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
public java.awt.Color getColor()
public void setColor(java.awt.Color c)
c
- The new Colour of the interior of the icon. If null, nothing is done.public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |