|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jpicedt.graphic.view.DefaultViewFactory jpicedt.format.output.eepic.EepicViewFactory
public class EepicViewFactory
A factory to create a View for a given Element when the content type for the model is Eepic.
Field Summary | |
---|---|
protected static Color |
EEPIC_BLACKEN
|
protected static Color |
EEPIC_COLOR
|
protected static Color |
EEPIC_SHADE
|
protected static Color |
EEPIC_STROKE
|
protected static Color |
EEPIC_WHITEN
|
Fields inherited from class jpicedt.graphic.view.DefaultViewFactory |
---|
factoryMap, KEY_TEXT_FONT, TEXT_FONT_DEFAULT, TEXT_FONT_SCALE, textFont |
Constructor Summary | |
---|---|
EepicViewFactory()
|
Method Summary | |
---|---|
ArrowView |
createArrow(PicAttributeSet set,
PicAttributeName<StyleConstants.ArrowStyle> direction)
Returns an ArrowView for rendering arrow-related attributes using the given attribute set. |
Paint |
createPaintForInterior(PicAttributeSet set)
Returns a Paint object from the given attributes, that is suited for painting the interior
of a shape. |
Paint |
createPaintForOutline(PicAttributeSet set)
Returns a Paint object from the given attributes, that is suited for painting an outline, or null if LINE_STYLE is NONE . |
Shape |
createShadow(PicAttributeSet set,
Shape shape)
paint shadow ; overriden to return null, since eepic and LaTeX don't support shadowing |
BasicStroke |
createStroke(PicAttributeSet set)
Returns a Stroke built from the given attributes ; null if
LINE_STYLE =NONE . |
BasicStroke |
createStrokeForOverstrike(PicAttributeSet set)
paint overstrike ; overriden to return null. |
View |
createView(Element element)
Create a View for the given Element by looking up the hashmap responsible for creating
View 's for Element 's. |
void |
paintHatches(Graphics2D g,
PicAttributeSet set,
Shape shape)
paint hatches (vlines,...) depending on the FILL_STYLE attributes of the given set. |
Methods inherited from class jpicedt.graphic.view.DefaultViewFactory |
---|
configure, createPaintForShadow, getMappedClass, main, map, toString, unmap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final Color EEPIC_STROKE
protected static final Color EEPIC_WHITEN
protected static final Color EEPIC_SHADE
protected static final Color EEPIC_BLACKEN
protected static final Color EEPIC_COLOR
Constructor Detail |
---|
public EepicViewFactory()
Method Detail |
---|
public View createView(Element element)
DefaultViewFactory
Element
by looking up the hashmap responsible for creating
View
's for Element
's.
createView
in interface ViewFactory
createView
in class DefaultViewFactory
public BasicStroke createStroke(PicAttributeSet set)
DefaultViewFactory
null
if
LINE_STYLE
=NONE
. All currently supported attributes for stroke are rendered.
createStroke
in interface AttributesViewFactory
createStroke
in class DefaultViewFactory
set
- used to fetch the LINE_STYLE attributes
public Paint createPaintForOutline(PicAttributeSet set)
DefaultViewFactory
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).
createPaintForOutline
in interface AttributesViewFactory
createPaintForOutline
in class DefaultViewFactory
set
- used to fetch the LINE_COLOR attributes
public Paint createPaintForInterior(PicAttributeSet set)
DefaultViewFactory
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).
createPaintForInterior
in interface AttributesViewFactory
createPaintForInterior
in class DefaultViewFactory
set
- used to fetch the SHADOW and related attributes
public void paintHatches(Graphics2D g, PicAttributeSet set, Shape shape)
paintHatches
in interface AttributesViewFactory
paintHatches
in class DefaultViewFactory
shape
- used to clip the hatch (i.e. the shape the calling view must render)public Shape createShadow(PicAttributeSet set, Shape shape)
createShadow
in interface AttributesViewFactory
createShadow
in class DefaultViewFactory
set
- used to fetch the shadow attributesshape
- the Shape under which to drop a shadow
public BasicStroke createStrokeForOverstrike(PicAttributeSet set)
createStrokeForOverstrike
in interface AttributesViewFactory
createStrokeForOverstrike
in class DefaultViewFactory
set
- used to fetch the overstrike attributespublic ArrowView createArrow(PicAttributeSet set, PicAttributeName<StyleConstants.ArrowStyle> direction)
AttributesViewFactory
createArrow
in interface AttributesViewFactory
createArrow
in class DefaultViewFactory
direction
- LEFT_ARROW
or RIGHT_ARROW
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |