|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjpicedt.graphic.toolkit.AbstractMouseTransformFactory
jpicedt.graphic.toolkit.EditPointMouseTransformFactory
public class EditPointMouseTransformFactory
A factory that produces MouseTransform's that may be plugged into the SelectionTool mouse-tool.
MouseTransform's created by this factory are dedicated to editing points of Elements
which either support a variable number of points (e.g. AbstractCurve and subclasses),
and/or whose point possess specific geometric feature (e.g. smoothness/symmetry for PicMultiCurve,
smoothness coefficient for PicSmoothPolygon,...).
So far, only AbstractCurve's are supported by the current implementation.
| Nested Class Summary | |
|---|---|
protected class |
EditPointMouseTransformFactory.EditSmoothCoeffTransform
a mouse-transform that edit smooth-coefficients for a PicSmoothPolygon (edit ALL selected points at once) |
protected class |
EditPointMouseTransformFactory.RemovePointTransform
a mouse-transform that removes selected points to/from extensible curves or parallelogram/ellipses after conversion to a multicurve. |
protected class |
EditPointMouseTransformFactory.SelectedPointsHandler
Helper class for SelectPointsInAreaTransform. |
protected class |
EditPointMouseTransformFactory.SelectElementTransform
|
protected class |
EditPointMouseTransformFactory.SelectPointsInAreaTransform
a mouse-transform that selects all elements inside a rectangle dragged by the user |
protected class |
EditPointMouseTransformFactory.SplitSegmentTransform
a mouse-transform that add points to extensible curves |
protected class |
EditPointMouseTransformFactory.UnSelectPointTransform
a mouse-transform that unselects points |
| Nested classes/interfaces inherited from class jpicedt.graphic.toolkit.AbstractMouseTransformFactory |
|---|
AbstractMouseTransformFactory.HelpMessageMouseTransform, AbstractMouseTransformFactory.InvalidMouseTransform, AbstractMouseTransformFactory.SelectAreaTransform |
| Field Summary |
|---|
| Fields inherited from class jpicedt.graphic.toolkit.AbstractMouseTransformFactory |
|---|
ucc |
| Constructor Summary | |
|---|---|
EditPointMouseTransformFactory(EditorKit kit)
|
|
| Method Summary | |
|---|---|
MouseTransform |
createMouseTransform(PEMouseEvent e)
Return a MouseTransform whose type is adequate with the given mouse-event. |
void |
flush()
Called when the associated SelectionTool is being deactivated in the hosting
EditorKit. |
EditPointMouseTransformFactory.SelectedPointsHandler |
getSelectedPointsHandler()
Returns a reference to the current SelectedPointsHandler. |
void |
init(UserConfirmationCache ucc)
called when the associated SelectionTool is being activated in the hosting
EditorKit. |
protected boolean |
isValidTarget(Element e)
Return true is the given element is a valid target for this factory. |
void |
paint(Graphics2D g,
Rectangle2D allocation,
double scale)
Allows this EditPointMouseTransformFactory to do specific graphic rendering when it's
installed in a hosting SelectionTool. |
| Methods inherited from class jpicedt.graphic.toolkit.AbstractMouseTransformFactory |
|---|
getEditorKit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EditPointMouseTransformFactory(EditorKit kit)
kit - the hosting editor-kit| Method Detail |
|---|
public EditPointMouseTransformFactory.SelectedPointsHandler getSelectedPointsHandler()
SelectedPointsHandler.
protected boolean isValidTarget(Element e)
public void paint(Graphics2D g,
Rectangle2D allocation,
double scale)
EditPointMouseTransformFactory to do specific graphic rendering when it's
installed in a hosting SelectionTool. This implementation renders selected points using a
specific highlighter (which superimposes to the standard highlighter).
paint in interface MouseTransformFactorypaint in class AbstractMouseTransformFactorypublic void init(UserConfirmationCache ucc)
SelectionTool is being activated in the hosting
EditorKit. This cleans up the state of the underlying SelectionHandler, and
checks for the state of the current selection (ie EditorKit's selection handler) to be
adequate with the mouse-transform's created by this factory. This means in particular that no
Element must be selected. Besides, highlightingMode is forced to
LOCAL_MODE, so that curve's control-points are visible ("green squares").
init in interface MouseTransformFactoryinit in class AbstractMouseTransformFactorypublic void flush()
SelectionTool is being deactivated in the hosting
EditorKit. This simply cleans up the state of the underlying
SelectionHandler.
flush in interface MouseTransformFactoryflush in class AbstractMouseTransformFactorypublic MouseTransform createMouseTransform(PEMouseEvent e)
Basically, we work with the following modifiers : Shift, Control, Alt. Other modifiers must be excluded, given their poor support on MacOS platforms, and their odd behaviours on some Unices. Similarly, double-click events should be avoided since these are rather hard to deal with seeing that a single-click event is ALWAYS posted beforehands.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||