AnyLogic AnyLogic
Expand
Font size
  • java.lang.Object
    • com.anylogic.engine.presentation.ViewArea
All Implemented Interfaces:
com.anylogic.engine.internal.Child, java.io.Serializable

public final class ViewArea
extends java.lang.Object
implements java.io.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: navigateTo(), Panel#navigateTo(ViewArea)).
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Constructor Summary

Constructors 
ViewArea​(Presentable owner, java.lang.String title, double x, double y, double width, double height)
Constructor, creates new ViewArea with specified parameters
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods 
double getHeight()
Returns the height of the view area
Presentable getOwner()
Returns agent or experiment object containing this view area.
java.lang.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​(java.lang.Object owner)
Deprecated.
void setHeight​(double height)
Sets the height of the view area
void setTitle​(java.lang.String title)
Sets the title of view area (will be shown in View areas menu)
void setWidth​(double width)
Sets the width of the view area
void setX​(double x)
Sets the x coordinate of the view area
void setY​(double y)
Sets the y coordinate of the view area
Modifier and Type Method Description

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ViewArea

public ViewArea​(Presentable owner,
                java.lang.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 to
title - the title of view area (will be shown in View areas menu)
x - the x coordinate of the view area
y - the x coordinate of the view area
width - the width of the view area
height - the height of the view area

Method Detail

getTitle

public java.lang.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)

setTitle

public void setTitle​(java.lang.String title)
Sets the title of view area (will be shown in View areas menu)
Parameters:
title - the title to set

getX

public double getX()
Returns the x coordinate of the view area
Returns:
the x coordinate of the view area

setX

public void setX​(double x)
Sets the x coordinate of the view area
Parameters:
x - the x coordinate to set

getY

public double getY()
Returns the y coordinate of the view area
Returns:
the y coordinate of the view area

setY

public void setY​(double y)
Sets the y coordinate of the view area
Parameters:
y - the y coordinate to set

getWidth

public double getWidth()
Returns the width of the view area
Returns:
the width of the view area

setWidth

public void setWidth​(double width)
Sets the width of the view area
Parameters:
width - the width of the view area

getHeight

public double getHeight()
Returns the height of the view area
Returns:
the height of the view area

setHeight

public void setHeight​(double height)
Sets the height of the view area
Parameters:
height - the height of the view area

getOwner

public Presentable getOwner()
Returns agent or experiment object containing this view area.
Returns:
agent or experiment object containing this view area.
Since:
8.3

restoreOwner

@AnyLogicInternalCodegenAPI
@Deprecated
public void restoreOwner​(java.lang.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
Specified by:
restoreOwner in interface com.anylogic.engine.internal.Child
Parameters:
owner - owner of this object, usually Agent or Experiment
public void navigateTo()
Displays this view area in the model animation panel
How can we improve this article?