- Tile: McBilliards thinks of a word as a Tile that can't be drawn. The manager has some
convenience methods for handling words:
M.getWord(); |
and |
M.setWord(word); |
To select T to be the current Tile for McBilliards to think about use:
M.selectTile(T); |
or alternately |
M.mcbSend(T); |
To listen for new tiles (or words) implement a method like this:
public void mcbReceive(Tile T){... word=T.getStringWord(); ...}
To get the currently selected tile call
M.getSelectedTile(); |
or equivalently |
((Tile)(M.mcbGet(Tile.class)) |
- Parameter: Use the Parameter class to get and receive points in the parameter space (triangles). To set the point in the parameter space you have several options (z is a Complex number, x and y are doubles):
M.setParameter(z); |
or |
M.setParameter(x,y); |
or |
M.mcbSend(new Parameter(z); |
or |
M.mcbSend(new Parameter(x,y); |
all are equivalent. To obtain the current point use
M.getZ(); |
, which is more convenient than |
((Parameter)(M.mcbGet(Parameter.class))).getZ(); |
To be notified when the point changes use a function of the form:
public void mcbReceive(Parameter p){
Complex z=p.getZ();
double x=p.getX(); // which equals z.x
double y=p.getY();
... do something ...
}
- RationalTriangle: Used to keep track of a rational point in the parameter space.
Get the current rational triangle with
((RationalTriangle)(M.mcbGet(RationalTriangle.class)))
You can listen for new rational triangles with
public void mcbReceive(RationalTriangle rt){...}
- HelpDocument: Suppose a component in McBilliards wishes to display the help document
"Files/Help/helpdoc.html" in the McBilliards documentation window. It should do a call of the form
M.mcbSend(new HelpDocument("helpdoc.html");
- SettingsRequest: A class supporting the settings popup might have an inner class
of the form
public static class ColorSettings implements Serializable {...}
To bring up the settings for this object, you can call
M.mcbSend(new SettingsRequest(ColorSettings.class));
Alternately, if you have an object of type ColorSettings called cs you can call
M.mcbSend(new SettingsRequest(cs.getClass()));
- Color: A class wishing to be notified when the current color changes can implement
M.mcbRecieve(Color color);
To get the current color:
M.getColor(); |
or |
(Color)mcbGet(Color.class); |
You can set the color either with
M.setColor(color); |
or |
M.mcbSend(color); |
- BasicSearchResults: Used for sending search results
- RationalLine: For changing the current rational line