public class ImportSVGTool extends Tool implements FileDialogDelegate
Modifier and Type | Field and Description |
---|---|
private Vector2D |
originalMousePosition |
private java.util.ArrayList<Shape> |
shapes |
application, objectContainer, view
Constructor and Description |
---|
ImportSVGTool(CutCADApplet application,
ObjectContainer container) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStaySelected()
Return whether this tool can be selected for a longer time (such as the drawing tools or select tool)
or whether it is a click-and-forget-tool (such as the save, load or new tool).
|
void |
draw2D(processing.core.PGraphics p,
Transformation t)
Will be called by the drawing runloop of the application whenever the screen is redrawn.
|
void |
fileWasSelected(java.io.File theFile) |
java.lang.String |
getIconName()
Return the name of the SVG for the icon for the tool.
|
void |
mouseButtonPressed(Vector2D position,
int button)
Will be called by the application when a mouse button was pressed.
|
void |
mouseMoved(Vector2D position)
Will be called by the application when the mouse was moved.
|
void |
toolWasSelected()
Will be called by the application when this tool was selected.
|
void |
toolWasUnselected()
Will be called by the application when another tool was selected.
|
getButton, mouseButtonReleased
private java.util.ArrayList<Shape> shapes
private Vector2D originalMousePosition
public ImportSVGTool(CutCADApplet application, ObjectContainer container)
application
- the main class of the projectcontainer
- the currently loaded ObjectContainerpublic java.lang.String getIconName()
Tool
getIconName
in class Tool
public void mouseButtonPressed(Vector2D position, int button)
Tool
mouseButtonPressed
in class Tool
position
- The absolute position of the mouse cursor.button
- The button that was pressed.public void mouseMoved(Vector2D position)
Tool
mouseMoved
in class Tool
position
- The absolute position of the mouse cursor.public void draw2D(processing.core.PGraphics p, Transformation t)
Tool
draw2D
in interface Drawable2D
draw2D
in class Tool
p
- The graphics context to draw into.t
- The transformation currently applied to the context.public void toolWasSelected()
Tool
toolWasSelected
in class Tool
public void toolWasUnselected()
Tool
toolWasUnselected
in class Tool
public boolean canStaySelected()
Tool
canStaySelected
in class Tool
public void fileWasSelected(java.io.File theFile)
fileWasSelected
in interface FileDialogDelegate