Package jpicedt.graphic.toolkit
Class AbstractMouseTransformFactory
- java.lang.Object
-
- jpicedt.graphic.toolkit.AbstractMouseTransformFactory
-
- All Implemented Interfaces:
MouseTransformFactory
- Direct Known Subclasses:
EditElementMouseTransformFactory,EditPointMouseTransformFactory
public abstract class AbstractMouseTransformFactory extends java.lang.Object implements MouseTransformFactory
Provide a skeletal implementation of the MouseTransformFactory interface. This include some generic MouseTransform's which may be easily extended by concrete subclassers, like SelectAreaMouseTransform.- Since:
- jPicEdt 1.4
- Version:
- $Id: AbstractMouseTransformFactory.java,v 1.4.2.1 2007/09/02 11:56:27 reynal Exp $
- Author:
- Sylvain Reynal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractMouseTransformFactory.HelpMessageMouseTransformThis mouse transform does nothing, it is just a convenience to post a HelpMessage (regarding what the user COULD do) when no other mouse-transform makes sense with the current mouse-event.protected classAbstractMouseTransformFactory.InvalidMouseTransformThis mouse transform does nothing, it simply returns an invalid cursor, and can be used by MouseTransform factories to notify the user of an invalid UI action.protected classAbstractMouseTransformFactory.SelectAreaTransforma mouse-transform dedicated to select objects (Element's, control-point's,...) inside a rectangle dragged by the user.
-
Constructor Summary
Constructors Constructor Description AbstractMouseTransformFactory(EditorKit kit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()called when the associated SelectionTool is being deactivated in the hosting EditorKit.EditorKitgetEditorKit()Return the hosting EditorKit for mouse-tools which work with this factory.voidinit()called when the associated SelectionTool is being activated in the hosting EditorKit.voidpaint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)Allows the MouseTransformFactory to do specific graphic rendering when it's installed in a hosting SelectionTool.-
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.MouseTransformFactory
createMouseTransform
-
-
-
-
Constructor Detail
-
AbstractMouseTransformFactory
public AbstractMouseTransformFactory(EditorKit kit)
- Parameters:
kit- the hosting editor-kit
-
-
Method Detail
-
getEditorKit
public final EditorKit getEditorKit()
Return the hosting EditorKit for mouse-tools which work with this factory. This may be used to work with the selection-handler and use hitTest() methods.
-
paint
public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)Allows the MouseTransformFactory to do specific graphic rendering when it's installed in a hosting SelectionTool. This default implementation does nothing.- Specified by:
paintin interfaceMouseTransformFactory- Since:
- jpicedt 1.4
-
init
public void init()
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.This implementation does nothing.
- Specified by:
initin interfaceMouseTransformFactory
-
flush
public 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,...This implementation does nothing.
- Specified by:
flushin interfaceMouseTransformFactory
-
-