package Current.plot.Plotters; import Current.basic.*; import Current.manage.*; import Current.plot.Dyadic.*; import java.awt.Color; import java.io.Serializable; import java.awt.Component; import java.awt.Canvas; /** * The billiard-like plot needs very little to do a plot. * * @author pat */ public class XCoverPlotter extends XDyadicPlotter implements Serializable { // default constructor public XCoverPlotter(){} public XCoverPlotter(XCoverPlotter p) { this.detail=p.detail; this.show_squares=p.show_squares; this.filter=p.filter; } /** Run the algorithm to plot the tile. */ public Tile plot(String word, Color C, Interrupter I, Manager M) { int mode=3; //cover DyadicPlotter DP=new DyadicPlotter(mode, show_squares, detail, filter, word, C, I); DP.Z=M.getZ(); DyadicTile DT=DP.basicPlot(); if(show_squares==2) M.setParameter(DP.Z.x,DP.Z.y); if (DT!=null) DT.xp=new XCoverPlotter(this); return DT; } public Component getController(Manager M){ return new PlottingDyadic(M,this); } public String getName() { return "cover"; } /** Returns true if the plot can be run. This is useful for example * if the plot relies on C code which may or may not be available */ public boolean canRun(){ return true; } /** This is the color of the button to render */ public Color getColor() { return new Color(255,100,0); } // public HelpDocument document() { // return new HelpDocument("Plotting.html"); // } }