Package jpicedt.graphic.toolkit
Class DrawToolFactory
- java.lang.Object
-
- jpicedt.graphic.toolkit.DrawToolFactory
-
public class DrawToolFactory extends java.lang.ObjectA factory that produces mouse-tools for drawing (ie adding) graphical element's to a canvas.- Since:
- jpicedt 1.3.2
- Version:
- $Id: DrawToolFactory.java,v 1.29.2.1 2007/09/02 11:56:28 reynal Exp $
- Author:
- Sylvain Reynal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classDrawToolFactory.AbstractCurveDrawToola MouseTool suited for drawing any element inheriting from AbstractCurve.protected classDrawToolFactory.GenericDrawToolA MouseTool aimed at drawing new Elements.protected classDrawToolFactory.TextDrawToolA tool used to place PicText's ; it opens a dialog box for editing text content.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringARC_CHORDstatic java.lang.StringARC_CHORD_FROM_3PTSstatic java.lang.StringARC_CHORD_FROM_PARALLELOstatic java.lang.StringARC_OPENstatic java.lang.StringARC_OPEN_FROM_3PTSstatic java.lang.StringARC_OPEN_FROM_PARALLELOstatic java.lang.StringARC_PIEstatic java.lang.StringARC_PIE_FROM_3PTSstatic java.lang.StringARC_PIE_FROM_PARALLELOstatic java.lang.StringCIRCLE_FROM_3PTSstatic java.lang.StringCLOSED_MULTI_CURVEstatic java.lang.StringCLOSED_PS_CURVEstatic java.lang.StringCLOSED_SMOOTH_POLYstatic java.lang.StringELLIPSEstatic java.lang.StringELLIPSE_FROM_PARALLELOstatic java.lang.StringLINEstatic java.lang.StringMULTI_CURVEstatic java.lang.StringPARALLELOGRAMstatic java.lang.StringPS_CURVEstatic java.lang.StringRECTANGLEstatic java.lang.StringSMOOTH_POLYstatic java.lang.StringTEXT
-
Constructor Summary
Constructors Constructor Description DrawToolFactory(EditorKit editorKit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MouseToolcreateDrawTool(java.lang.String type)Returns a MouseTool of the given type.static java.lang.String[][]getAvailableToolNames()Returns an array of arrays of String containing the name of each tool this factory can produce, sorted by groups of tightly related tools.
-
-
-
Field Detail
-
LINE
public static final java.lang.String LINE
- See Also:
- Constant Field Values
-
RECTANGLE
public static final java.lang.String RECTANGLE
- See Also:
- Constant Field Values
-
PARALLELOGRAM
public static final java.lang.String PARALLELOGRAM
- See Also:
- Constant Field Values
-
ELLIPSE_FROM_PARALLELO
public static final java.lang.String ELLIPSE_FROM_PARALLELO
- See Also:
- Constant Field Values
-
ARC_CHORD_FROM_PARALLELO
public static final java.lang.String ARC_CHORD_FROM_PARALLELO
- See Also:
- Constant Field Values
-
ARC_PIE_FROM_PARALLELO
public static final java.lang.String ARC_PIE_FROM_PARALLELO
- See Also:
- Constant Field Values
-
ARC_OPEN_FROM_PARALLELO
public static final java.lang.String ARC_OPEN_FROM_PARALLELO
- See Also:
- Constant Field Values
-
ELLIPSE
public static final java.lang.String ELLIPSE
- See Also:
- Constant Field Values
-
ARC_CHORD
public static final java.lang.String ARC_CHORD
- See Also:
- Constant Field Values
-
ARC_PIE
public static final java.lang.String ARC_PIE
- See Also:
- Constant Field Values
-
ARC_OPEN
public static final java.lang.String ARC_OPEN
- See Also:
- Constant Field Values
-
CIRCLE_FROM_3PTS
public static final java.lang.String CIRCLE_FROM_3PTS
- See Also:
- Constant Field Values
-
ARC_CHORD_FROM_3PTS
public static final java.lang.String ARC_CHORD_FROM_3PTS
- See Also:
- Constant Field Values
-
ARC_PIE_FROM_3PTS
public static final java.lang.String ARC_PIE_FROM_3PTS
- See Also:
- Constant Field Values
-
ARC_OPEN_FROM_3PTS
public static final java.lang.String ARC_OPEN_FROM_3PTS
- See Also:
- Constant Field Values
-
MULTI_CURVE
public static final java.lang.String MULTI_CURVE
- See Also:
- Constant Field Values
-
CLOSED_MULTI_CURVE
public static final java.lang.String CLOSED_MULTI_CURVE
- See Also:
- Constant Field Values
-
SMOOTH_POLY
public static final java.lang.String SMOOTH_POLY
- See Also:
- Constant Field Values
-
CLOSED_SMOOTH_POLY
public static final java.lang.String CLOSED_SMOOTH_POLY
- See Also:
- Constant Field Values
-
PS_CURVE
public static final java.lang.String PS_CURVE
- See Also:
- Constant Field Values
-
CLOSED_PS_CURVE
public static final java.lang.String CLOSED_PS_CURVE
- See Also:
- Constant Field Values
-
TEXT
public static final java.lang.String TEXT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DrawToolFactory
public DrawToolFactory(EditorKit editorKit)
- Parameters:
editorKit- the EditorKit
-
-
Method Detail
-
getAvailableToolNames
public static java.lang.String[][] getAvailableToolNames()
Returns an array of arrays of String containing the name of each tool this factory can produce, sorted by groups of tightly related tools. This may be useful to register tools with the hosting EditorKit, or to automate the building process for related PEAction's
-
createDrawTool
public MouseTool createDrawTool(java.lang.String type)
Returns a MouseTool of the given type.- Parameters:
type- one of LINE, RECTANGLE,... constant fields.set- input attribute set for the element to be drawn.- Since:
- jpicedt 1.3.2
-
-