/* * McbTile.java * * Created on December 1, 2005, 1:41 PM */ package Current.popups.Memory; import Current.plot.Plotters.*; import Current.basic.*; import Current.manage.*; import java.awt.*; /** * * @author pat */ public class McbTile implements Tile { protected String W; protected Color C; protected XPlotter plotter; /** Creates a new instance of McbTile */ public McbTile(String W, Color C) { this.W=W; this.C=C; } /** Creates a new instance of McbTile */ public McbTile(String W, Color C, XPlotter plotter) { this.W=W; this.C=C; this.plotter=plotter; } public boolean contains(double x, double y) { return false; } public java.awt.geom.Rectangle2D getBounds() { return null; } public String getStringWord() { return W; } public boolean isPaintable() { return false; } public boolean isSaveable() { return false; } public void paint(Graphics2D g, java.awt.geom.AffineTransform T) { System.err.println("A McbTile cannot be drawn!"); } public void paintSelected(Graphics2D g, java.awt.geom.AffineTransform T) { System.err.println("A McbTile cannot be drawn!"); } public void setColor(Color C) { this.C=C; } public Color getColor() { return C; } /** may return null */ public XPlotter getPlotter() { return plotter; } public boolean canReconstruct() { return ((plotter!=null)&&(C!=null)&&(W!=null)); } public Tile reconstruct(Interrupter I, Manager M) { if ((plotter==null)||(C==null)||(W==null)) { return null; } return plotter.plot(W, C, I, M); } }