public class SVGCreateFromFileTool extends CreationTool
Immediately, after the ImageTool has been activated, it opens a JFileChooser, letting the user specify a file. The the user then performs the following mouse gesture:
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JFileChooser |
fileChooser |
protected java.awt.FileDialog |
fileDialog |
protected CompositeFigure |
groupPrototype |
protected ImageHolderFigure |
imagePrototype |
protected boolean |
useFileDialog |
protected java.lang.Thread |
workerThread |
createdFigure, minimalSize, minimalSizeTreshold, presentationName, prototype, prototypeAttributes
anchor, editor, isWorking, listenerList
propertySupport
Constructor and Description |
---|
SVGCreateFromFileTool(ImageHolderFigure imagePrototype,
CompositeFigure groupPrototype)
Creates a new instance.
|
SVGCreateFromFileTool(ImageHolderFigure imagePrototype,
CompositeFigure groupPrototype,
java.util.Map<AttributeKey,java.lang.Object> attributes)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
activate(DrawingEditor editor)
Activates the tool for the given editor.
|
protected Figure |
createFigure() |
boolean |
isUseFileDialog() |
void |
setUseFileDialog(boolean newValue) |
creationFinished, deactivate, getAddedFigure, getCreatedFigure, getPrototype, isToolDoneAfterCreation, mouseDragged, mousePressed, mouseReleased, setToolDoneAfterCreation, updateCursor
addToolListener, addUndoableEditListener, constrainPoint, constrainPoint, createActionMap, createInputMap, draw, editCopy, editCut, editDelete, editDuplicate, editPaste, fireAreaInvalidated, fireAreaInvalidated, fireBoundsInvalidated, fireToolDone, fireToolStarted, getActionMap, getDrawing, getEditor, getInputMap, getToolTipText, getView, isActive, keyPressed, keyReleased, keyTyped, maybeFireBoundsInvalidated, mouseClicked, mouseEntered, mouseExited, mouseMoved, removeToolListener, removeUndoableEditListener, setActionMap, setInputMap, supportsHandleInteraction, viewToDrawing
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
protected java.awt.FileDialog fileDialog
protected javax.swing.JFileChooser fileChooser
protected java.lang.Thread workerThread
protected CompositeFigure groupPrototype
protected ImageHolderFigure imagePrototype
protected boolean useFileDialog
public SVGCreateFromFileTool(ImageHolderFigure imagePrototype, CompositeFigure groupPrototype)
public SVGCreateFromFileTool(ImageHolderFigure imagePrototype, CompositeFigure groupPrototype, java.util.Map<AttributeKey,java.lang.Object> attributes)
public void setUseFileDialog(boolean newValue)
public boolean isUseFileDialog()
public void activate(DrawingEditor editor)
Tool
activate
in interface Tool
activate
in class CreationTool
protected Figure createFigure()
createFigure
in class CreationTool