public class InstructionViewer extends java.lang.Object implements Config.InstructionListener
Modifier and Type | Class and Description |
---|---|
static class |
InstructionViewer.DoorBell |
static class |
InstructionViewer.Form<T extends InstructionViewer.Form.Template> |
class |
InstructionViewer.InstructionView |
static class |
InstructionViewer.Options |
private static class |
InstructionViewer.View |
private static class |
InstructionViewer.XY |
Modifier and Type | Field and Description |
---|---|
static int |
ARROWGAP |
(package private) java.awt.Polygon |
arrowHeadIn |
java.awt.Polygon |
arrowHeadOut |
(package private) ClassModel |
classModel |
InstructionViewer.Options |
config |
private javax.swing.JPanel |
container |
(package private) Instruction |
current |
static int |
CURVEBOW |
private boolean |
dirty |
static InstructionViewer.DoorBell |
doorbell |
private InstructionViewer.XY |
dragStart |
static int |
EDGEGAP |
(package private) Instruction |
first |
static int |
HGAP |
static int |
HGAPROOT |
static int |
HMARGIN |
private java.util.Map<Instruction,InstructionViewer.InstructionView> |
locationToInstructionViewMap |
private java.awt.Graphics2D |
offgraphics |
private java.awt.image.BufferedImage |
offscreen |
private java.awt.Dimension |
offscreensize |
private java.awt.Stroke |
outlineStroke |
private java.awt.Color |
selectedColor |
private java.awt.Stroke |
thickStroke |
private java.awt.Stroke |
thinStroke |
private java.awt.Color |
unselectedColor |
static int |
VGAP |
private InstructionViewer.View |
view |
static int |
VMARGIN |
Constructor and Description |
---|
InstructionViewer() |
InstructionViewer(java.awt.Color _background,
java.lang.String _name) |
Modifier and Type | Method and Description |
---|---|
void |
dirty() |
void |
draw(java.awt.Graphics _g) |
void |
draw(java.awt.Graphics2D _g,
java.awt.Shape _rectangle) |
void |
edge(java.awt.Graphics2D _g,
java.awt.Color _color,
InstructionViewer.InstructionView _branch,
InstructionViewer.InstructionView _target,
java.lang.String _endLabel,
java.lang.String _startLabel) |
void |
fill(java.awt.Graphics2D _g,
java.awt.Color _color,
java.awt.Shape _rect) |
void |
fill(java.awt.Graphics2D _g,
java.awt.Shape _rectangle) |
void |
fillStroke(java.awt.Graphics2D _g,
java.awt.Color _fillColor,
java.awt.Color _strokeColor,
java.awt.Stroke _stroke,
java.awt.Shape _rect) |
(package private) double |
flatPlace(java.awt.Graphics2D _g,
InstructionViewer.InstructionView _instructionView,
double _x,
double _y) |
(package private) void |
flatRender(java.awt.Graphics2D _g,
InstructionViewer.InstructionView _instructionView) |
(package private) double |
foldPlace(java.awt.Graphics2D _g,
InstructionViewer.InstructionView _instructionView,
double _x,
double _y,
boolean _dim) |
(package private) void |
foldRender(java.awt.Graphics2D _g,
InstructionViewer.InstructionView _instructionView) |
java.awt.Component |
getContainer() |
(package private) InstructionViewer.InstructionView |
getInstructionView(Instruction _instruction) |
void |
line(java.awt.Graphics2D _g,
double _x1,
double _y1,
double _x2,
double _y2) |
void |
line(java.awt.Graphics2D _g,
java.awt.Stroke _stroke,
double _x1,
double _y1,
double _x2,
double _y2) |
static void |
main(java.lang.String[] _args) |
void |
render(java.awt.Graphics2D _g) |
boolean |
select(double _x,
double _y) |
void |
showAndTell(java.lang.String message,
Instruction head,
Instruction _instruction) |
void |
stroke(java.awt.Graphics2D _g,
java.awt.Stroke _stroke,
java.awt.Shape _rect) |
void |
text(java.awt.Graphics2D _g,
java.awt.Color _color,
java.lang.String _text,
double _x,
double _y) |
void |
text(java.awt.Graphics2D _g,
java.lang.String _text,
double _x,
double _y) |
public static final int VMARGIN
public static final int HMARGIN
public static final int HGAPROOT
public static final int HGAP
public static final int VGAP
public static final int ARROWGAP
public static final int EDGEGAP
public static final int CURVEBOW
private final javax.swing.JPanel container
private java.awt.image.BufferedImage offscreen
private java.awt.Dimension offscreensize
private java.awt.Graphics2D offgraphics
private boolean dirty
private final InstructionViewer.View view
private InstructionViewer.XY dragStart
public InstructionViewer.Options config
private final java.awt.Color unselectedColor
private final java.awt.Color selectedColor
private final java.awt.Stroke thickStroke
private final java.awt.Stroke thinStroke
private final java.awt.Stroke outlineStroke
public java.awt.Polygon arrowHeadOut
java.awt.Polygon arrowHeadIn
private final java.util.Map<Instruction,InstructionViewer.InstructionView> locationToInstructionViewMap
ClassModel classModel
volatile Instruction first
volatile Instruction current
public static InstructionViewer.DoorBell doorbell
public InstructionViewer(java.awt.Color _background, java.lang.String _name)
public InstructionViewer()
public void dirty()
public void draw(java.awt.Graphics _g)
public java.awt.Component getContainer()
public void text(java.awt.Graphics2D _g, java.lang.String _text, double _x, double _y)
public void text(java.awt.Graphics2D _g, java.awt.Color _color, java.lang.String _text, double _x, double _y)
public void line(java.awt.Graphics2D _g, java.awt.Stroke _stroke, double _x1, double _y1, double _x2, double _y2)
public void stroke(java.awt.Graphics2D _g, java.awt.Stroke _stroke, java.awt.Shape _rect)
public void fill(java.awt.Graphics2D _g, java.awt.Color _color, java.awt.Shape _rect)
public void fillStroke(java.awt.Graphics2D _g, java.awt.Color _fillColor, java.awt.Color _strokeColor, java.awt.Stroke _stroke, java.awt.Shape _rect)
public void line(java.awt.Graphics2D _g, double _x1, double _y1, double _x2, double _y2)
public void draw(java.awt.Graphics2D _g, java.awt.Shape _rectangle)
public void fill(java.awt.Graphics2D _g, java.awt.Shape _rectangle)
InstructionViewer.InstructionView getInstructionView(Instruction _instruction)
double foldPlace(java.awt.Graphics2D _g, InstructionViewer.InstructionView _instructionView, double _x, double _y, boolean _dim)
void foldRender(java.awt.Graphics2D _g, InstructionViewer.InstructionView _instructionView)
double flatPlace(java.awt.Graphics2D _g, InstructionViewer.InstructionView _instructionView, double _x, double _y)
void flatRender(java.awt.Graphics2D _g, InstructionViewer.InstructionView _instructionView)
public boolean select(double _x, double _y)
public void render(java.awt.Graphics2D _g)
public void edge(java.awt.Graphics2D _g, java.awt.Color _color, InstructionViewer.InstructionView _branch, InstructionViewer.InstructionView _target, java.lang.String _endLabel, java.lang.String _startLabel)
public void showAndTell(java.lang.String message, Instruction head, Instruction _instruction)
showAndTell
in interface Config.InstructionListener
public static void main(java.lang.String[] _args) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, javax.swing.UnsupportedLookAndFeelException, AparapiException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
javax.swing.UnsupportedLookAndFeelException
AparapiException