Class AbstractDrawable
java.lang.Object
se.conciliate.extensions.drawable.AbstractDrawable
- All Implemented Interfaces:
Drawable
-
Nested Class Summary
Nested classes/interfaces inherited from interface se.conciliate.extensions.drawable.Drawable
Drawable.PaintMode, Drawable.TextDirection, Drawable.TextHorizontalAlign, Drawable.TextVerticalAlign -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFillImage(int index, MTLanguage lang) Returns the image that fills the shape.getOutline(Rectangle bounds) Returns the outline of the drawable.getPaint(Drawable.PaintMode paintMode, int index, Rectangle bounds) Returns a paint for a given shape and paint mode.getStroke(int index) Returns the stroke of the edge around the shape.getText(int index, MTLanguage lang) Returns the text that lies in the shape.getTextDirection(int index) getTextFont(int index) Returns the font of the shape's text.getTextHorizontalAlign(int index) getTextVerticalAlign(int index) booleanReturns true if a shadow should be rendered below the drawable.booleanhasText(int index) Returns true if the shape has text in it.booleanisBorder(int index) Returns true if the shape is a border.booleanisFillImage(int index) Returns true if the shape has a fill image.booleanisPaintTransformable(Drawable.PaintMode paintMode, int index) This can returnfalseto indicate that the paint cannot be transformed in any way for this shape, e.g.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface se.conciliate.extensions.drawable.Drawable
getId, getShape, getShapeCount, useHyphenation
-
Constructor Details
-
AbstractDrawable
public AbstractDrawable()
-
-
Method Details
-
isPaintTransformable
Description copied from interface:DrawableThis can returnfalseto indicate that the paint cannot be transformed in any way for this shape, e.g. if the user has created a color scheme and this is one of the shapes in a drawable for a vertex it will have the same color regardless of the settings in the color scheme iftrueis returned.- Specified by:
isPaintTransformablein interfaceDrawable- Parameters:
paintMode- The paint mode used.index- The index of the shape.- Returns:
- true to never transform the paint of the given paint mode, of the shape at the given index, false to allow paint transformation of the given paint mode and shape.
- See Also:
-
hasShadow
public boolean hasShadow()Description copied from interface:DrawableReturns true if a shadow should be rendered below the drawable. -
getOutline
Description copied from interface:DrawableReturns the outline of the drawable. This is the area that marks the outer limit of the drawable, where edges will stop.- Specified by:
getOutlinein interfaceDrawable- Parameters:
bounds- The outer bounds that the drawable should fill up- Returns:
- The outline of the drawable.
-
isBorder
public boolean isBorder(int index) Description copied from interface:DrawableReturns true if the shape is a border. A border's outline can be changed if the user indicates that this drawable should have another border or if the drawable is selected in the UI. If isBorder() is true getOutlinePaint() and getOutlineStroke() can be ignored by the renderer. -
isFillImage
public boolean isFillImage(int index) Description copied from interface:DrawableReturns true if the shape has a fill image.- Specified by:
isFillImagein interfaceDrawable- Parameters:
index- the index of the shape,0 <= i < getShapeCount()- Returns:
- true if the shape has a fill image
-
getPaint
Description copied from interface:DrawableReturns a paint for a given shape and paint mode. -
getStroke
Description copied from interface:DrawableReturns the stroke of the edge around the shape. -
getFillImage
Description copied from interface:DrawableReturns the image that fills the shape. The shape will be stretched to fill the shape.- Specified by:
getFillImagein interfaceDrawable- Parameters:
index- the index of the shape,0 <= i < getShapeCount()lang- The language to get the image for.- Returns:
- the shape's fill image
-
hasText
public boolean hasText(int index) Description copied from interface:DrawableReturns true if the shape has text in it. -
getText
Description copied from interface:DrawableReturns the text that lies in the shape. -
getTextFont
Description copied from interface:DrawableReturns the font of the shape's text.- Specified by:
getTextFontin interfaceDrawable- Parameters:
index- the index of the shape,0 <= i < getShapeCount()- Returns:
- the shape's font
-
getTextDirection
- Specified by:
getTextDirectionin interfaceDrawable
-
getTextHorizontalAlign
- Specified by:
getTextHorizontalAlignin interfaceDrawable
-
getTextVerticalAlign
- Specified by:
getTextVerticalAlignin interfaceDrawable
-