Class Text
- java.lang.Object
-
- jadex.extension.envsupport.observer.graphics.drawable.AbstractVisual2D
-
- jadex.extension.envsupport.observer.graphics.drawable.Primitive
-
- jadex.extension.envsupport.observer.graphics.drawable.Text
-
public final class Text extends Primitive
Drawable component for displaying text.
-
-
Field Summary
Fields Modifier and Type Field Description static float
BASE_VIEWPORT_SIZE
Viewport size (in pixels) on which the base font size is relative to-
Fields inherited from class jadex.extension.envsupport.observer.graphics.drawable.Primitive
ABSOLUTE_POSITION, ABSOLUTE_ROTATION, ABSOLUTE_SIZE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, color_, drawcondition, enableDCPos, enableDCRot, enableDCSize, halign, PRIMITIVE_TYPE_ELLIPSE, PRIMITIVE_TYPE_RECTANGLE, PRIMITIVE_TYPE_REGULARPOLYGON, PRIMITIVE_TYPE_TEXT, PRIMITIVE_TYPE_TEXTUREDRECTANGLE, PRIMITIVE_TYPE_TRIANGLE, renderinfos, type, valign
-
-
Constructor Summary
Constructors Constructor Description Text()
The condition deciding if the drawable should be drawn.Text(java.lang.Object position, java.awt.Font baseFont, java.awt.Color color, java.lang.String text, int halign, int valign, int absFlags, IParsedExpression drawcondition)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Font
getBaseFont()
static IVector2
getBasePosition(AbstractViewport vp, IVector2 dcPos, IVector2 position, IVector2 canvasSize, boolean invX, boolean invY)
static float
getBasicFontScale(IVector2 canvasSize, IVector2 areaSize, IVector2 size)
static java.lang.String
getReplacedText(DrawableCombiner dc, java.lang.Object obj, java.lang.String text, IViewport vp)
java.lang.String
getText()
double
getTextHAlignment(java.awt.font.TextLayout tl)
-
Methods inherited from class jadex.extension.envsupport.observer.graphics.drawable.Primitive
enableAbsolutePosition, enableAbsoluteRotation, enableAbsoluteSize, flushRenderInfo, getColor, getDrawCondition, getHAlign, getRenderInfo, getType, getVAlign, isRelativePosition, isRelativeRotation, isRelativeSize, setColor, setDrawCondition, setHAlign, setRenderInfo, setType, setVAlign
-
Methods inherited from class jadex.extension.envsupport.observer.graphics.drawable.AbstractVisual2D
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSize
-
-
-
-
Field Detail
-
BASE_VIEWPORT_SIZE
public static final float BASE_VIEWPORT_SIZE
Viewport size (in pixels) on which the base font size is relative to- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Text
public Text()
The condition deciding if the drawable should be drawn.
-
Text
public Text(java.lang.Object position, java.awt.Font baseFont, java.awt.Color color, java.lang.String text, int halign, int valign, int absFlags, IParsedExpression drawcondition)
-
-
Method Detail
-
getBaseFont
public java.awt.Font getBaseFont()
-
getText
public java.lang.String getText()
-
getTextHAlignment
public double getTextHAlignment(java.awt.font.TextLayout tl)
-
getBasePosition
public static final IVector2 getBasePosition(AbstractViewport vp, IVector2 dcPos, IVector2 position, IVector2 canvasSize, boolean invX, boolean invY)
-
getBasicFontScale
public static final float getBasicFontScale(IVector2 canvasSize, IVector2 areaSize, IVector2 size)
-
getReplacedText
public static final java.lang.String getReplacedText(DrawableCombiner dc, java.lang.Object obj, java.lang.String text, IViewport vp)
-
-