|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.presentation.ViewArea
public final class ViewArea
View area class.
This element references to a particular model animation coordinates of
active object/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)).
| Field Summary | |
|---|---|
static int |
BOTTOM_LEFT
Alignment constant. |
static int |
BOTTOM_RIGHT
Alignment constant. |
static int |
CENTER
Alignment constant. |
static int |
NONE
Scaling mode constant. |
static int |
SHRINK_TO_FIT
Scaling mode constant. |
static int |
SHRINK_TO_HEIGHT
Scaling mode constant. |
static int |
SHRINK_TO_WIDTH
Scaling mode constant. |
static int |
SPECIFIED_ZOOM
Scaling mode constant. |
static int |
TOP_LEFT
Alignment constant. |
static int |
TOP_RIGHT
Alignment constant. |
static int |
ZOOM_TO_FIT
Scaling mode constant. |
static int |
ZOOM_TO_HEIGHT
Scaling mode constant. |
static int |
ZOOM_TO_WIDTH
Scaling mode constant. |
| Constructor Summary | |
|---|---|
ViewArea(Presentable owner,
java.lang.String title)
Constructor, creates new ViewArea with top-left alignment at (0, 0) point and without zoom change. |
|
ViewArea(Presentable owner,
java.lang.String title,
double x,
double y,
int alignTo)
Constructor, creates new ViewArea object referencing to the given coordinates, without zoom change |
|
ViewArea(Presentable owner,
java.lang.String title,
double x,
double y,
int alignTo,
int scaling,
double zoom,
double width,
double height)
Constructor, creates new ViewArea with specified parameters |
|
| Method Summary | |
|---|---|
int |
getAlignTo()
Returns the view area point alignment |
double |
getHeight()
Returns the height of the view area |
int |
getScaling()
Returns the scaling type of the 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 |
double |
getZoom()
Returns the zoom of the view area |
void |
navigateTo()
Displays this view area in the model animation panel |
void |
restoreOwner(java.lang.Object owner)
This method normally should not be called by user This method restores owner of this object The method is used in snapshot saving/loading |
void |
setAlignTo(int alignTo)
Sets the view area point alignment |
void |
setHeight(double height)
Sets the height of the view area |
void |
setScaling(int scaling)
Sets scaling type for this 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 |
void |
setZoom(double zoom)
Sets the zoom of the view area |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CENTER
setAlignTo(int),
Constant Field Valuespublic static final int TOP_LEFT
setAlignTo(int),
Constant Field Valuespublic static final int TOP_RIGHT
setAlignTo(int),
Constant Field Valuespublic static final int BOTTOM_LEFT
setAlignTo(int),
Constant Field Valuespublic static final int BOTTOM_RIGHT
setAlignTo(int),
Constant Field Valuespublic static final int NONE
alignTo value,
is positioned in the animation panel using current zoom
of the animation panel (zoom remains unchanged).
setScaling(int),
Constant Field Valuespublic static final int SPECIFIED_ZOOM
alignTo value,
is positioned in the animation panel using specified zoom
value
setScaling(int),
Constant Field Valuespublic static final int ZOOM_TO_FIT
(x, y, width, height)
is scaled to fit into the animation panel (zoom
is reduced or enlarged)
setScaling(int),
Constant Field Valuespublic static final int ZOOM_TO_WIDTH
(x, y, width, height)
is scaled to fit into the width of
the animation panel (zoom is reduced or enlarged)
setScaling(int),
Constant Field Valuespublic static final int ZOOM_TO_HEIGHT
(x, y, width, height)
is scaled to fit into the height of
the animation panel (zoom is reduced or enlarged)
setScaling(int),
Constant Field Valuespublic static final int SHRINK_TO_FIT
zoom is applied to the panel,
after that, the referenced view area (x, y, width, height)
is scaled down to fit into the animation panel, if needed
setScaling(int),
Constant Field Valuespublic static final int SHRINK_TO_WIDTH
zoom is applied to the panel,
after that, the referenced view area (x, y, width, height)
is scaled down to fit into the width of the animation
panel, if needed
setScaling(int),
Constant Field Valuespublic static final int SHRINK_TO_HEIGHT
zoom is applied to the panel,
after that, the referenced view area (x, y, width, height)
is scaled down to fit into the height of the animation
panel, if needed
setScaling(int),
Constant Field Values| Constructor Detail |
|---|
public ViewArea(Presentable owner,
java.lang.String title)
x: 0 y: 0 alognTo: TOP_LEFT scaling: NONE zoom: 1.0
owner - the active object or experiment this view area belongs totitle - the title of view area (will be shown in View areas menu)
public ViewArea(Presentable owner,
java.lang.String title,
double x,
double y,
int alignTo)
owner - the active object 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 areaalignTo - the view area point alignment, one of:
public ViewArea(Presentable owner,
java.lang.String title,
double x,
double y,
int alignTo,
int scaling,
double zoom,
double width,
double height)
owner - the active object 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 areaalignTo - the view area point alignment, one of:scaling - the scaling type, one of:NONE
SPECIFIED_ZOOM
ZOOM_TO_FIT
ZOOM_TO_WIDTH
ZOOM_TO_HEIGHT
SHRINK_TO_FIT
SHRINK_TO_WIDTH
SHRINK_TO_HEIGHT
zoom - the zoom levelwidth - the width of the view areaheight - the height of the view area| Method Detail |
|---|
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - the title to setpublic double getX()
public void setX(double x)
x - the x coordinate to setpublic double getY()
public void setY(double y)
y - the y coordinate to setpublic int getAlignTo()
public void setAlignTo(int alignTo)
alignTo - the view area point alignment, one of:public int getScaling()
public void setScaling(int scaling)
scaling - the scaling type of the view area, one of:public double getZoom()
public void setZoom(double zoom)
zoom - the zoom of the view areapublic double getWidth()
public void setWidth(double width)
width - the width of the view areapublic double getHeight()
public void setHeight(double height)
height - the height of the view areapublic void restoreOwner(java.lang.Object owner)
restoreOwner in interface com.xj.anylogic.engine.internal.Childowner - owner of this object, usually ActiveObject or
Experimentpublic void navigateTo()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||