Package jpicedt.format.output.eepic
Class EepicViewFactory
- java.lang.Object
-
- jpicedt.graphic.view.DefaultViewFactory
-
- jpicedt.format.output.eepic.EepicViewFactory
-
- All Implemented Interfaces:
PicObjectConstants,ViewFactory
- Direct Known Subclasses:
LatexViewFactory
public class EepicViewFactory extends DefaultViewFactory
A factory to create a View for a given Element when the content type for the model is Eepic.- Since:
- jPicEdt 1.3.2
- Version:
- $Id: EepicViewFactory.java,v 1.12.2.1 2007/09/02 11:55:13 reynal Exp $
- Author:
- Sylvain Reynal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classEepicViewFactory.AbstractCurveViewa View for rendering any concrete implementation of jpicedt.graphic.model.AbstractCurve eepic allows filling polygon only (using \\path macro).classEepicViewFactory.EllipseViewview for ellipses specific to the Epic/Eepic content type.classEepicViewFactory.TextViewa View for rendering Text's : only rectangular frame boxes (through \\makebox and rel.) are supported, + no filling + only black stroke.-
Nested classes/interfaces inherited from class jpicedt.graphic.view.DefaultViewFactory
DefaultViewFactory.LeafElementView, DefaultViewFactory.ParallelogramView, DefaultViewFactory.PicNodeConnectionView, DefaultViewFactory.TextViewHybrid
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.awt.ColorEEPIC_BLACKENprotected static java.awt.ColorEEPIC_COLORprotected static java.awt.ColorEEPIC_SHADEprotected static java.awt.ColorEEPIC_STROKEprotected static java.awt.ColorEEPIC_WHITEN-
Fields inherited from class jpicedt.graphic.view.DefaultViewFactory
KEY_TEXT_FONT, TEXT_FONT_DEFAULT, TEXT_FONT_SCALE, textFont
-
Fields inherited from interface jpicedt.graphic.model.PicObjectConstants
ARROW_GLOBAL_SCALE_LENGTH, ARROW_GLOBAL_SCALE_WIDTH, ARROW_INSET_SCALE, ARROW_LENGTH_SCALE, ARROW_WIDTH_LINEWIDTH_SCALE, ARROW_WIDTH_MINIMUM_MM, BRACKET_LENGTH_SCALE, CROSSHATCH, CROSSHATCH_FILLED, DASH_OPAQUE, DASH_TRANSPARENT, DASH1, DASH2, DASH3, DASHED, DIMEN, DOT_SEP, DOT_SEP1, DOT_SEP2, DOT_SEP3, DOTTED, DOUBLE_COLOR, DOUBLE_LINE, DOUBLE_SEP, FILL_COLOR, FILL_STYLE, HATCH_ANGLE, HATCH_COLOR, HATCH_SEP, HATCH_WIDTH, HLINES, HLINES_FILLED, INNER, LEFT_ARROW, LINE_COLOR, LINE_STYLE, LINE_WIDTH, MIDDLE, NONE, OUTER, OVER_STRIKE, OVER_STRIKE_COLOR, OVER_STRIKE_WIDTH, POLYDOTS_ANGLE, POLYDOTS_CIRCLE, POLYDOTS_DISK, POLYDOTS_PENTAGON, POLYDOTS_PENTAGON_FILLED, POLYDOTS_PLUS, POLYDOTS_SCALE_H, POLYDOTS_SCALE_V, POLYDOTS_SIZE_LINEWIDTH_SCALE, POLYDOTS_SIZE_MINIMUM_MM, POLYDOTS_SQUARE, POLYDOTS_SQUARE_FILLED, POLYDOTS_STYLE, POLYDOTS_SUPERIMPOSE, POLYDOTS_TRIANGLE, POLYDOTS_TRIANGLE_FILLED, PS_POINT, PST_CUSTOM, RBRACKET_LENGTH_SCALE, RIGHT_ARROW, SHADOW, SHADOW_ANGLE, SHADOW_COLOR, SHADOW_SIZE, SOLID, TBAR_WIDTH_LINEWIDTH_SCALE, TBAR_WIDTH_MINIMUM_MM, TEXT_BOX_CIRCLE, TEXT_BOX_NO_FRAME, TEXT_BOX_OVAL, TEXT_BOX_RECTANGLE, TEXT_FRAME, TEXT_HALIGN_CENTER, TEXT_HALIGN_LEFT, TEXT_HALIGN_RIGHT, TEXT_HOR_ALIGN, TEXT_ROTATION, TEXT_VALIGN_BASELINE, TEXT_VALIGN_BOTTOM, TEXT_VALIGN_CENTER, TEXT_VALIGN_TOP, TEXT_VERT_ALIGN, VLINES, VLINES_FILLED
-
-
Constructor Summary
Constructors Constructor Description EepicViewFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ArrowcreateArrow(PicAttributeSet set, PicAttributeName direction)protected java.awt.PaintcreatePaintForInterior(PicAttributeSet set)Returns a Paint object from the given attributes, that is suited for painting the interior of a shape.protected java.awt.PaintcreatePaintForOutline(PicAttributeSet set)Returns a Paint object from the given attributes, that is suited for painting an outline, or null if LINE_STYLE is NONE.protected java.awt.StrokecreateStroke(PicAttributeSet set)ViewcreateView(Element element)protected voidpaintHatches(java.awt.Graphics2D g, PicAttributeSet set, java.awt.Shape shape)paint hatches (vlines,...) depending on the FILL_STYLE attributes of the given set.protected voidpaintOverStrike(java.awt.Graphics2D g, PicAttributeSet set, java.awt.Shape shape)paint overstrike ; overriden to do nothingprotected voidpaintShadow(java.awt.Graphics2D g, PicAttributeSet set, java.awt.Shape shape)paint shadow ; overriden to do nothing, since eepic and LaTeX don't support shadowing-
Methods inherited from class jpicedt.graphic.view.DefaultViewFactory
configure, main
-
-
-
-
Field Detail
-
EEPIC_STROKE
protected static final java.awt.Color EEPIC_STROKE
-
EEPIC_WHITEN
protected static final java.awt.Color EEPIC_WHITEN
-
EEPIC_SHADE
protected static final java.awt.Color EEPIC_SHADE
-
EEPIC_BLACKEN
protected static final java.awt.Color EEPIC_BLACKEN
-
EEPIC_COLOR
protected static final java.awt.Color EEPIC_COLOR
-
-
Method Detail
-
createView
public View createView(Element element)
- Specified by:
createViewin interfaceViewFactory- Overrides:
createViewin classDefaultViewFactory- Returns:
- a View for the given Element This returns a specific Epic/Eepic view for PicEllipse, AbstractCurve and PicText. Calls superclass otherwise.
-
createStroke
protected java.awt.Stroke createStroke(PicAttributeSet set)
- Overrides:
createStrokein classDefaultViewFactory- Returns:
- a Stroke built from the given attributes ; null if LINE_STYLE=NONE. Only SOLID and DASHED (with DASH_OPAQUE only) are supported by LaTeX/Eepic
-
createPaintForOutline
protected java.awt.Paint createPaintForOutline(PicAttributeSet set)
Description copied from class:DefaultViewFactoryReturns a Paint object from the given attributes, that is suited for painting an outline, or null if LINE_STYLE is NONE.All currently supported attributes for painting an outline are rendered. It's up to subclassers to adapt this behavior to their need (probably by restricting it).
- Overrides:
createPaintForOutlinein classDefaultViewFactory- Returns:
- a Paint from the given attributes, suited for painting outlines. Eepic only support painting in black.
-
createPaintForInterior
protected java.awt.Paint createPaintForInterior(PicAttributeSet set)
Description copied from class:DefaultViewFactoryReturns a Paint object from the given attributes, that is suited for painting the interior of a shape.The returned object depends on the FILL_STYLE and FILL_COLOR attributes of the given set:
- FILL_STYLE = NONE: returns null
- FILL_STYLE = SOLID, VLINES, VLINES_FILLED, HLINES, HLINES_FILLED, CROSSHATCH and CROSSHATCH_FILLED: returns a Color object created from FILL_COLOR.
jpicedt.graphic.model.PicObjectConstants) for painting the interior of shapes are rendered. [pending] gradient (need to add some attributes).- Overrides:
createPaintForInteriorin classDefaultViewFactory- Returns:
- a Paint from the given attributes, suited for painting interior. Eepic support filling with black, shade (i.e. gray) and white ; return null if FILL_STYLE is NONE.
-
paintHatches
protected void paintHatches(java.awt.Graphics2D g, PicAttributeSet set, java.awt.Shape shape)paint hatches (vlines,...) depending on the FILL_STYLE attributes of the given set. Overriden to do nothing, since (so far) hatches aren't supported by eepic or LaTeX.- Overrides:
paintHatchesin classDefaultViewFactoryshape- used to clip the hatch (ie the shape the calling view must render)
-
paintShadow
protected void paintShadow(java.awt.Graphics2D g, PicAttributeSet set, java.awt.Shape shape)paint shadow ; overriden to do nothing, since eepic and LaTeX don't support shadowing- Overrides:
paintShadowin classDefaultViewFactoryset- used to fetch the shadow attributesshape- the Shape under which to drop a shadow
-
paintOverStrike
protected void paintOverStrike(java.awt.Graphics2D g, PicAttributeSet set, java.awt.Shape shape)paint overstrike ; overriden to do nothing- Overrides:
paintOverStrikein classDefaultViewFactoryset- used to fetch the overstrike attributesshape- the Shape to overstrike
-
createArrow
protected Arrow createArrow(PicAttributeSet set, PicAttributeName direction)
- Overrides:
createArrowin classDefaultViewFactorydirection- LEFT_ARROW or RIGHT_ARROW- Returns:
- an Arrow from the given attribute set ; Eepic supports only Arrow.ARROW_HEAD null if Arrow.NONE
-
-