|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpicedt.graphic.toolkit.EditElementMouseTransformFactory.MoveControlPointTransform
protected class EditElementMouseTransformFactory.MoveControlPointTransform
a mouse-transform that moves element's end-points, ie aka scales elements. Code is heavily dependent on the run-time class of the target element. [pending] one shortcoming of the present approach is that EditPointConstraint's are set at init time (i.e. in the constructor), which forbids any further modification (e.g. if the user press the control key AFTER starting to drag a point).
Constructor Summary | |
---|---|
EditElementMouseTransformFactory.MoveControlPointTransform(Element target,
int pointIndex,
EditPointConstraint constraint,
java.lang.String helpMessage,
Grid grid)
|
Method Summary | |
---|---|
java.awt.Cursor |
getCursor()
Return the cursor for this MouseTransform |
java.lang.String |
getHelpMessage()
Return a help-message for the UI, that makes sense with this transform. |
boolean |
next(PEMouseEvent e)
Called when the mouse is released. |
void |
paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D allocation,
double scale)
Does nothing. |
void |
process(PEMouseEvent e)
Called when the mouse is dragged. |
void |
start(PEMouseEvent e)
Called when the mouse is pressed. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EditElementMouseTransformFactory.MoveControlPointTransform(Element target, int pointIndex, EditPointConstraint constraint, java.lang.String helpMessage, Grid grid)
target
- the element upon which this transform will actpointIndex
- index of the Element's point that will be movedgrid
- the Grid instance used for alignment (if it's snap-on)constraint
- the geometrical constraint to be used when moving control-points ; may be nullhelpMessage
- if non-null, this will be displayed on mouse-move events instead of the default help-message
for this mouse-transform.jpicedt.graphic.model.Element.setPoint
Method Detail |
---|
public void start(PEMouseEvent e)
start
in interface MouseTransform
public void process(PEMouseEvent e)
process
in interface MouseTransform
public boolean next(PEMouseEvent e)
next
in interface MouseTransform
public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)
paint
in interface MouseTransform
public java.lang.String getHelpMessage()
MouseTransform
getHelpMessage
in interface MouseTransform
public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.Cursor getCursor()
MouseTransform
getCursor
in interface MouseTransform
PicGroup
, returns a cursor according to
pointIndex
.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |