Class Primitive
- java.lang.Object
- 
- jadex.extension.envsupport.observer.graphics.drawable.AbstractVisual2D
- 
- jadex.extension.envsupport.observer.graphics.drawable.Primitive
 
 
- 
- Direct Known Subclasses:
- RegularPolygon,- Text,- TexturedRectangle
 
 public class Primitive extends AbstractVisual2D 
- 
- 
Field SummaryFields Modifier and Type Field Description static intABSOLUTE_POSITIONstatic intABSOLUTE_ROTATIONstatic intABSOLUTE_SIZEstatic intALIGN_BOTTOMBottom Alignmentstatic intALIGN_CENTERCenter Alignmentstatic intALIGN_LEFTLeft Alignmentstatic intALIGN_MIDDLEMiddle Alignmentstatic intALIGN_RIGHTRight Alignmentstatic intALIGN_TOPTop Alignmentprotected java.lang.Objectcolor_Color or Color binding of the primitive.protected IParsedExpressiondrawconditionThe condition deciding if the drawable should be drawn.protected booleanenableDCPosEnable DrawableCombiner positionprotected booleanenableDCRotEnable DrawableCombiner positionprotected booleanenableDCSizeEnable DrawableCombiner positionprotected inthalignHorizontal alignmentstatic intPRIMITIVE_TYPE_ELLIPSEstatic intPRIMITIVE_TYPE_RECTANGLEstatic intPRIMITIVE_TYPE_REGULARPOLYGONstatic intPRIMITIVE_TYPE_TEXTstatic intPRIMITIVE_TYPE_TEXTUREDRECTANGLEstatic intPRIMITIVE_TYPE_TRIANGLEprotected java.lang.Object[]renderinfosCached render informationprotected inttypePrimitive typeprotected intvalignVertical alignment
 - 
Constructor SummaryConstructors Constructor Description Primitive()Primitive(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, int absFlags, java.lang.Object c, IParsedExpression drawcondition)Initializes the drawable.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenableAbsolutePosition(boolean enable)Enables using absolute positioning.voidenableAbsoluteRotation(boolean enable)Enables using absolute rotation.voidenableAbsoluteSize(boolean enable)Enables using absolute scaling.voidflushRenderInfo()Flushes the render information.java.lang.ObjectgetColor()Gets the color or color binding of the drawableIParsedExpressiongetDrawCondition()Gets the draw condition.intgetHAlign()Gets the horizontal alignment.java.lang.ObjectgetRenderInfo(int infoId)Returns cached render information.intgetType()Get the primitive type.intgetVAlign()Gets the vertical alignment.booleanisRelativePosition()Tests if primitive is using relative positioning.booleanisRelativeRotation()Tests if primitive is using relative rotation.booleanisRelativeSize()Tests if primitive is using relative scaling.voidsetColor(java.lang.Object c)Sets a new color or binding for the drawablevoidsetDrawCondition(IParsedExpression drawcondition)Sets the draw condition.voidsetHAlign(int halign)Sets the horizontal alignment.voidsetRenderInfo(int infoId, java.lang.Object info)Sets cached render information.voidsetType(int type)Set the primitive type.voidsetVAlign(int valign)Sets the vertical alignment.- 
Methods inherited from class jadex.extension.envsupport.observer.graphics.drawable.AbstractVisual2DbindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSize
 
- 
 
- 
- 
- 
Field Detail- 
ABSOLUTE_POSITIONpublic static final int ABSOLUTE_POSITION - See Also:
- Constant Field Values
 
 - 
ABSOLUTE_SIZEpublic static final int ABSOLUTE_SIZE - See Also:
- Constant Field Values
 
 - 
ABSOLUTE_ROTATIONpublic static final int ABSOLUTE_ROTATION - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_TYPE_ELLIPSEpublic static final int PRIMITIVE_TYPE_ELLIPSE - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_TYPE_RECTANGLEpublic static final int PRIMITIVE_TYPE_RECTANGLE - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_TYPE_REGULARPOLYGONpublic static final int PRIMITIVE_TYPE_REGULARPOLYGON - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_TYPE_TEXTpublic static final int PRIMITIVE_TYPE_TEXT - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_TYPE_TEXTUREDRECTANGLEpublic static final int PRIMITIVE_TYPE_TEXTUREDRECTANGLE - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_TYPE_TRIANGLEpublic static final int PRIMITIVE_TYPE_TRIANGLE - See Also:
- Constant Field Values
 
 - 
ALIGN_LEFTpublic static final int ALIGN_LEFT Left Alignment- See Also:
- Constant Field Values
 
 - 
ALIGN_CENTERpublic static final int ALIGN_CENTER Center Alignment- See Also:
- Constant Field Values
 
 - 
ALIGN_RIGHTpublic static final int ALIGN_RIGHT Right Alignment- See Also:
- Constant Field Values
 
 - 
ALIGN_TOPpublic static final int ALIGN_TOP Top Alignment- See Also:
- Constant Field Values
 
 - 
ALIGN_MIDDLEpublic static final int ALIGN_MIDDLE Middle Alignment- See Also:
- Constant Field Values
 
 - 
ALIGN_BOTTOMpublic static final int ALIGN_BOTTOM Bottom Alignment- See Also:
- Constant Field Values
 
 - 
enableDCPosprotected boolean enableDCPos Enable DrawableCombiner position
 - 
enableDCSizeprotected boolean enableDCSize Enable DrawableCombiner position
 - 
enableDCRotprotected boolean enableDCRot Enable DrawableCombiner position
 - 
color_protected java.lang.Object color_ Color or Color binding of the primitive.
 - 
drawconditionprotected IParsedExpression drawcondition The condition deciding if the drawable should be drawn.
 - 
renderinfosprotected java.lang.Object[] renderinfos Cached render information
 - 
typeprotected int type Primitive type
 - 
halignprotected int halign Horizontal alignment
 - 
valignprotected int valign Vertical alignment
 
- 
 - 
Constructor Detail- 
Primitivepublic Primitive() 
 - 
Primitivepublic Primitive(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, int absFlags, java.lang.Object c, IParsedExpression drawcondition)Initializes the drawable.- Parameters:
- position- position or position-binding
- xrotation- xrotation or rotation-binding
- yrotation- yrotation or rotation-binding
- zrotation- zrotation or rotation-binding
- size- size or size-binding
- absFlags- flags for setting position, size and rotation as absolutes
- c- the drawable's color or color binding
 
 
- 
 - 
Method Detail- 
getTypepublic int getType() Get the primitive type.- Returns:
- The type.
 
 - 
setTypepublic void setType(int type) Set the primitive type.- Parameters:
- type- The type to set.
 
 - 
enableAbsolutePositionpublic void enableAbsolutePosition(boolean enable) Enables using absolute positioning.- Parameters:
- enable- true, to use the drawable's value as an absolute.
 
 - 
enableAbsoluteSizepublic void enableAbsoluteSize(boolean enable) Enables using absolute scaling.- Parameters:
- enable- true, to use the drawable's value as an absolute.
 
 - 
enableAbsoluteRotationpublic void enableAbsoluteRotation(boolean enable) Enables using absolute rotation.- Parameters:
- enable- true, to use the drawable's value as an absolute.
 
 - 
isRelativePositionpublic boolean isRelativePosition() Tests if primitive is using relative positioning.- Returns:
- true, if the drawable's value is an absolute.
 
 - 
isRelativeSizepublic boolean isRelativeSize() Tests if primitive is using relative scaling.- Returns:
- true, if the drawable's value is an absolute.
 
 - 
isRelativeRotationpublic boolean isRelativeRotation() Tests if primitive is using relative rotation.- Returns:
- true, if the drawable's value is an absolute.
 
 - 
setDrawConditionpublic void setDrawCondition(IParsedExpression drawcondition) Sets the draw condition.- Parameters:
- drawcondition- the draw condition
 
 - 
getDrawConditionpublic IParsedExpression getDrawCondition() Gets the draw condition.- Returns:
- the draw condition
 
 - 
getColorpublic java.lang.Object getColor() Gets the color or color binding of the drawable- Returns:
- color or color binding of the drawable
 
 - 
setColorpublic void setColor(java.lang.Object c) Sets a new color or binding for the drawable- Parameters:
- c- new color or binding
 
 - 
getVAlignpublic int getVAlign() Gets the vertical alignment.- Returns:
- The vertical alignment (top, middle, bottom).
 
 - 
setVAlignpublic void setVAlign(int valign) Sets the vertical alignment.- Parameters:
- valign- The vertical alignment (top, middle, bottom).
 
 - 
getHAlignpublic int getHAlign() Gets the horizontal alignment.- Returns:
- The horizontal alignment (left, center, right).
 
 - 
setHAlignpublic void setHAlign(int halign) Sets the horizontal alignment.- Parameters:
- halign- The horizontal alignment (left, center, right).
 
 - 
getRenderInfopublic java.lang.Object getRenderInfo(int infoId) Returns cached render information.- Parameters:
- infoId- id of the information
- Returns:
- render info
 
 - 
setRenderInfopublic void setRenderInfo(int infoId, java.lang.Object info)Sets cached render information.- Parameters:
- infoId- id of the information
- info- the render info
 
 - 
flushRenderInfopublic void flushRenderInfo() Flushes the render information.
 
- 
 
-