http://www.jpicedt.org

jpicedt.graphic.toolkit
Interface MouseTransformFactory

All Known Implementing Classes:
AbstractMouseTransformFactory, EditConvexZoneMouseTransformFactory, EditElementMouseTransformFactory, EditPointMouseTransformFactory

public interface MouseTransformFactory

A factory that produces MouseTransform's to be used by the SelectionTool mouse-tool.

Since:
jPicEdt 1.4
Version:
$Id: MouseTransformFactory.java,v 1.10 2013/03/27 06:57:16 vincentb1 Exp $
Author:
Sylvain Reynal

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.
 void init(UserConfirmationCache ucc)
          called when the associated SelectionTool is being activated in the hosting EditorKit.
 void paint(Graphics2D g, Rectangle2D allocation, double scale)
          Allows the MouseTransformFactory to do specific graphic rendering when it's installed in a hosting SelectionTool.
 

Method Detail

createMouseTransform

MouseTransform createMouseTransform(PEMouseEvent e)
Return a MouseTransform whose type is adequate with the given mouse-event. This can be null if no MouseTransform matches the given event.


paint

void paint(Graphics2D g,
           Rectangle2D allocation,
           double scale)
Allows the MouseTransformFactory to do specific graphic rendering when it's installed in a hosting SelectionTool.

Since:
jpicedt 1.4

init

void init(UserConfirmationCache ucc)
called when the associated SelectionTool is being activated in the hosting EditorKit. Initialization work required before any mouse-event occurs should be done here. Other initialization work may be carried out in the MouseTransform's themselves.


flush

void flush()
called when the associated SelectionTool is being deactivated in the hosting EditorKit. This provides a way for the factory to do some final clean-up, e.g. local buffers, graphic context,...


http://www.jpicedt.org

Submit a bug : syd@jpicedt.org