public class DrawingColorIcon
extends javax.swing.ImageIcon
The behavior for choosing the drawn color matches with
DrawingColorChooserAction
.
Constructor and Description |
---|
DrawingColorIcon(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
java.awt.Image image,
java.awt.Shape colorShape) |
DrawingColorIcon(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
java.net.URL imageLocation,
java.awt.Shape colorShape)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics gr,
int x,
int y) |
public DrawingColorIcon(DrawingEditor editor, AttributeKey<java.awt.Color> key, java.net.URL imageLocation, java.awt.Shape colorShape)
editor
- The drawing editor.key
- The key of the default attributeimageLocation
- the icon imagecolorShape
- The shape to be drawn with the color of the default
attribute.public DrawingColorIcon(DrawingEditor editor, AttributeKey<java.awt.Color> key, java.awt.Image image, java.awt.Shape colorShape)