public class CreationTool extends Tool
Modifier and Type | Class and Description |
---|---|
static interface |
CreationTool.CreationToolAction |
Constructor and Description |
---|
CreationTool(JEditableVirtualBookComponent c,
UndoStack us,
ISnappingEnvironment se)
default creation tool
|
CreationTool(JEditableVirtualBookComponent c,
UndoStack us,
ISnappingEnvironment se,
CreationTool.CreationToolAction customCreationToolAction)
create a tool with custom creation action, this permit to do several things
with the created or modified hole
|
Modifier and Type | Method and Description |
---|---|
void |
activated()
Signal the tool is activated, if we have something to do before
|
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e)
mouse dragged event
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Mouse moved event
|
void |
mousePressed(java.awt.event.MouseEvent e)
Mouse pressed event
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Mouse Released event
|
void |
paintElements(java.awt.Graphics g)
Paint a feed back from tool
|
void |
unactivated()
signal the tool is beeing unactivated
|
keyTyped, mouseClicked, mouseEnter, mouseExited, mouseWheel
public CreationTool(JEditableVirtualBookComponent c, UndoStack us, ISnappingEnvironment se) throws java.lang.Exception
c
- us
- se
- java.lang.Exception
public CreationTool(JEditableVirtualBookComponent c, UndoStack us, ISnappingEnvironment se, CreationTool.CreationToolAction customCreationToolAction) throws java.lang.Exception
c
- us
- se
- customCreationToolAction
- java.lang.Exception
public void activated()
Tool
public void unactivated()
Tool
unactivated
in class Tool
public void mousePressed(java.awt.event.MouseEvent e)
Tool
mousePressed
in class Tool
public void mouseMoved(java.awt.event.MouseEvent e)
Tool
mouseMoved
in class Tool
public void mouseDragged(java.awt.event.MouseEvent e)
Tool
mouseDragged
in class Tool
public void mouseReleased(java.awt.event.MouseEvent e)
Tool
mouseReleased
in class Tool
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
keyPressed
in class Tool
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
keyReleased
in class Tool
public void paintElements(java.awt.Graphics g)
Tool
paintElements
in class Tool
g
- the graphic context