This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.geepawhill.whiteboard.util; | |
import javafx.geometry.Bounds; | |
import javafx.geometry.Point2D; | |
import javafx.scene.Node; | |
import javafx.scene.shape.Rectangle; | |
public class PointPair | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.geepawhill.whiteboard.action; | |
import javafx.animation.Transition; | |
import javafx.geometry.Bounds; | |
import javafx.scene.layout.BorderPane; | |
import javafx.scene.layout.Pane; | |
import javafx.scene.paint.Color; | |
import javafx.scene.text.Font; | |
import javafx.scene.text.Text; | |
import javafx.scene.text.TextAlignment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.geepawhill.whiteboard.action; | |
import javafx.geometry.Bounds; | |
import javafx.scene.Node; | |
import javafx.scene.layout.Pane; | |
import javafx.scene.paint.Color; | |
import javafx.scene.shape.Rectangle; | |
public class EnterBoundsBox implements Action | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Desired code inside a thing that writes scripts: | |
Script writeIt() | |
{ | |
Format boxFormat = new Format(...); | |
LabelBox box1 = new LabelBox("Box 1", new Point(400d,400d), boxFormat); | |
LabelBox box2 = new LabelBox("Box 2", new Point(600d,600d), boxFormat); | |
Arrow arrow = new Arrow(box1,false,box2,true,boxFormat): | |
// here's the script proper | |
cue(3); // wait until the clock says it's 3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Actors allButOvals = new Actors(); | |
buildPhrase(); | |
clear(); | |
head("Dependencies"); | |
mark(146); | |
OvalText thrower = new OvalText("Thrower", new Point(1000d, 200d), commentFormat); | |
sketch(1000d, thrower); | |
OvalText catcher = new OvalText("Catcher", new Point(1500d, 200d), commentFormat); | |
sketch(1000d, catcher); | |
Spot throwerSpot = new Spot(1000d, 850d); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pattern is context().action().object(). | |
assume() starts the context for setting defaults, so assume().format(...) sets a default format | |
mark(ms) starts the script step context, saying, at time ms, do the action | |
then() just continues the previous mark | |
head() is a custom action, not a built-in, it clears the existing column and puts a headline up. | |
sketch() is a built-in, it will cause the following actor to be sketched. | |
letters() is a custom object(), creating a text and modifying it. | |
group(), name(), at() and format() are all built-ins, all objects support them. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Step stack() | |
{ | |
buildPhrase(); | |
head("A Program's Stack"); | |
drawStack(); | |
mark(22); | |
head("The Household Program"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assume() starts the context for setting defaults, so assume().format(...) sets a default format | |
mark(ms) starts the script step context, saying, at time ms, do the action | |
then() just continues the previous mark | |
head() is a custom action, not a built-in, it clears the existing column and puts a headline up. | |
sketch() is a built-in, it will cause the following actor to be sketched. | |
letters() is a custom object(), creating a text and modifying it. | |
group(), name(), at() and format() are all built-ins, all objects support them. | |
private Step stack2() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.geepawhill.contentment.script; | |
public class FluentScriptBuilder | |
{ | |
/////////////////////////////////////////////////////////////////////////////// | |
// This class and following function just get a line started | |
static class MarkContext | |
{ | |
// pretend convenience method for super-common agent-type 'Letters'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(In no particular order) | |
Nancy Willard -- Things Invisible To See | |
CJ Cherryh -- Cuckoo's Egg | |
David Foster Wallace -- Infinite Jest | |
John Sayles -- Pride of the Bimbos | |
George Eliot -- Middlemarch | |
Neal Stephenson -- Snow Crash | |
Vladimir Nabokov -- Lolita | |
Marilynn Robinson -- Housekeeping |
OlderNewer