public class ScaledImageTintDecorator extends java.lang.Object implements DisplayDecorator
ScaledImageDisplay. The associated
object must have a color method.
(Precondition: the GridObjectDisplay object to which this
decorator is applied must be a ScaledImageDisplay and the
grid objects it displays must have a color method.)| Constructor and Description |
|---|
ScaledImageTintDecorator() |
| Modifier and Type | Method and Description |
|---|---|
void |
decorate(GridObjectDisplay disp,
GridObject obj,
java.awt.Component comp,
java.awt.Graphics2D g2)
Decorate the ScaledImageDisplay so that it appears tinted.
|
void |
tint(ScaledImageDisplay imageDisplay,
GridObject obj,
java.awt.Component comp,
java.awt.Graphics2D g2)
Adjusts the graphics system to use an object's color to tint an image.
|
public void decorate(GridObjectDisplay disp, GridObject obj, java.awt.Component comp, java.awt.Graphics2D g2)
decorate in interface DisplayDecoratorpublic void tint(ScaledImageDisplay imageDisplay, GridObject obj, java.awt.Component comp, java.awt.Graphics2D g2)
obj has a color method.)obj - object we want to drawcomp - the component we're drawing ong2 - drawing surface