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, prototypeAttributesanchor, editor, isWorking, listenerListpropertySupport| 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, updateCursoraddToolListener, 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, viewToDrawingaddPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerprotected 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)
Toolactivate in interface Toolactivate in class CreationToolprotected Figure createFigure()
createFigure in class CreationTool