public class ConnectTool extends Tool
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
lastMessage |
(package private) Vector2D |
lastMousePosition |
(package private) Connection |
previewConnection |
private float |
scalingFactor |
(package private) boolean |
selectedFirst |
application, objectContainer, view| Constructor and Description |
|---|
ConnectTool(CutCADApplet application,
ObjectContainer container) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw2D(processing.core.PGraphics p,
Transformation t)
Will be called by the drawing runloop of the application whenever the screen is redrawn.
|
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.
|
canStaySelected, getButton, mouseButtonReleasedboolean selectedFirst
Vector2D lastMousePosition
Connection previewConnection
private float scalingFactor
private java.lang.String lastMessage
public ConnectTool(CutCADApplet application, ObjectContainer container)
application - the main class of the projectcontainer - the currently loaded ObjectContainerpublic java.lang.String getIconName()
ToolgetIconName in class Toolpublic void mouseButtonPressed(Vector2D position, int button)
ToolmouseButtonPressed in class Toolposition - The absolute position of the mouse cursor.button - The button that was pressed.public void mouseMoved(Vector2D position)
ToolmouseMoved in class Toolposition - The absolute position of the mouse cursor.public void draw2D(processing.core.PGraphics p,
Transformation t)
Tooldraw2D in interface Drawable2Ddraw2D in class Toolp - The graphics context to draw into.t - The transformation currently applied to the context.public void toolWasSelected()
TooltoolWasSelected in class Toolpublic void toolWasUnselected()
TooltoolWasUnselected in class Tool