public class SketchController extends Object
BasicInterpreter
Modifier and Type | Field and Description |
---|---|
static Color |
DEFAULT_FILL_COLOR
The default fill color used for sketching.
|
static float |
DEFAULT_LINE_WIDTH
The default pen line width used for sketching.
|
static Color |
DEFAULT_PEN_COLOR
The default pen color used for sketching.
|
Constructor and Description |
---|
SketchController()
Create a SketchController and initialize its foreground
interpreter to a BasicInterpreter.
|
Modifier and Type | Method and Description |
---|---|
Iterator |
containedSketchFigures(Polygon2D region)
Return an iterator over the figures that are completely contained
by the given polygonal region.
|
Figure |
figureForSymbol(Symbol symbol)
Return a figure for the given symbol, or null if
the symbol does not have a figure representation.
|
Interactor |
getBackgroundInterpreter()
Return the interpreter that processes strokes on the
backgound event layer.
|
MouseFilter |
getDragFilter()
Return the mouse filter used for dragging.
|
Color |
getFillColor()
Return the color used to fill symbols.
|
Interactor |
getForegroundInterpreter()
Return the interpreter that processes strokes on the
foreground event layer.
|
float |
getLineWidth()
Return the line width used to draw symbols.
|
Color |
getPenColor()
Return the color used to draw symbols.
|
MouseFilter |
getSelectionFilter()
Return the mouse filter used for the selection interactor.
|
SelectionInteractor |
getSelectionInteractor()
Return the selection interactor on all symbols.
|
SelectionModel |
getSelectionModel()
Get the default selection model.
|
SketchModel |
getSketchModel()
Return the sketch model this pane views.
|
GraphicsPane |
getSketchPane()
Return the parent pane of this controller.
|
Iterator |
hitSketchFigures(Rectangle2D region)
Return an iterator over the figures that intersect the given
rectangular region.
|
protected void |
initializeInteraction()
Initialize all interaction on the sketch pane.
|
void |
setBackgroundInterpreter(Interactor interactor)
Set the interpreter that processes strokes in the background
event layer.
|
void |
setFillColor(Color c)
Set the color used to fill symbols.
|
void |
setForegroundInterpreter(Interactor interactor)
Set the interpreter that processes strokes in the foreground
event layer.
|
void |
setLineWidth(float w)
Set the line width used to draw symbols.
|
void |
setPenColor(Color c)
Set the color used to draw symbols.
|
void |
setSelectionModel(SelectionModel m)
Set the default selection model.
|
void |
setSketchModel(SketchModel m)
Set the sketch model in this controller.
|
void |
setSketchPane(GraphicsPane p)
Set the graphics pane.
|
public static Color DEFAULT_PEN_COLOR
public static Color DEFAULT_FILL_COLOR
public static float DEFAULT_LINE_WIDTH
public SketchController()
public Iterator containedSketchFigures(Polygon2D region)
public Figure figureForSymbol(Symbol symbol)
public Interactor getBackgroundInterpreter()
public MouseFilter getDragFilter()
public Color getFillColor()
public Interactor getForegroundInterpreter()
public float getLineWidth()
public Color getPenColor()
public MouseFilter getSelectionFilter()
public SelectionInteractor getSelectionInteractor()
public SelectionModel getSelectionModel()
public SketchModel getSketchModel()
public GraphicsPane getSketchPane()
public Iterator hitSketchFigures(Rectangle2D region)
protected void initializeInteraction()
public void setBackgroundInterpreter(Interactor interactor)
public void setFillColor(Color c)
public void setForegroundInterpreter(Interactor interactor)
public void setLineWidth(float w)
public void setPenColor(Color c)
public void setSelectionModel(SelectionModel m)
public void setSketchModel(SketchModel m)
public void setSketchPane(GraphicsPane p)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.