|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpicedt.graphic.toolkit.AbstractMouseTransform
public abstract class AbstractMouseTransform
This implementation allows subclassers to modify a clone of the target Element, then to update the original Element when the operation is completed. The aim is to reduce the burden of repainting a (possibly) complex Element while transforming it, by painting the Element using very lightweight View. This is done as follow :
Constructor Summary | |
---|---|
protected |
AbstractMouseTransform(Element target)
|
Method Summary | |
---|---|
protected Element |
getClone()
Return the clone of the target element, which was init'd by startTransform |
protected Element |
getTarget()
Return the element this transform acts upon |
boolean |
next(PEMouseEvent e)
Called by mouseReleased. This implementation set the clone's parent and view to null so as to make it elligible for gc. |
void |
paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D allocation,
double scale)
Paints the clone. |
void |
start(PEMouseEvent e)
Called by mousePressed. Creates a clone of the target (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jpicedt.graphic.toolkit.MouseTransform |
---|
getCursor, getHelpMessage, process |
Constructor Detail |
---|
protected AbstractMouseTransform(Element target)
target
- The target-element upon which this transform will act.Method Detail |
---|
public void start(PEMouseEvent e)
start
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
protected Element getTarget()
protected Element getClone()
startTransform
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |