public class BackgroundElementAnimation
extends java.lang.Object
Constructor and Description |
---|
BackgroundElementAnimation(ModelAnimation owner,
java.lang.String baseId,
java.lang.String name,
java.lang.String text,
int textPosition,
int textSize,
int textStyle,
double level,
Position middle,
Form form,
java.awt.Color fg,
java.awt.Color bg,
boolean showInAnimation)
BackgroundElement with fixed middle point
|
BackgroundElementAnimation(ModelAnimation owner,
java.lang.String baseId,
java.lang.String name,
java.lang.String text,
int textPosition,
int textSize,
int textStyle,
Position topLeft,
Position bottomRight,
double level,
java.awt.Color fg,
java.awt.Color bg,
boolean showInAnimation)
Build background element with fixed corners
|
Modifier and Type | Method and Description |
---|---|
void |
setBackground(java.awt.Color bg)
Changes Background Color of Background Element
|
void |
setImageId(java.lang.String imageId)
Changes/set imageId of background element.
|
void |
setText(java.lang.String text)
Changes Text of Background Element
|
void |
setTextColor(java.awt.Color fg)
Changes Color of Text in Background Element
|
void |
setTextPosition(int pos)
Changes Position of Text in Background Element
|
void |
setTextSize(int size)
Changes Size of Text in Background Element
|
void |
setTextStyle(int style)
Changes Style of Text in Background Element
|
public BackgroundElementAnimation(ModelAnimation owner, java.lang.String baseId, java.lang.String name, java.lang.String text, int textPosition, int textSize, int textStyle, Position topLeft, Position bottomRight, double level, java.awt.Color fg, java.awt.Color bg, boolean showInAnimation)
owner
- Simulation modelbaseId
- A internal Name. The framework generate with this name an idname
- Can be null, when not null a border
with the name is shown.text
- The text element, that is shown in background element,
with automatic word wrapping. Use textPosition
- For values look at BackgroundElement.TEXT_POSITION_...textSize
- For values look at BackgroundElement.TEXT_SIZE_...textStyle
- For values look at BackgroundElement.TEXT_STYLE_...topLeft
- Coordinate of topLeft corner pointbottomRight
- Coordinate of bottomRight corner pointlevel
- Elements with low level are painted in front
of elements with high levelfg
- Text colorbg
- Background color, when null then transparentshowInAnimation
- public BackgroundElementAnimation(ModelAnimation owner, java.lang.String baseId, java.lang.String name, java.lang.String text, int textPosition, int textSize, int textStyle, double level, Position middle, Form form, java.awt.Color fg, java.awt.Color bg, boolean showInAnimation)
owner
- Simulation modelbaseId
- A internal Name. The framework generate with this name an idname
- Can be null, when not null a border
with the name is shown.text
- The text element, that is shown in background element,
with automatic word wrapping. Use textPosition
- For values look at BackgroundElement.TEXT_POSITION_...textSize
- For values look at BackgroundElement.TEXT_SIZE_...textStyle
- For values look at BackgroundElement.TEXT_STYLE_...level
- Elements with low level are painted in front
of elements with high levelmiddle
- Middle point of background elementform
- Form of background element,
when null minimal size of text is used.fg
- Text colorbg
- Background color, when null then transparentshowInAnimation
- public void setText(java.lang.String text)
text
- The text element, that is shown in background element,
with automatic word wrapping. Use public void setTextPosition(int pos)
pos
- For values look at BackgroundElement.TEXT_POSITION_...public void setTextSize(int size)
size
- For values look at BackgroundElement.TEXT_SIZE_...public void setTextStyle(int style)
style
- For values look at BackgroundElement.TEXT_STYLE_...public void setTextColor(java.awt.Color fg)
fg
- Text colorpublic void setBackground(java.awt.Color bg)
bg
- Background color, when null then transparentpublic void setImageId(java.lang.String imageId)
imageId
-