Package com.anylogic.engine.presentation
- java.lang.Object
- com.anylogic.engine.presentation.ViewArea
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,Serializable
public final class ViewArea extends Object implements Serializable, com.anylogic.engine.internal.Child
View area class.
This element references to a particular model animation coordinates of agent/experiment.
Provides ability of fast and convenient animation positioning in the model animation panel (using controls on toolbar or API, see:
This element references to a particular model animation coordinates of agent/experiment.
Provides ability of fast and convenient animation positioning in the model animation panel (using controls on toolbar or API, see:
navigateTo()
, Panel#navigateTo(ViewArea)
).- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
ViewArea |
Constructor, creates new ViewArea with specified parameters
|
Modifier and Type | Method | Description |
---|---|---|
double | getHeight() |
Returns the height of the view area
|
Presentable | getOwner() |
Returns agent or experiment object containing this view area.
|
String | getTitle() |
Returns the title of view area (will be shown in View areas menu)
|
double | getWidth() |
Returns the width of the view area
|
double | getX() |
Returns the x coordinate of the view area
|
double | getY() |
Returns the y coordinate of the view area
|
void | navigateTo() |
Displays this view area in the model animation panel
|
void | restoreOwner |
Deprecated.
|
void | setHeight |
Sets the height of the view area
|
void | setTitle |
Sets the title of view area (will be shown in View areas menu)
|
void | setWidth |
Sets the width of the view area
|
void | setX |
Sets the x coordinate of the view area
|
void | setY |
Sets the y coordinate of the view area
|
public ViewArea(Presentable owner, String title, double x, double y, double width, double height)
Constructor, creates new ViewArea with specified parameters
- Parameters:
owner
- the agent or experiment this view area belongs totitle
- the title of view area (will be shown in View areas menu)x
- the x coordinate of the view areay
- the x coordinate of the view areawidth
- the width of the view areaheight
- the height of the view area
public String getTitle()
Returns the title of view area (will be shown in View areas menu)
- Returns:
- the title of view area (will be shown in View areas menu)
public void setTitle(String title)
Sets the title of view area (will be shown in View areas menu)
- Parameters:
title
- the title to set
public double getX()
Returns the x coordinate of the view area
- Returns:
- the x coordinate of the view area
public void setX(double x)
Sets the x coordinate of the view area
- Parameters:
x
- the x coordinate to set
public double getY()
Returns the y coordinate of the view area
- Returns:
- the y coordinate of the view area
public void setY(double y)
Sets the y coordinate of the view area
- Parameters:
y
- the y coordinate to set
public double getWidth()
Returns the width of the view area
- Returns:
- the width of the view area
public void setWidth(double width)
Sets the width of the view area
- Parameters:
width
- the width of the view area
public double getHeight()
Returns the height of the view area
- Returns:
- the height of the view area
public void setHeight(double height)
Sets the height of the view area
- Parameters:
height
- the height of the view area
public Presentable getOwner()
Returns agent or experiment object containing this view area.
- Returns:
- agent or experiment object containing this view area.
- Since:
- 8.3
@AnyLogicInternalCodegenAPI @Deprecated public void restoreOwner(Object owner)
Deprecated.
This method normally should not be called by user
This method restores owner of this object
The method is used in snapshot saving/loading
This method restores owner of this object
The method is used in snapshot saving/loading
- Specified by:
restoreOwner
in interfacecom.anylogic.engine.internal.Child
- Parameters:
owner
- owner of this object, usuallyAgent
orExperiment