com.xj.anylogic.engine
Class Presentable

java.lang.Object
  extended by com.xj.anylogic.engine.Presentable
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Utilities

public abstract class Presentable
extends java.lang.Object
implements java.io.Serializable

A base for any object that can be displayed by presentation panel. Is capable of drawing model and presentation parts of the object in a Graphics2D context of a Panel. Contains a number of get... methods that return properties of non-persistent shapes. Non-persistent shapes are identified by their id and index (for replicated shapes).

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Field Summary
static int ALIGNMENT_CENTER
          Text alignment type constant
static int ALIGNMENT_LEFT
          Text alignment type constant
static int ALIGNMENT_RIGHT
          Text alignment type constant
static int CAD_ANTIALIASING
          Attribute of CAD indicating that CAD should be drawn using antialiasing.
static int CAD_INVERTED
          Attribute of CAD indicating that CAD should be drawn in inverted colors.
static int LINE_STYLE_DASHED
           
static int LINE_STYLE_DOTTED
           
static int LINE_STYLE_SOLID
           
static int NAVIGATION_FULL
          3D Window navigation mode constant.
static int NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO
          3D Window navigation mode constant.
static int NAVIGATION_NONE
          3D Window navigation mode constant.
static int NAVIGATION_ROTATION_ONLY
          3D Window navigation mode constant.
static int SHAPE_ARC
           
static int SHAPE_BUTTON
           
static int SHAPE_CAD
           
static int SHAPE_CHART_BAR
           
static int SHAPE_CHART_HISTOGRAM
           
static int SHAPE_CHART_HISTOGRAM2D
           
static int SHAPE_CHART_PIE
           
static int SHAPE_CHART_PLOT
           
static int SHAPE_CHART_STACK
           
static int SHAPE_CHART_TIME_COLOR
           
static int SHAPE_CHART_TIME_PLOT
           
static int SHAPE_CHART_TIME_STACK
           
static int SHAPE_CHECKBOX
           
static int SHAPE_COMBOBOX
           
static int SHAPE_CURVE
           
static int SHAPE_EMBEDDED_OBJECT
           
static int SHAPE_FILECHOOSER
           
static int SHAPE_GROUP
           
static int SHAPE_IMAGE
           
static int SHAPE_LINE
           
static int SHAPE_LISTBOX
           
static int SHAPE_OVAL
           
static int SHAPE_PIXEL
           
static int SHAPE_POLYLINE
           
static int SHAPE_PROGRESSBAR
           
static int SHAPE_RADIOBUTTONS
           
static int SHAPE_RECTANGLE
           
static int SHAPE_ROUNDED_RECTANGLE
           
static int SHAPE_SLIDER
           
static int SHAPE_TEXT
           
static int SHAPE_TEXTFIELD
           
 
Constructor Summary
Presentable()
           
 
Method Summary
 boolean contains(int id, double px, double py)
          Tests if a (possibly, replicated) non-persistent shape contains the point with the coordinates (px,py).
 void drawCollection(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object collection)
          Draws a collection image and its name at the given positions and (if the collection implements Collection interface) displays the number of elements underneath the name.
 void drawDatabase(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object object)
          Draws a database object image and its name at the given positions.
 void drawDataset(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object dataset)
          Draws a dataset image and its name at the given positions.
 void drawExcelFile(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object object)
          Draws an Excel file object image and its name at the given positions.
 void drawFunction(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name)
          Draws a function image and its name at the given positions.
 void drawHistogram2DData(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object histogram2DData)
          Draws a histogram 2D data image and its name at the given positions.
 void drawHistogramData(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object histogramData)
          Draws a histogram data image and its name at the given positions.
 void drawInsert(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object object)
          Draws a insert object image and its name at the given positions.
 void drawKeyValueTable(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object object)
          Draws a table object image and its name at the given positions.
 void drawModel(Panel panel, java.awt.Graphics2D g, boolean publicOnly)
          Draws the presentation graphics marked as icon, and the model elements (variables, parameters, events, statecharts, etc. model parts of embedded objects) of the presentable object.
 void drawModelElements(Panel panel, java.awt.Graphics2D g, boolean publicOnly)
          Should be overridden to draw the model primitives (variables, parameters, events, statecharts, connectors, etc.) of the presentatable object and also the model parts of its embedded objects (for latter call drawEmbeddedObjectModel(...)).
 void drawPlainVariable(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object var, boolean constant)
          Draws a variable image and its name at the given positions and displays the variable toString text underneath the name.
 void drawPresentation(Panel panel, java.awt.Graphics2D g, boolean publicOnly)
          Draws the presentation elements of the of the presentable object (shapes, controls, charts, and presentations of the embedded objects).
 void drawQuery(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object object)
          Draws a query object image and its name at the given positions.
 void drawSchedule(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, Schedule<?> s)
          Draws a schedule image and its name at the given positions.
 void drawShape(int id, Panel panel, java.awt.Graphics2D g, java.awt.geom.AffineTransform xform, boolean publicOnly)
          Draws a (possibly, replicated) non-persistent shape, control or chart in the given graphics context.
 void drawStatistics(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object statistics)
          Draws a statistics image and its name at the given positions.
 void drawTableFunction(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name)
          Draws a table function image and its name at the given positions.
 void drawTextFile(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object object)
          Draws a text file object image and its name at the given positions.
 void drawUpdate(Panel panel, java.awt.Graphics2D g, int x, int y, int xname, int yname, java.lang.String name, java.lang.Object object)
          Draws a update object image and its name at the given positions.
 void executeShapeControlAction(int id, int index)
          Should be overridden to execute the action associated with a non-persistent control that has no value information (like button).
 void executeShapeControlAction(int id, int index, boolean value)
          Should be overridden to execute the action associated with a non-persistent control that has a boolean value (like checkbox).
 void executeShapeControlAction(int id, int index, double value)
          Should be overridden to execute the action associated with a non-persistent control that has a double value (like slider).
 void executeShapeControlAction(int id, int index, int value)
          Should be overridden to execute the action associated with a non-persistent control that has an integer value (like radio button group or list).
 void executeShapeControlAction(int id, int index, java.lang.String value)
          Should be overridden to execute the action associated with a non-persistent control that has a String value (like text field).
 void executeShapeControlAction(int id, int index, java.lang.String value, java.lang.String[] values)
          Should be overridden to execute the action associated with a non-persistent control that has a one or more String values (like list box).
 void finishReadObject_xjal(java.io.ObjectInputStream in, java.lang.Class<? extends Presentable> callerClass)
          This method should not be called by user
abstract  Engine getEngine()
          Returns the simulation engine.
 Experiment<?> getExperiment()
          Returns the experiment controlling the model execution.
 java.lang.String getNameOfShape(int id)
          Must be overridden to return the name of a non-persistent shape.
 java.lang.Object getPersistentShape(int id)
          Should be overridden to return the Shape / ReplicatedShape if the id corresponds to a persistent shape, or null if it corresponds to a non-persistent shape.
abstract  Presentation getPresentation()
          Returns the presentation object of the model, or null if there is none.
 double getShapeArcAngle(int id)
          Returns the angular extent of a (not replicated) non-persistent arc shape in radians, clockwise.
 double getShapeArcAngle(int id, int index)
          Must be overridden to return the angular extent of a non-persistent arc shape in radians, clockwise.
 double getShapeArcStartAngle(int id)
          Returns the starting angle of a (not replicated) non-persistent shape in radians, 0 being the 12 o'clock, clockwise.
 double getShapeArcStartAngle(int id, int index)
          Should be overridden to return the starting angle of a non-persistent shape in radians, 0 being the 12 o'clock, clockwise.
 java.awt.Color[] getShapeCADCustomLayerColors(int id, int index)
          Must be overridden to return the array of custom layer colors of a non-persistent CAD drawing.
 int getShapeCADDrawingAttributes(int id)
          Must be overridden to return the drawing attributes for non-persistent CAD shapes.
 int getShapeCADDrawingAttributes(int id, int index)
          Must be overridden to return the drawing attributes for non-persistent CAD shapes.
 java.lang.String getShapeCADFileName(int id)
          Returns the file name of a (not replicated) non-persistent CAD drawing.
 java.lang.String getShapeCADFileName(int id, int index)
          Must be overridden to return the file name of a non-persistent CAD drawing.
 java.lang.String[] getShapeCADVisibleLayerNames(int id, int index)
          Must be overridden to return the array of visible layer names of a non-persistent CAD drawing.
 java.awt.Color getShapeChartColorFromDouble(int id, int index, double value)
          Should be overridden to convert a double value to Color for a TimeColorChart.
 java.util.ArrayList<java.awt.Color> getShapeChartDataColors(int id, int index)
          Must be overridden to return the list of colors for a chart such as pie, bar, stack, time stack, etc.
 java.util.ArrayList<DataItem> getShapeChartDataItems(int id, int index)
          Must be overridden to return the list of data items for a non-peristent chart like pie, bar, etc.
 java.util.ArrayList<Chart2DPlot.Appearance> getShapeChartDataPlotOptions(int id, int index)
          Must be overridden to return the list of data set plot appearances for a chart such as plot, time plot, etc.
 java.util.ArrayList<DataSet> getShapeChartDataSets(int id, int index)
          Must be overridden to return the list of data sets for a non-peristent chart like plot, time plot, etc.
 java.util.ArrayList<java.lang.String> getShapeChartDataTitles(int id, int index)
          Must be overridden to return the list of titles for a chart such as pie, bar, stack, time stack, etc.
 java.util.ArrayList<Histogram2D.Appearance> getShapeChartHistogram2DOptions(int id, int index)
          Must be overridden to return the list of 2D histogram appearances for a Histogram2D.
 java.util.ArrayList<Histogram.Appearance> getShapeChartHistogramOptions(int id, int index)
          Must be overridden to return the list of histogram appearances for a Histogram.
 java.util.ArrayList<HistogramData> getShapeChartHistograms(int id, int index)
          Must be overridden to return the list of histogram data objects for a Histogram.
 java.util.ArrayList<Histogram2DData> getShapeChartHistograms2D(int id, int index)
          Must be overridden to return the list of histogram 2D data objects for Histogram2D.
 Chart.Properties getShapeChartProperties(int id, int index)
          Must be overridden to return the Properties structure for a non-peristent chart.
 ShapeControl getShapeControl(int id)
          Finds a (not repli8cated) non-persistent control by its id.
 ShapeControl getShapeControl(int id, int index)
          Finds a non-persistent control by its id and index.
 boolean getShapeControlDefaultValueBoolean(int id)
          Returns the boolean value used to initialized a (not replicated) non-persistent control when it is first created or becomes vsisible.
 boolean getShapeControlDefaultValueBoolean(int id, int index)
          Should be overridden to return the boolean value used to initialized a non-persistent control when it is first created or becomes vsisible,
 double getShapeControlDefaultValueDouble(int id)
          Returns the double value used to initialized a (not replicated) non-persistent control when it is first created or becomes vsisible.
 double getShapeControlDefaultValueDouble(int id, int index)
          Should be overridden to return the double value used to initialized a non-persistent control when it is first created or becomes vsisible.
 int getShapeControlDefaultValueInt(int id)
          Returns the integer value used to initialized a (not replicated) non-persistent control when it is first created or becomes vsisible.
 int getShapeControlDefaultValueInt(int id, int index)
          Should be overridden to return the integer value used to initialized a non-persistent control when it is first created or becomes vsisible.
 java.lang.String getShapeControlDefaultValueString(int id)
          Returns the String value used to initialized a (not replicated) non-persistent control when it is first created or becomes vsisible.
 java.lang.String getShapeControlDefaultValueString(int id, int index)
          Should be overridden to return the String value used to initialized a non-persistent control when it is first created or becomes vsisible.
 ShapeControlManager getShapeControlManager()
          Returns the ControlManager of the presentation, if it exists, or null.
 double getShapeControlMaximum(int id)
          Returns the maximum value for a (not replicated) non-persistent control.
 double getShapeControlMaximum(int id, int index)
          Must be overridden to return the maximum value for a non-persistent control.
 double getShapeControlMinimum(int id)
          Returns the minimum value for a (not replicated) non-persistent control.
 double getShapeControlMinimum(int id, int index)
          Must be overridden to return the minimum value for a non-persistent control.
 boolean getShapeControlMultipleSelectionMode(int id)
          Returns true if a (not replicated) non-persistent control (like list box) has multiple-selection ability.
 boolean getShapeControlMultipleSelectionMode(int id, int index)
          Should be overridden to return true if a (not replicated) non-persistent control (like list box) has multiple-selection ability (false otherwise).
 java.lang.String getShapeControlProgressString(int id, double value, int percent)
          Returns the String value used as progress string in a (not replicated) non-persistent progress bar control
 java.lang.String getShapeControlProgressString(int id, int index, double value, int percent)
          Should be overridden to return the String value used as progress string in a non-persistent progress bar control
 java.lang.String[] getShapeControlTexts(int id)
          Returns the array of text items for a (not replicated) non-persistent control (radio button group or a combo box or a list box).
 java.lang.String[] getShapeControlTexts(int id, int index)
          Should be overridden to return the array of text items for a non-persistent control (radio button group or a combo box or a list box).
 java.lang.String[][] getShapeControlTexts2D(int id)
          Should be overridden to return the 2D-array of text items for a non-persistent control (file chooser).
 java.lang.String[][] getShapeControlTexts2D(int id, int index)
          Should be overridden to return the 2D-array of text items for a non-persistent control (file chooser).
 int getShapeControlType(int id)
          Should be overridden to return the type of a non-persistent control (file chooser, combo box).
 int getShapeControlType(int id, int index)
          Should be overridden to return the type of a non-persistent control (file chooser, combo box).
 double getShapeControlValueType(int id)
          Must be overridden to return the value type constant (see ShapeControl.TYPE_* constants) for a (not replicated) non-persistent control supporting several value types: ShapeSlider, ShapeTextField, ShapeComboBox.
 int getShapeControlValueType(int id, int index)
          Must be overridden to return the value type constant (see ShapeControl.TYPE_* constants) for a non-persistent control supporting several value types: ShapeSlider, ShapeTextField, ShapeComboBox.
 java.lang.Object getShapeEmbeddedObject(int id)
          Must be overridden to return the active object (or a List of them in case of replicated embedded object) corresponding to a embedded object shape.
 ActiveObject getShapeEmbeddedObject(int id, int index)
          Returns the active object corresponding to an embedded object shape with the given index.
 java.awt.Color getShapeFillColor(int id)
          Returns the fill color of a (not replicated) non-persistent shape, or text color of a text shape.
 java.awt.Color getShapeFillColor(int id, int index)
          Should be overridden to return the fill color of a shape, or text color of a non-persistent text shape.
 java.awt.Font getShapeFont(int id)
          Returns the font of a (not replicated) non-persistent shape having text.
 java.awt.Font getShapeFont(int id, int index)
          Should be overridden to return the font of a non-persistent shape having text (like text shape or button control).
 int[] getShapeGroupContent(int id)
          Must be overridden to return the array of ids of shapes (persistent and not) included in a non-persistent group.
 double getShapeHeight(int id)
          Returns the height of a (not replicated) non-persistent shape.
 double getShapeHeight(int id, int index)
          Should be overridden to return the height of a non-persistent shape.
 java.lang.String[] getShapeImageFileNames(int id)
          Returns the array of a (not replicated) non-persistent image file names.
 java.lang.String[] getShapeImageFileNames(int id, int index)
          Must be overridden to return the array of file names of a non-persistent image.
 int getShapeImageNumber(int id)
          Returns the number of the image (in a non-persistent image array) to draw, for not replicated images.
 int getShapeImageNumber(int id, int index)
          Should be overridden to return the number of the image (in a non-persistent image array) to draw.
 java.awt.Color getShapeLineColor(int id)
          Returns the line color of a (not replicated) non-persistent shape, or text color of a component.
 java.awt.Color getShapeLineColor(int id, int index)
          Should be overridden to return the line color of a non-persistent shape, or text color of a control.
 double getShapeLineDx(int id)
          Returns the X coordinates of the end point relative to the start point of a (not replicated) non-persistent line shape.
 double getShapeLineDx(int id, int index)
          Should be overridden to return the X coordinates of the end point relative to the start point of a non-persistent line shape.
 double getShapeLineDy(int id)
          Returns the Y coordinates of the end point relative to the start point of a (not replicated) non-persistent line shape.
 double getShapeLineDy(int id, int index)
          Should be overridden to return the Y coordinates of the end point relative to the start point of a non-persistent line shape.
 int getShapeLineStyle(int id)
          Returns the line style of a (not replicated) non-persistent shape: LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED.
 int getShapeLineStyle(int id, int index)
          Should be overridden to return the line style of a non-persistent shape: LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED.
 double getShapeLineWidth(int id)
          Returns the width of a (not replicated) non-persistent shape line. 0 means thinnest possible for the target device.
 double getShapeLineWidth(int id, int index)
          Should be overridden to return the width of a non-persistent shape line. 0 means thinnest possible for the target device.
 int getShapeNPoints(int id)
          Returns the number of points in a (not replicated) non-persistent polyline or a curve.
 int getShapeNPoints(int id, int index)
          Must be overridden to return the number of points in a non-persistent polyline or a curve.
 java.lang.String getShapePackagePrefix(int id)
          Must be overridden to return the package name of original active object where the shape with given id is defined, formatted using '/' characters; with '/' character at the beginning and at the end
 double[] getShapePointsDx(int id)
          Returns the array of X coordinates of a (not replicated) non-persistent polyline or curve points relative to the start point.
 double[] getShapePointsDx(int id, int index)
          Must be overridden to return the array of X coordinates of a non-persistent polyline or curve points relative to the start point.
 double[] getShapePointsDy(int id)
          Returns the array of Y coordinates of a (not replicated) non-persistent polyline or curve points relative to the start point.
 double[] getShapePointsDy(int id, int index)
          Must be overridden to return the array of Y coordinates of a non-persistent polyline or curve points relative to the start point.
 double getShapeRadiusX(int id)
          Returns the X radius of a (not replicated) non-persistent oval or arc shape, or the radius of corners of a rounded rectangle shape.
 double getShapeRadiusX(int id, int index)
          Must be overridden to return the X radius of a non-persistent oval or arc shape, or the radius of corners of a rounded rectangle shape.
 double getShapeRadiusY(int id)
          Returns the Y radius of a (not replicated) non-persistent oval or arc shape.
 double getShapeRadiusY(int id, int index)
          Must be overridden to return the Y radius of a non-persistent oval or arc shape.
 int getShapeReplication(int id)
          Should be overridden to return the number of shapes in a replicated non-persistent shape.
 double getShapeRotation(int id)
          Returns the rotation angle of a (not replicated) non-persistent shape in radians.
 double getShapeRotation(int id, int index)
          Should be overridden to return the rotation angle of a non-persistent shape in radians.
 double getShapeScaleX(int id)
          Returns the X scale of a (not replicated) non-persistent shape.
 double getShapeScaleX(int id, int index)
          Should be overridden to return the X scale of a non-persistent shape.
 double getShapeScaleY(int id)
          Returns the Y scale of a (not replicated) non-persistent shape.
 double getShapeScaleY(int id, int index)
          Should be overridden to return the Y scale of a non-persistent shape.
 java.lang.Object getShapeText(int id)
          Returns the string for a (not replicated) non-persistent shape with text attribute (like text shape or button control).
 java.lang.Object getShapeText(int id, int index)
          Must be overridden to return the string for a non-persistent shape with text attribute (like text shape or button control).
 int getShapeTextAlignment(int id)
          Returns the alighment of a (not replicated) non-persistent text shape.
 int getShapeTextAlignment(int id, int index)
          Should be overridden to return the alighment of a non-persistent text shape, one of LIGNMENT_LEFT (default), ALIGNMENT_CENTER, or ALIGNMENT_RIGHT.
 int getShapeType(int id)
          Must be overridden to return the type of a non-persistent shape.
 double getShapeWidth(int id)
          Returns the width of a (not replicated) non-persistent shape.
 double getShapeWidth(int id, int index)
          Should be overridden to return the width of a non-persistent shape.
 double getShapeX(int id)
          Returns the X coordinate of a (not replicated) non-persistent shape.
 double getShapeX(int id, int index)
          Should be overridden to return the X coordinate of a non-persistent shape.
 double getShapeY(int id)
          Returns the Y coordinate of a (not replicated) non-persistent shape.
 double getShapeY(int id, int index)
          Should be overridden to return the Y coordinate of a non-persistent shape.
 int getViewAreas(java.util.Map<java.lang.String,ViewArea> output)
          Adds all ViewAreas of this presentable to the given map output, if it is not null.
 boolean iconContains(double px, double py)
          Tests if any of the icon shapes contain the point with the coordinates (px,py).
 boolean isShapeCADNegative(int id)
          Deprecated. this method will be removed in the future releases, please override getShapeCADDrawingAttributes(int) instead
 boolean isShapeCADNegative(int id, int index)
          Deprecated. this method will be removed in the future releases, please override getShapeCADDrawingAttributes(int, int) instead
 boolean isShapeClosed(int id)
          Returns true if a (not replicated) non-persistent polyline or curve shape is closed, false otherwise.
 boolean isShapeClosed(int id, int index)
          Should be overridden to return true if a non-persistent polyline or curve shape is closed, false otherwise.
 boolean isShapeControlEnabled(int id)
          Returns true if a (not replicated) non-persistent control is enabled, false otherwise.
 boolean isShapeControlEnabled(int id, int index)
          Should be overridden to return true if a non-persistent control is enabled, false otherwise.
 boolean isShapeControlVertical(int id)
          Returns true if a (not replicated) non-persistent control is layed out vertically, false if horizontally.
 boolean isShapeControlVertical(int id, int index)
          Should be overridden to return true if a non-persistent control is layed out vertically, false if horizontally.
 boolean isShapePublic(int id)
          Should be overridden to return true if a non-persistent shape is visible on its container's presentation, false otherwise.
 boolean isShapeVisible(int id)
          Should be overridden to return true if a non-persistent shape is visible, false otherwise.
 boolean isShapeWithManualControlPoints(int id)
          Should be overridden to return true if a non-persistent curve shape has control points specified manually, false otherwise.
 boolean isShapeWithManualControlPoints(int id, int index)
          Should be overridden to return true if a non-persistent curve shape has control points specified manually, false otherwise.
static boolean modelElementContains(double px, double py, double x, double y)
          Tests if a standard not resizable model element (like variable, parameter, event, port, pseudo state, etc.) contains the point with coordinates (x,y).
static boolean modelElementContains(double px, double py, double x, double y, double width, double height)
          Tests if a resizable model element (like stock variable) contains the point with coordinates (x,y).
 boolean onClickIconAt(double px, double py, boolean publicOnly)
          Tests if any of the icon shapes contain the point with the coordinates (px,py), and, if yes, executes the shape's reaction on click at that point.
 boolean onClickModelAt(Panel panel, double px, double py, int clickCount, boolean publicOnly)
          Should be overridden to test if any of the model elements contain the point with the coordinates (px,py), and, if yes, execute the corresponding action.
 boolean onClickPresentationAt(double px, double py, boolean publicOnly)
          Tests if any of the presentation shapes contain the point with the coordinates (px,py), and, if yes, executes the shape's reaction on click at that point.
 void onItemRemoved(int id, int index, int removedIndex, boolean programmatically)
          Should be overridden to execute the action associated with a non-persistent chart item-removed event.
 void onSelectionChanged(int id, int index, int[] selectedIndices, boolean programmatically)
          Should be overridden to execute the action associated with a non-persistent chart item-selection-changed event.
 boolean onShapeClick(int id, int index, double clickx, double clicky)
          Should be overridden to define reaction on mouse click on a non-persistent shape.
 boolean onShapeClickAt(int id, double px, double py, boolean publicOnly)
          Tests if a (possibly, replicated) non-persistent shape contains the point with the coordinates (px,py), and, if yes, executes the shape's reaction on click at that point.
 void onShapeGroupDraw(int id, int index, Panel panel, java.awt.Graphics2D g)
          Should be overridden to do custom drawing after the (non-persistent) group contents has been drawn.
 boolean presentationContains(double px, double py)
          Tests if any of the presentation shapes contain the point with the coordinates (px,py).
 void readCustomData(java.io.ObjectInputStream in)
          This method may be overridden to perform custom data reading when loading model snapshot
 void setControlValueToDefault(int id)
          Sets a non-replicated non-persistent control value to what was provided as the default one.
 void setControlValueToDefault(int id, int index)
          Sets a non-persistent control value to what was provided as the default one.
 void writeCustomData(java.io.ObjectOutputStream out)
          This method may be overridden to perform custom data writing when saving model snapshot
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHAPE_GROUP

public static final int SHAPE_GROUP
See Also:
Constant Field Values

SHAPE_PIXEL

public static final int SHAPE_PIXEL
See Also:
Constant Field Values

SHAPE_LINE

public static final int SHAPE_LINE
See Also:
Constant Field Values

SHAPE_POLYLINE

public static final int SHAPE_POLYLINE
See Also:
Constant Field Values

SHAPE_CURVE

public static final int SHAPE_CURVE
See Also:
Constant Field Values

SHAPE_ARC

public static final int SHAPE_ARC
See Also:
Constant Field Values

SHAPE_RECTANGLE

public static final int SHAPE_RECTANGLE
See Also:
Constant Field Values

SHAPE_ROUNDED_RECTANGLE

public static final int SHAPE_ROUNDED_RECTANGLE
See Also:
Constant Field Values

SHAPE_OVAL

public static final int SHAPE_OVAL
See Also:
Constant Field Values

SHAPE_TEXT

public static final int SHAPE_TEXT
See Also:
Constant Field Values

SHAPE_IMAGE

public static final int SHAPE_IMAGE
See Also:
Constant Field Values

SHAPE_CAD

public static final int SHAPE_CAD
See Also:
Constant Field Values

SHAPE_BUTTON

public static final int SHAPE_BUTTON
See Also:
Constant Field Values

SHAPE_CHECKBOX

public static final int SHAPE_CHECKBOX
See Also:
Constant Field Values

SHAPE_RADIOBUTTONS

public static final int SHAPE_RADIOBUTTONS
See Also:
Constant Field Values

SHAPE_SLIDER

public static final int SHAPE_SLIDER
See Also:
Constant Field Values

SHAPE_TEXTFIELD

public static final int SHAPE_TEXTFIELD
See Also:
Constant Field Values

SHAPE_COMBOBOX

public static final int SHAPE_COMBOBOX
See Also:
Constant Field Values

SHAPE_EMBEDDED_OBJECT

public static final int SHAPE_EMBEDDED_OBJECT
See Also:
Constant Field Values

SHAPE_CHART_STACK

public static final int SHAPE_CHART_STACK
See Also:
Constant Field Values

SHAPE_CHART_PIE

public static final int SHAPE_CHART_PIE
See Also:
Constant Field Values

SHAPE_CHART_BAR

public static final int SHAPE_CHART_BAR
See Also:
Constant Field Values

SHAPE_CHART_PLOT

public static final int SHAPE_CHART_PLOT
See Also:
Constant Field Values

SHAPE_CHART_TIME_PLOT

public static final int SHAPE_CHART_TIME_PLOT
See Also:
Constant Field Values

SHAPE_CHART_TIME_STACK

public static final int SHAPE_CHART_TIME_STACK
See Also:
Constant Field Values

SHAPE_CHART_TIME_COLOR

public static final int SHAPE_CHART_TIME_COLOR
See Also:
Constant Field Values

SHAPE_CHART_HISTOGRAM

public static final int SHAPE_CHART_HISTOGRAM
See Also:
Constant Field Values

SHAPE_CHART_HISTOGRAM2D

public static final int SHAPE_CHART_HISTOGRAM2D
See Also:
Constant Field Values

SHAPE_LISTBOX

public static final int SHAPE_LISTBOX
See Also:
Constant Field Values

SHAPE_FILECHOOSER

public static final int SHAPE_FILECHOOSER
See Also:
Constant Field Values

SHAPE_PROGRESSBAR

public static final int SHAPE_PROGRESSBAR
See Also:
Constant Field Values

NAVIGATION_NONE

public static final int NAVIGATION_NONE
3D Window navigation mode constant.
Navigation is prohibited.
Default when window is linked with camera.

See Also:
ShapeWindow3D.setNavigationMode(int), Constant Field Values

NAVIGATION_FULL

public static final int NAVIGATION_FULL
3D Window navigation mode constant.
Navigation is fully allowed

See Also:
ShapeWindow3D.setNavigationMode(int), Constant Field Values

NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO

public static final int NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO
3D Window navigation mode constant.
Navigation is only allowed above Z=0 plane

See Also:
ShapeWindow3D.setNavigationMode(int), Constant Field Values

NAVIGATION_ROTATION_ONLY

public static final int NAVIGATION_ROTATION_ONLY
3D Window navigation mode constant.
Navigation mode where user is able to rotate view only.
Can be used when window is linked with camera.

See Also:
ShapeWindow3D.setNavigationMode(int), Constant Field Values

LINE_STYLE_SOLID

public static final int LINE_STYLE_SOLID
See Also:
Constant Field Values

LINE_STYLE_DOTTED

public static final int LINE_STYLE_DOTTED
See Also:
Constant Field Values

LINE_STYLE_DASHED

public static final int LINE_STYLE_DASHED
See Also:
Constant Field Values

ALIGNMENT_LEFT

public static final int ALIGNMENT_LEFT
Text alignment type constant

See Also:
Constant Field Values

ALIGNMENT_CENTER

public static final int ALIGNMENT_CENTER
Text alignment type constant

See Also:
Constant Field Values

ALIGNMENT_RIGHT

public static final int ALIGNMENT_RIGHT
Text alignment type constant

See Also:
Constant Field Values

CAD_INVERTED

public static final int CAD_INVERTED
Attribute of CAD indicating that CAD should be drawn in inverted colors.
Doesn't affect appearance of layers with custom colors (where customLayerColors[i] != null)

See Also:
getShapeCADDrawingAttributes(int, int), ShapeCAD.ShapeCAD(Presentable, boolean, double, double, double, double, String, String, int, Color, String[], Color[], int), Constant Field Values

CAD_ANTIALIASING

public static final int CAD_ANTIALIASING
Attribute of CAD indicating that CAD should be drawn using antialiasing.
By default antialiasing is turned off for CADs.

See Also:
getShapeCADDrawingAttributes(int, int), ShapeCAD.ShapeCAD(Presentable, boolean, double, double, double, double, String, String, int, Color, String[], Color[], int), Constant Field Values
Constructor Detail

Presentable

public Presentable()
Method Detail

getEngine

public abstract Engine getEngine()
Returns the simulation engine.

Returns:
the simulation engine

getPresentation

public abstract Presentation getPresentation()
Returns the presentation object of the model, or null if there is none.

Returns:
the presentation object of the model, or null

getExperiment

public Experiment<?> getExperiment()
Returns the experiment controlling the model execution.

Returns:
the experiment controlling the model execution

getPersistentShape

public java.lang.Object getPersistentShape(int id)
Should be overridden to return the Shape / ReplicatedShape if the id corresponds to a persistent shape, or null if it corresponds to a non-persistent shape.

Parameters:
id - the shape id
Returns:
the persistent shape, or null

getNameOfShape

public java.lang.String getNameOfShape(int id)
Must be overridden to return the name of a non-persistent shape.

Parameters:
id - the shape id
Returns:
the shape name

getShapeType

public int getShapeType(int id)
Must be overridden to return the type of a non-persistent shape.

Parameters:
id - the shape id
Returns:
the type of the shape

getShapeReplication

public int getShapeReplication(int id)
Should be overridden to return the number of shapes in a replicated non-persistent shape. By default returns 1, which means shape is not replicated.

Parameters:
id - the shape id
Returns:
the number of shapes in a replicated shape

getShapeGroupContent

public int[] getShapeGroupContent(int id)
Must be overridden to return the array of ids of shapes (persistent and not) included in a non-persistent group. The id = 0 is reserved for the top-level group.

Parameters:
id - the non-persistent group id
Returns:
the array of integer ids in the order of drawing (back to front)

getShapeEmbeddedObject

public java.lang.Object getShapeEmbeddedObject(int id)
Must be overridden to return the active object (or a List of them in case of replicated embedded object) corresponding to a embedded object shape.

Parameters:
id - the shape id
Returns:
embedded object or a list, null by default

getShapeEmbeddedObject

public final ActiveObject getShapeEmbeddedObject(int id,
                                                 int index)
Returns the active object corresponding to an embedded object shape with the given index. Index is ignored for non-replicated objects.

Parameters:
id - the shape id
index - the embedded object index (for replicated objects)
Returns:
the active object corresponding to an embedded object shape with the given index

isShapeVisible

public boolean isShapeVisible(int id)
Should be overridden to return true if a non-persistent shape is visible, false otherwise. Note that in case of replicated shape this property applies to the whole array and cannot be specified on per-instance basis. If the shape is not visible none of its other properties are evaluated.

Parameters:
id - the shape id
Returns:
the visibility status of the shape, true by default

isShapePublic

public boolean isShapePublic(int id)
Should be overridden to return true if a non-persistent shape is visible on its container's presentation, false otherwise. Note that in case of replicated shape this property applies to the ALL items and cannot be specified on per-item basis.

Parameters:
id - the shape id
Returns:
the visibility status on its container's presentation

getShapeX

public double getShapeX(int id,
                        int index)
Should be overridden to return the X coordinate of a non-persistent shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the X coordinate of the shape, 0 by default

getShapeX

public final double getShapeX(int id)
Returns the X coordinate of a (not replicated) non-persistent shape.

Parameters:
id - the shape id
Returns:
the X coordinate of the shape

getShapeY

public double getShapeY(int id,
                        int index)
Should be overridden to return the Y coordinate of a non-persistent shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the Y coordinate of the shape, 0 by default

getShapeY

public final double getShapeY(int id)
Returns the Y coordinate of a (not replicated) non-persistent shape.

Parameters:
id - the shape id
Returns:
the Y coordinate of the shape

getShapeRotation

public double getShapeRotation(int id,
                               int index)
Should be overridden to return the rotation angle of a non-persistent shape in radians.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the rotation angle of the shape in radians, 0 by default

getShapeRotation

public final double getShapeRotation(int id)
Returns the rotation angle of a (not replicated) non-persistent shape in radians.

Parameters:
id - the shape id
Returns:
the rotation angle of the shape in radians, 0 by default

getShapeScaleX

public double getShapeScaleX(int id,
                             int index)
Should be overridden to return the X scale of a non-persistent shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the X scale of the shape, 1 by default

getShapeScaleX

public final double getShapeScaleX(int id)
Returns the X scale of a (not replicated) non-persistent shape.

Parameters:
id - the shape id
Returns:
the X scale of the shape, 1 by default

getShapeScaleY

public double getShapeScaleY(int id,
                             int index)
Should be overridden to return the Y scale of a non-persistent shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the Y scale of the shape, 1 by default

getShapeScaleY

public final double getShapeScaleY(int id)
Returns the Y scale of a (not replicated) non-persistent shape.

Parameters:
id - the shape id
Returns:
the Y scale of the shape, 1 by default

getShapeFillColor

public java.awt.Color getShapeFillColor(int id,
                                        int index)
Should be overridden to return the fill color of a shape, or text color of a non-persistent text shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the fill color of the shape, or text color of a text shape, null by default

getShapeFillColor

public final java.awt.Color getShapeFillColor(int id)
Returns the fill color of a (not replicated) non-persistent shape, or text color of a text shape.

Parameters:
id - the shape id
Returns:
the fill color of the shape or text color of a text shape, null by default

getShapeLineColor

public java.awt.Color getShapeLineColor(int id,
                                        int index)
Should be overridden to return the line color of a non-persistent shape, or text color of a control.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the fill color of the shape or text color of a component, BLACK by default

getShapeLineColor

public final java.awt.Color getShapeLineColor(int id)
Returns the line color of a (not replicated) non-persistent shape, or text color of a component.

Parameters:
id - the shape id
Returns:
the line color of the shape or text color of a component, BLACK by default

getShapeLineWidth

public double getShapeLineWidth(int id,
                                int index)
Should be overridden to return the width of a non-persistent shape line. 0 means thinnest possible for the target device.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the line width of the shape, 1 by default

getShapeLineWidth

public final double getShapeLineWidth(int id)
Returns the width of a (not replicated) non-persistent shape line. 0 means thinnest possible for the target device.

Parameters:
id - the shape id
Returns:
the line width of the shape

getShapeLineStyle

public int getShapeLineStyle(int id,
                             int index)
Should be overridden to return the line style of a non-persistent shape: LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the line style of the shape, LINE_STYLE_SOLID by default

getShapeLineStyle

public final int getShapeLineStyle(int id)
Returns the line style of a (not replicated) non-persistent shape: LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED.

Parameters:
id - the shape
Returns:
the line style of the shape

getShapeLineDx

public double getShapeLineDx(int id,
                             int index)
Should be overridden to return the X coordinates of the end point relative to the start point of a non-persistent line shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the X coordinate of the line end point relative to the start point

getShapeLineDx

public final double getShapeLineDx(int id)
Returns the X coordinates of the end point relative to the start point of a (not replicated) non-persistent line shape.

Parameters:
id - the shape
Returns:
the X coordinate of the line end point relative to the start point

getShapeLineDy

public double getShapeLineDy(int id,
                             int index)
Should be overridden to return the Y coordinates of the end point relative to the start point of a non-persistent line shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the Y coordinate of the line end point relative to the start point

getShapeLineDy

public final double getShapeLineDy(int id)
Returns the Y coordinates of the end point relative to the start point of a (not replicated) non-persistent line shape.

Parameters:
id - the shape
Returns:
the X coordinate of the line end point relative to the start point

getShapeWidth

public double getShapeWidth(int id,
                            int index)
Should be overridden to return the width of a non-persistent shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the width of the shape, 200 by default

getShapeWidth

public final double getShapeWidth(int id)
Returns the width of a (not replicated) non-persistent shape.

Parameters:
id - the shape id
Returns:
the width of the shape

getShapeHeight

public double getShapeHeight(int id,
                             int index)
Should be overridden to return the height of a non-persistent shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the height of the shape, 100 by defalt

getShapeHeight

public final double getShapeHeight(int id)
Returns the height of a (not replicated) non-persistent shape.

Parameters:
id - the shape id
Returns:
the height of the shape

getShapeRadiusX

public double getShapeRadiusX(int id,
                              int index)
Must be overridden to return the X radius of a non-persistent oval or arc shape, or the radius of corners of a rounded rectangle shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the X radius of the shape

getShapeRadiusX

public final double getShapeRadiusX(int id)
Returns the X radius of a (not replicated) non-persistent oval or arc shape, or the radius of corners of a rounded rectangle shape.

Parameters:
id - the shape id
Returns:
the X radius of the shape

getShapeRadiusY

public double getShapeRadiusY(int id,
                              int index)
Must be overridden to return the Y radius of a non-persistent oval or arc shape.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the Y radius of the shape

getShapeRadiusY

public final double getShapeRadiusY(int id)
Returns the Y radius of a (not replicated) non-persistent oval or arc shape.

Parameters:
id - the shape id
Returns:
the Y radius of the shape

getShapeArcStartAngle

public double getShapeArcStartAngle(int id,
                                    int index)
Should be overridden to return the starting angle of a non-persistent shape in radians, 0 being the 12 o'clock, clockwise.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the starting angle of the arc shape, 0 (12 o'clock) by default

getShapeArcStartAngle

public final double getShapeArcStartAngle(int id)
Returns the starting angle of a (not replicated) non-persistent shape in radians, 0 being the 12 o'clock, clockwise.

Parameters:
id - the shape id
Returns:
the starting angle of the arc shape, 0 (12 o'clock) by default

getShapeArcAngle

public double getShapeArcAngle(int id,
                               int index)
Must be overridden to return the angular extent of a non-persistent arc shape in radians, clockwise.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the angular extent of the arc shape in radians

getShapeArcAngle

public final double getShapeArcAngle(int id)
Returns the angular extent of a (not replicated) non-persistent arc shape in radians, clockwise.

Parameters:
id - the shape id
Returns:
the angular extent of the arc shape in radians

getShapeNPoints

public int getShapeNPoints(int id,
                           int index)
Must be overridden to return the number of points in a non-persistent polyline or a curve.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
number of points in the polyline or curve

getShapeNPoints

public final int getShapeNPoints(int id)
Returns the number of points in a (not replicated) non-persistent polyline or a curve.

Parameters:
id - the shape id
Returns:
number of points in the polyline or curve

getShapePointsDx

public double[] getShapePointsDx(int id,
                                 int index)
Must be overridden to return the array of X coordinates of a non-persistent polyline or curve points relative to the start point. The first value must be 0 of course. In case the shape is completely static, the array can be generated as a static final array, otherwise it should be dynamically created (or just filled if the number of points is static).

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
array of shape points X coordinates relative to the start point

getShapePointsDx

public final double[] getShapePointsDx(int id)
Returns the array of X coordinates of a (not replicated) non-persistent polyline or curve points relative to the start point.

Parameters:
id - the shape id
Returns:
array of shape points X coordinates relative to the start point

getShapePointsDy

public double[] getShapePointsDy(int id,
                                 int index)
Must be overridden to return the array of Y coordinates of a non-persistent polyline or curve points relative to the start point. The first value must be 0 of course. In case the shape is completely static, the array can be generated as a static final array, otherwise it should be dynamically created (or just filled if the number of points is static).

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
array of shape points Y coordinates relative to the start point

getShapePointsDy

public final double[] getShapePointsDy(int id)
Returns the array of Y coordinates of a (not replicated) non-persistent polyline or curve points relative to the start point.

Parameters:
id - the shape id
Returns:
array of shape points Y coordinates relative to the start point

isShapeClosed

public boolean isShapeClosed(int id,
                             int index)
Should be overridden to return true if a non-persistent polyline or curve shape is closed, false otherwise.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the closed/open status of the shape, false (open) by default

isShapeClosed

public final boolean isShapeClosed(int id)
Returns true if a (not replicated) non-persistent polyline or curve shape is closed, false otherwise.

Parameters:
id - the shape id
Returns:
the closed/open status of the shape, false (open) by default

isShapeWithManualControlPoints

public boolean isShapeWithManualControlPoints(int id,
                                              int index)
Should be overridden to return true if a non-persistent curve shape has control points specified manually, false otherwise.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the manual control points mode of the shape, false (automatic control points) by default

isShapeWithManualControlPoints

public final boolean isShapeWithManualControlPoints(int id)
Should be overridden to return true if a non-persistent curve shape has control points specified manually, false otherwise.

Parameters:
id - the shape id
Returns:
the manual control points mode of the shape, false (automatic control points) by default

getShapeText

public java.lang.Object getShapeText(int id,
                                     int index)
Must be overridden to return the string for a non-persistent shape with text attribute (like text shape or button control).

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the string associated with the shape

getShapeText

public final java.lang.Object getShapeText(int id)
Returns the string for a (not replicated) non-persistent shape with text attribute (like text shape or button control).

Parameters:
id - the shape id
Returns:
the string associated with the shape

getShapeFont

public java.awt.Font getShapeFont(int id,
                                  int index)
Should be overridden to return the font of a non-persistent shape having text (like text shape or button control). If the font specified by the user is static, the corresponding Font object can be made static in the subclass and then returned each time.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the font of the shape's text, default AnyLogic font by default

getShapeFont

public final java.awt.Font getShapeFont(int id)
Returns the font of a (not replicated) non-persistent shape having text.

Parameters:
id - the shape id
Returns:
the font of the shape's text, default AnyLogic font by default

getShapeTextAlignment

public int getShapeTextAlignment(int id,
                                 int index)
Should be overridden to return the alighment of a non-persistent text shape, one of LIGNMENT_LEFT (default), ALIGNMENT_CENTER, or ALIGNMENT_RIGHT.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the alighment of a shape

getShapeTextAlignment

public final int getShapeTextAlignment(int id)
Returns the alighment of a (not replicated) non-persistent text shape.

Parameters:
id - the shape id
Returns:
the alighment of a shape

getShapePackagePrefix

public java.lang.String getShapePackagePrefix(int id)
Must be overridden to return the package name of original active object where the shape with given id is defined, formatted using '/' characters; with '/' character at the beginning and at the end

Parameters:
id - the shape id
Returns:
the package name of original active object where the shape with given id is defined, formatted using '/' characters; with '/' character at the beginning and at the end

getShapeImageFileNames

public java.lang.String[] getShapeImageFileNames(int id,
                                                 int index)
Must be overridden to return the array of file names of a non-persistent image.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the array of image file names

getShapeImageFileNames

public final java.lang.String[] getShapeImageFileNames(int id)
Returns the array of a (not replicated) non-persistent image file names.

Parameters:
id - the shape id
Returns:
the array of image file names

getShapeCADFileName

public java.lang.String getShapeCADFileName(int id,
                                            int index)
Must be overridden to return the file name of a non-persistent CAD drawing.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the CAD drawing file name

getShapeCADVisibleLayerNames

public java.lang.String[] getShapeCADVisibleLayerNames(int id,
                                                       int index)
Must be overridden to return the array of visible layer names of a non-persistent CAD drawing.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the array of names of visible CAD layers

getShapeCADCustomLayerColors

public java.awt.Color[] getShapeCADCustomLayerColors(int id,
                                                     int index)
Must be overridden to return the array of custom layer colors of a non-persistent CAD drawing.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the array of custom colors of visible CAD layers

getShapeCADFileName

public final java.lang.String getShapeCADFileName(int id)
Returns the file name of a (not replicated) non-persistent CAD drawing.

Parameters:
id - the shape id
Returns:
the CAD drawing file name

isShapeCADNegative

@Deprecated
public boolean isShapeCADNegative(int id,
                                             int index)
Deprecated. this method will be removed in the future releases, please override getShapeCADDrawingAttributes(int, int) instead


isShapeCADNegative

@Deprecated
public boolean isShapeCADNegative(int id)
Deprecated. this method will be removed in the future releases, please override getShapeCADDrawingAttributes(int) instead


getShapeCADDrawingAttributes

public int getShapeCADDrawingAttributes(int id,
                                        int index)
Must be overridden to return the drawing attributes for non-persistent CAD shapes.
Returned value should be zero or an "OR" combination of CAD_* constants, e.g. CAD_NEGATIVE | CAD_ANTIALIASING.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the drawing attributes for the cad

getShapeCADDrawingAttributes

public int getShapeCADDrawingAttributes(int id)
Must be overridden to return the drawing attributes for non-persistent CAD shapes.
Returned value should be zero or an "OR" combination of CAD_* constants, e.g. CAD_NEGATIVE | CAD_ANTIALIASING.

Parameters:
id - the shape id
Returns:
the drawing attributes for the cad

getShapeImageNumber

public int getShapeImageNumber(int id,
                               int index)
Should be overridden to return the number of the image (in a non-persistent image array) to draw.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
Returns:
the number of the image, 0 by default

getShapeImageNumber

public final int getShapeImageNumber(int id)
Returns the number of the image (in a non-persistent image array) to draw, for not replicated images.

Parameters:
id - the shape id
Returns:
the number of the image, 0 by default

isShapeControlEnabled

public boolean isShapeControlEnabled(int id,
                                     int index)
Should be overridden to return true if a non-persistent control is enabled, false otherwise. Default is enabled.

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
true if the component is enabled, false otherwise

isShapeControlEnabled

public final boolean isShapeControlEnabled(int id)
Returns true if a (not replicated) non-persistent control is enabled, false otherwise. Default is enabled.

Parameters:
id - the control id
Returns:
true if the component is enabled, false otherwise

getShapeControlValueType

public int getShapeControlValueType(int id,
                                    int index)
Must be overridden to return the value type constant (see ShapeControl.TYPE_* constants) for a non-persistent control supporting several value types: ShapeSlider, ShapeTextField, ShapeComboBox.

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the value type constant for a component

getShapeControlValueType

public final double getShapeControlValueType(int id)
Must be overridden to return the value type constant (see ShapeControl.TYPE_* constants) for a (not replicated) non-persistent control supporting several value types: ShapeSlider, ShapeTextField, ShapeComboBox.

Parameters:
id - the control id
Returns:
the value type constant for a component

getShapeControlMinimum

public double getShapeControlMinimum(int id,
                                     int index)
Must be overridden to return the minimum value for a non-persistent control.

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the minimum value for a component

getShapeControlMinimum

public final double getShapeControlMinimum(int id)
Returns the minimum value for a (not replicated) non-persistent control.

Parameters:
id - the control id
Returns:
the minimum value for a component

getShapeControlMaximum

public double getShapeControlMaximum(int id,
                                     int index)
Must be overridden to return the maximum value for a non-persistent control.

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the maximum value for a component

getShapeControlMaximum

public final double getShapeControlMaximum(int id)
Returns the maximum value for a (not replicated) non-persistent control.

Parameters:
id - the control id
Returns:
the maximum value for a component

isShapeControlVertical

public boolean isShapeControlVertical(int id,
                                      int index)
Should be overridden to return true if a non-persistent control is layed out vertically, false if horizontally. Default is horizontally.

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
true if the component is vertical, false otherwise

isShapeControlVertical

public final boolean isShapeControlVertical(int id)
Returns true if a (not replicated) non-persistent control is layed out vertically, false if horizontally.

Parameters:
id - the control id
Returns:
true if the component is vertical, false otherwise

getShapeControlTexts

public java.lang.String[] getShapeControlTexts(int id,
                                               int index)
Should be overridden to return the array of text items for a non-persistent control (radio button group or a combo box or a list box).

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the array of text items for the component

getShapeControlTexts

public final java.lang.String[] getShapeControlTexts(int id)
Returns the array of text items for a (not replicated) non-persistent control (radio button group or a combo box or a list box).

Parameters:
id - the control id
Returns:
the array of text items for the component

getShapeControlTexts2D

public java.lang.String[][] getShapeControlTexts2D(int id,
                                                   int index)
Should be overridden to return the 2D-array of text items for a non-persistent control (file chooser).

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the 2D-array of text items for the component

getShapeControlTexts2D

public final java.lang.String[][] getShapeControlTexts2D(int id)
Should be overridden to return the 2D-array of text items for a non-persistent control (file chooser).

Parameters:
id - the control id
Returns:
the 2D-array of text items for the component

getShapeControlType

public int getShapeControlType(int id,
                               int index)
Should be overridden to return the type of a non-persistent control (file chooser, combo box).

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the type of component (some custom kind of control's behavior)

getShapeControlType

public final int getShapeControlType(int id)
Should be overridden to return the type of a non-persistent control (file chooser, combo box).

Parameters:
id - the control id
Returns:
the type of component (some custom kind of control's behavior)

getShapeControlMultipleSelectionMode

public boolean getShapeControlMultipleSelectionMode(int id,
                                                    int index)
Should be overridden to return true if a (not replicated) non-persistent control (like list box) has multiple-selection ability (false otherwise).

Parameters:
id - the control id
index - of the component (for replicated components)
Returns:
true if a (not replicated) non-persistent control has multiple-selection ability

getShapeControlMultipleSelectionMode

public final boolean getShapeControlMultipleSelectionMode(int id)
Returns true if a (not replicated) non-persistent control (like list box) has multiple-selection ability.

Parameters:
id - the control id
Returns:
true if a (not replicated) non-persistent control has multiple-selection ability

getShapeControlDefaultValueBoolean

public boolean getShapeControlDefaultValueBoolean(int id,
                                                  int index)
Should be overridden to return the boolean value used to initialized a non-persistent control when it is first created or becomes vsisible,

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the component default value, false by default

getShapeControlDefaultValueBoolean

public final boolean getShapeControlDefaultValueBoolean(int id)
Returns the boolean value used to initialized a (not replicated) non-persistent control when it is first created or becomes vsisible.

Parameters:
id - the control id
Returns:
the component default value

getShapeControlDefaultValueInt

public int getShapeControlDefaultValueInt(int id,
                                          int index)
Should be overridden to return the integer value used to initialized a non-persistent control when it is first created or becomes vsisible.

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the component default value, 0 by default

getShapeControlDefaultValueInt

public final int getShapeControlDefaultValueInt(int id)
Returns the integer value used to initialized a (not replicated) non-persistent control when it is first created or becomes vsisible.

Parameters:
id - the control id
Returns:
the component default value

getShapeControlDefaultValueDouble

public double getShapeControlDefaultValueDouble(int id,
                                                int index)
Should be overridden to return the double value used to initialized a non-persistent control when it is first created or becomes vsisible.

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the component default value, 0 by default

getShapeControlDefaultValueDouble

public final double getShapeControlDefaultValueDouble(int id)
Returns the double value used to initialized a (not replicated) non-persistent control when it is first created or becomes vsisible.

Parameters:
id - the control id
Returns:
the component default value

getShapeControlDefaultValueString

public java.lang.String getShapeControlDefaultValueString(int id,
                                                          int index)
Should be overridden to return the String value used to initialized a non-persistent control when it is first created or becomes vsisible.

Parameters:
id - the control id
index - index of the component (for replicated components)
Returns:
the component default value, null by default

getShapeControlDefaultValueString

public final java.lang.String getShapeControlDefaultValueString(int id)
Returns the String value used to initialized a (not replicated) non-persistent control when it is first created or becomes vsisible.

Parameters:
id - the control id
Returns:
the component default value

getShapeControlProgressString

public java.lang.String getShapeControlProgressString(int id,
                                                      int index,
                                                      double value,
                                                      int percent)
Should be overridden to return the String value used as progress string in a non-persistent progress bar control

Parameters:
id - the control id
index - index of the component (for replicated components)
value - the current value of progress bar
percent - the current percent value of progress bar (integer number, 0..100)
Returns:
the component default value, null by default

getShapeControlProgressString

public final java.lang.String getShapeControlProgressString(int id,
                                                            double value,
                                                            int percent)
Returns the String value used as progress string in a (not replicated) non-persistent progress bar control

Parameters:
id - the control id
value - the current value of progress bar
percent - the current percent value of progress bar (integer number, 0..100)
Returns:
the component default value

executeShapeControlAction

public void executeShapeControlAction(int id,
                                      int index)
Should be overridden to execute the action associated with a non-persistent control that has no value information (like button). Does nothing by default.

Parameters:
id - the control id
index - index of the component (for replicated components)

executeShapeControlAction

public void executeShapeControlAction(int id,
                                      int index,
                                      boolean value)
Should be overridden to execute the action associated with a non-persistent control that has a boolean value (like checkbox). Does nothing by default.

Parameters:
id - the control id
index - index of the component (for replicated components)
value - the value of the component

executeShapeControlAction

public void executeShapeControlAction(int id,
                                      int index,
                                      int value)
Should be overridden to execute the action associated with a non-persistent control that has an integer value (like radio button group or list). Does nothing by default.

Parameters:
id - the control id
index - index of the component (for replicated components)
value - the value of the component

executeShapeControlAction

public void executeShapeControlAction(int id,
                                      int index,
                                      double value)
Should be overridden to execute the action associated with a non-persistent control that has a double value (like slider). Does nothing by default.

Parameters:
id - the control id
index - index of the component (for replicated components)
value - the value of the component

executeShapeControlAction

public void executeShapeControlAction(int id,
                                      int index,
                                      java.lang.String value)
Should be overridden to execute the action associated with a non-persistent control that has a String value (like text field). Does nothing by default.

Parameters:
id - the control id
index - index of the component (for replicated components)
value - the value of the component

executeShapeControlAction

public void executeShapeControlAction(int id,
                                      int index,
                                      java.lang.String value,
                                      java.lang.String[] values)
Should be overridden to execute the action associated with a non-persistent control that has a one or more String values (like list box). Does nothing by default.

Parameters:
id - the control id
index - index of the component (for replicated components)
value - the value of the component (the first value in component has several values)
values - the values of the component

onSelectionChanged

public void onSelectionChanged(int id,
                               int index,
                               int[] selectedIndices,
                               boolean programmatically)
Should be overridden to execute the action associated with a non-persistent chart item-selection-changed event. Does nothing by default.

Parameters:
id - the chart id
index - index of the component (for replicated components)
selectedIndices - the array of currently selected indices (never null; may be empty)
programmatically - this parameter is always false for non-persistent charts
(designed for uniformity with persistent charts code generation, where it defines either selection was changed programmatically (via Chart.selectItem(int, boolean) and Chart.setSelectedItemIndices(int[])) or by user mouse-click)

onItemRemoved

public void onItemRemoved(int id,
                          int index,
                          int removedIndex,
                          boolean programmatically)
Should be overridden to execute the action associated with a non-persistent chart item-removed event. Does nothing by default.

Parameters:
id - the chart id
index - index of the component (for replicated components)
removedIndex - the index of removed chart item
programmatically - this parameter is always false for non-persistent charts
(designed for uniformity with persistent charts code generation, where it defines either chart item was removed programmatically (via Chart.remove(ChartItem), Chart.remove(int) or Chart.removeAll()) or by user choice in the chart legend context menu)

getShapeChartProperties

public Chart.Properties getShapeChartProperties(int id,
                                                int index)
Must be overridden to return the Properties structure for a non-peristent chart.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the Properties structure for a non-peristent chart

getShapeChartDataItems

public java.util.ArrayList<DataItem> getShapeChartDataItems(int id,
                                                            int index)
Must be overridden to return the list of data items for a non-peristent chart like pie, bar, etc.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of data items

getShapeChartDataSets

public java.util.ArrayList<DataSet> getShapeChartDataSets(int id,
                                                          int index)
Must be overridden to return the list of data sets for a non-peristent chart like plot, time plot, etc.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of data sets

getShapeChartHistograms

public java.util.ArrayList<HistogramData> getShapeChartHistograms(int id,
                                                                  int index)
Must be overridden to return the list of histogram data objects for a Histogram.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of HistogramData objects

getShapeChartHistograms2D

public java.util.ArrayList<Histogram2DData> getShapeChartHistograms2D(int id,
                                                                      int index)
Must be overridden to return the list of histogram 2D data objects for Histogram2D.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of 2D histograms

getShapeChartDataTitles

public java.util.ArrayList<java.lang.String> getShapeChartDataTitles(int id,
                                                                     int index)
Must be overridden to return the list of titles for a chart such as pie, bar, stack, time stack, etc.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of titles

getShapeChartDataColors

public java.util.ArrayList<java.awt.Color> getShapeChartDataColors(int id,
                                                                   int index)
Must be overridden to return the list of colors for a chart such as pie, bar, stack, time stack, etc.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of colors

getShapeChartDataPlotOptions

public java.util.ArrayList<Chart2DPlot.Appearance> getShapeChartDataPlotOptions(int id,
                                                                                int index)
Must be overridden to return the list of data set plot appearances for a chart such as plot, time plot, etc.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of data set plot appearances

getShapeChartColorFromDouble

public java.awt.Color getShapeChartColorFromDouble(int id,
                                                   int index,
                                                   double value)
Should be overridden to convert a double value to Color for a TimeColorChart. By default negative values are RED, non-negative - BLUE.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
value - the value
Returns:
the color corresponding to value

getShapeChartHistogramOptions

public java.util.ArrayList<Histogram.Appearance> getShapeChartHistogramOptions(int id,
                                                                               int index)
Must be overridden to return the list of histogram appearances for a Histogram.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of histogram appearances

getShapeChartHistogram2DOptions

public java.util.ArrayList<Histogram2D.Appearance> getShapeChartHistogram2DOptions(int id,
                                                                                   int index)
Must be overridden to return the list of 2D histogram appearances for a Histogram2D.

Parameters:
id - the chart id
index - index of the chart (for replicated charts)
Returns:
the the list of 2D histogram appearances

getShapeControlManager

public ShapeControlManager getShapeControlManager()
Returns the ControlManager of the presentation, if it exists, or null.

Returns:
the ControlManager of the presentation, if it exists, or null

getShapeControl

public ShapeControl getShapeControl(int id,
                                    int index)
Finds a non-persistent control by its id and index. If the control currently does not exist, return null.

Parameters:
id - the control id
index - index of the control (for replicated controls)
Returns:
a non-persistent control, or null

getShapeControl

public ShapeControl getShapeControl(int id)
Finds a (not repli8cated) non-persistent control by its id. If the control currently does not exist, return null.

Parameters:
id - the control id
Returns:
a non-persistent control, or null

setControlValueToDefault

public void setControlValueToDefault(int id,
                                     int index)
Sets a non-persistent control value to what was provided as the default one.

Parameters:
id - the control id
index - index of the control (for replicated controls)

setControlValueToDefault

public void setControlValueToDefault(int id)
Sets a non-replicated non-persistent control value to what was provided as the default one.

Parameters:
id - the control id

getViewAreas

public int getViewAreas(java.util.Map<java.lang.String,ViewArea> output)
Adds all ViewAreas of this presentable to the given map output, if it is not null.
Default implementation does nothing and returns 0.

Parameters:
output - the map for view areas (field name -> view area), not cleared by this method, may be null: in this case the method only returns the number of view areas.
Returns:
the number of view areas in this presentable

drawPresentation

public final void drawPresentation(Panel panel,
                                   java.awt.Graphics2D g,
                                   boolean publicOnly)
Draws the presentation elements of the of the presentable object (shapes, controls, charts, and presentations of the embedded objects).

Parameters:
panel - the panel where the drawing is done
g - the graphics context
publicOnly - if true, this method draws only shapes marked as public

drawModel

public final void drawModel(Panel panel,
                            java.awt.Graphics2D g,
                            boolean publicOnly)
Draws the presentation graphics marked as icon, and the model elements (variables, parameters, events, statecharts, etc. model parts of embedded objects) of the presentable object.

Parameters:
panel - the presentation panel
g - the graphics context
publicOnly - if true, this method draws only shapes marked as public

drawModelElements

public void drawModelElements(Panel panel,
                              java.awt.Graphics2D g,
                              boolean publicOnly)
Should be overridden to draw the model primitives (variables, parameters, events, statecharts, connectors, etc.) of the presentatable object and also the model parts of its embedded objects (for latter call drawEmbeddedObjectModel(...)).

Parameters:
panel - the presentation panel
g - the graphics context
publicOnly - if true, this method draws only shapes marked as public

modelElementContains

public static boolean modelElementContains(double px,
                                           double py,
                                           double x,
                                           double y)
Tests if a standard not resizable model element (like variable, parameter, event, port, pseudo state, etc.) contains the point with coordinates (x,y). This is not the actual containment as the shapes of the model elements are different and may change, but test on whether the point is "in the nearby area".

Parameters:
px - the x coordinate of the point
py - the y coordinate of the point
x - the x coordinate of the model element center
y - the y coordinate of the model element center
Returns:
true if the point nearby the model element

modelElementContains

public static boolean modelElementContains(double px,
                                           double py,
                                           double x,
                                           double y,
                                           double width,
                                           double height)
Tests if a resizable model element (like stock variable) contains the point with coordinates (x,y). This is not the actual containment as the shapes of the model elements are different and may change, but test on whether the point is "in the nearby area".

Parameters:
px - the x coordinate of the point
py - the y coordinate of the point
x - the x coordinate of the model element center
y - the y coordinate of the model element center
width - the width of the model element
height - the height of the model element
Returns:
true if the point nearby the model element

onShapeGroupDraw

public void onShapeGroupDraw(int id,
                             int index,
                             Panel panel,
                             java.awt.Graphics2D g)
Should be overridden to do custom drawing after the (non-persistent) group contents has been drawn.

Parameters:
id - the shape group id
index - index of the group (for replicated groups)
panel - the panel where the drawing is done
g - the graphics context where the shape is drawn

onClickPresentationAt

public final boolean onClickPresentationAt(double px,
                                           double py,
                                           boolean publicOnly)
Tests if any of the presentation shapes contain the point with the coordinates (px,py), and, if yes, executes the shape's reaction on click at that point.

Parameters:
px - the x coordinate of the click
py - the y coordinate of the click
publicOnly - if true, not public shapes are ignored (false returned)
Returns:
true if the click has been handled AND further click processing is not needed, false otherwise

onClickIconAt

public final boolean onClickIconAt(double px,
                                   double py,
                                   boolean publicOnly)
Tests if any of the icon shapes contain the point with the coordinates (px,py), and, if yes, executes the shape's reaction on click at that point.

Parameters:
px - the x coordinate of the click
py - the y coordinate of the click
publicOnly - if true, not public shapes are ignored (false returned)
Returns:
true if the click has been handled AND further click processing is not needed, false otherwise

presentationContains

public final boolean presentationContains(double px,
                                          double py)
Tests if any of the presentation shapes contain the point with the coordinates (px,py).

Parameters:
px - the x coordinate of the click
py - the y coordinate of the click
Returns:
true if if any of the presentation shapes contain the point, false otherwise

iconContains

public final boolean iconContains(double px,
                                  double py)
Tests if any of the icon shapes contain the point with the coordinates (px,py).

Parameters:
px - the x coordinate of the click
py - the y coordinate of the click
Returns:
true if if any of the icon shapes contain the point, false otherwise

onClickModelAt

public boolean onClickModelAt(Panel panel,
                              double px,
                              double py,
                              int clickCount,
                              boolean publicOnly)
Should be overridden to test if any of the model elements contain the point with the coordinates (px,py), and, if yes, execute the corresponding action.

Parameters:
panel - the presentation panel
px - the x coordinate of the click
py - the y coordinate of the click
clickCount - the number of clicks
publicOnly - if true, not public shapes are ignored (false returned)
Returns:
true if the click has been handled AND further click processing is not needed, false otherwise

onShapeClick

public boolean onShapeClick(int id,
                            int index,
                            double clickx,
                            double clicky)
Should be overridden to define reaction on mouse click on a non-persistent shape. The click coordinates are definitely within the shape bounds if this method is called. In case of AbstractShapeGISMap, coordinates are geographical. By default, does nothing and returns false.

Parameters:
id - the shape id
index - index of the shape (for replicated shapes)
clickx - the x coordinate of the click relative to the shape
(or longitude, for AbstractShapeGISMap: for more information see AbstractShapeGISMap.onClick(double, double))
clicky - the y coordinate of the click relative to the shape
(or latitude, for AbstractShapeGISMap: for more information see AbstractShapeGISMap.onClick(double, double))
Returns:
true if further click processing is not needed, false otherwise

drawShape

public final void drawShape(int id,
                            Panel panel,
                            java.awt.Graphics2D g,
                            java.awt.geom.AffineTransform xform,
                            boolean publicOnly)
Draws a (possibly, replicated) non-persistent shape, control or chart in the given graphics context.

Parameters:
id - the shape id
panel - the panel where the drawing is done
g - the graphics context where the shape is drawn
xform - the original transformation of the graphics that must be set before the drawing
publicOnly - if true, this method draws only shapes marked as public

onShapeClickAt

public final boolean onShapeClickAt(int id,
                                    double px,
                                    double py,
                                    boolean publicOnly)
Tests if a (possibly, replicated) non-persistent shape contains the point with the coordinates (px,py), and, if yes, executes the shape's reaction on click at that point. For a replicated shape repeats the test until an instance of the shape handles the click AND tells that further processing is not needed. Invisible shapes are ignored.

Parameters:
id - the shape id
px - the x coordinate of the click
py - the y coordinate of the click
publicOnly - if true, not public shapes are ignored (false returned)
Returns:
true if the click has been handled AND further click processing is not needed, false otherwise

contains

public final boolean contains(int id,
                              double px,
                              double py)
Tests if a (possibly, replicated) non-persistent shape contains the point with the coordinates (px,py).
For a replicated shape repeats the test until finds instance of the shape that contains point. Invisible shapes are ignored.

Parameters:
id - the shape id
px - the x coordinate of the click
py - the y coordinate of the click
Returns:
true if (possibly, replicated) shape contains the point with the coordinates (px,py), false otherwise

drawPlainVariable

public void drawPlainVariable(Panel panel,
                              java.awt.Graphics2D g,
                              int x,
                              int y,
                              int xname,
                              int yname,
                              java.lang.String name,
                              java.lang.Object var,
                              boolean constant)
Draws a variable image and its name at the given positions and displays the variable toString text underneath the name. If variable is null, the image is grayed.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the variable image (center)
y - y coordinate of the variable image (center)
xname - x coordinate of the variable name text
yname - y coordinate of the variable name text
name - the variable name
var - the variable itself
constant - either this variable is constant or not

drawCollection

public void drawCollection(Panel panel,
                           java.awt.Graphics2D g,
                           int x,
                           int y,
                           int xname,
                           int yname,
                           java.lang.String name,
                           java.lang.Object collection)
Draws a collection image and its name at the given positions and (if the collection implements Collection interface) displays the number of elements underneath the name. If collection is null, the image is grayed.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the collection image (center)
y - y coordinate of the collection image (center)
xname - x coordinate of the collection name text
yname - y coordinate of the collection name text
name - the collection name
collection - the collection itself

drawFunction

public void drawFunction(Panel panel,
                         java.awt.Graphics2D g,
                         int x,
                         int y,
                         int xname,
                         int yname,
                         java.lang.String name)
Draws a function image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the function image (center)
y - y coordinate of the function image (center)
xname - x coordinate of the function name text
yname - y coordinate of the function name text
name - the function name

drawTableFunction

public void drawTableFunction(Panel panel,
                              java.awt.Graphics2D g,
                              int x,
                              int y,
                              int xname,
                              int yname,
                              java.lang.String name)
Draws a table function image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the table function image (center)
y - y coordinate of the table function image (center)
xname - x coordinate of the table function name text
yname - y coordinate of the table function name text
name - the table function name

drawSchedule

public void drawSchedule(Panel panel,
                         java.awt.Graphics2D g,
                         int x,
                         int y,
                         int xname,
                         int yname,
                         java.lang.String name,
                         Schedule<?> s)
Draws a schedule image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the schedule image (center)
y - y coordinate of the schedule image (center)
xname - x coordinate of the schedule name text
yname - y coordinate of the schedule name text
name - the name of the schedule, or null
s - the schedule itself

drawDataset

public void drawDataset(Panel panel,
                        java.awt.Graphics2D g,
                        int x,
                        int y,
                        int xname,
                        int yname,
                        java.lang.String name,
                        java.lang.Object dataset)
Draws a dataset image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the table dataset image (center)
y - y coordinate of the table dataset image (center)
xname - x coordinate of the table dataset name text
yname - y coordinate of the table dataset name text
name - the table dataset name

drawStatistics

public void drawStatistics(Panel panel,
                           java.awt.Graphics2D g,
                           int x,
                           int y,
                           int xname,
                           int yname,
                           java.lang.String name,
                           java.lang.Object statistics)
Draws a statistics image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the table statistics image (center)
y - y coordinate of the table statistics image (center)
xname - x coordinate of the table statistics name text
yname - y coordinate of the table statistics name text
name - the table statistics name

drawHistogramData

public void drawHistogramData(Panel panel,
                              java.awt.Graphics2D g,
                              int x,
                              int y,
                              int xname,
                              int yname,
                              java.lang.String name,
                              java.lang.Object histogramData)
Draws a histogram data image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the table histogram data image (center)
y - y coordinate of the table histogram data image (center)
xname - x coordinate of the table histogram data name text
yname - y coordinate of the table histogram data name text
name - the table histogram data name

drawHistogram2DData

public void drawHistogram2DData(Panel panel,
                                java.awt.Graphics2D g,
                                int x,
                                int y,
                                int xname,
                                int yname,
                                java.lang.String name,
                                java.lang.Object histogram2DData)
Draws a histogram 2D data image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the table histogram 2D data image (center)
y - y coordinate of the table histogram 2D data image (center)
xname - x coordinate of the table histogram 2D data name text
yname - y coordinate of the table histogram 2D data name text
name - the table histogram 2D data name

drawDatabase

public void drawDatabase(Panel panel,
                         java.awt.Graphics2D g,
                         int x,
                         int y,
                         int xname,
                         int yname,
                         java.lang.String name,
                         java.lang.Object object)
Draws a database object image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the database object image (center)
y - y coordinate of the database object image (center)
xname - x coordinate of the database object name text
yname - y coordinate of the database object name text
name - the database object name

drawQuery

public void drawQuery(Panel panel,
                      java.awt.Graphics2D g,
                      int x,
                      int y,
                      int xname,
                      int yname,
                      java.lang.String name,
                      java.lang.Object object)
Draws a query object image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the query object image (center)
y - y coordinate of the query object image (center)
xname - x coordinate of the query object name text
yname - y coordinate of the query object name text
name - the query object name

drawKeyValueTable

public void drawKeyValueTable(Panel panel,
                              java.awt.Graphics2D g,
                              int x,
                              int y,
                              int xname,
                              int yname,
                              java.lang.String name,
                              java.lang.Object object)
Draws a table object image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the table object image (center)
y - y coordinate of the table object image (center)
xname - x coordinate of the table object name text
yname - y coordinate of the table object name text
name - the table object name

drawInsert

public void drawInsert(Panel panel,
                       java.awt.Graphics2D g,
                       int x,
                       int y,
                       int xname,
                       int yname,
                       java.lang.String name,
                       java.lang.Object object)
Draws a insert object image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the insert object image (center)
y - y coordinate of the insert object image (center)
xname - x coordinate of the insert object name text
yname - y coordinate of the insert object name text
name - the insert object name

drawUpdate

public void drawUpdate(Panel panel,
                       java.awt.Graphics2D g,
                       int x,
                       int y,
                       int xname,
                       int yname,
                       java.lang.String name,
                       java.lang.Object object)
Draws a update object image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the update object image (center)
y - y coordinate of the update object image (center)
xname - x coordinate of the update object name text
yname - y coordinate of the update object name text
name - the update object name

drawTextFile

public void drawTextFile(Panel panel,
                         java.awt.Graphics2D g,
                         int x,
                         int y,
                         int xname,
                         int yname,
                         java.lang.String name,
                         java.lang.Object object)
Draws a text file object image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the text file object image (center)
y - y coordinate of the text file object image (center)
xname - x coordinate of the text file object name text
yname - y coordinate of the text file object name text
name - the text file object name

drawExcelFile

public void drawExcelFile(Panel panel,
                          java.awt.Graphics2D g,
                          int x,
                          int y,
                          int xname,
                          int yname,
                          java.lang.String name,
                          java.lang.Object object)
Draws an Excel file object image and its name at the given positions.

Parameters:
panel - the presentation panel
g - the graphics context
x - x coordinate of the Excel file object image (center)
y - y coordinate of the Excel file object image (center)
xname - x coordinate of the Excel file object name text
yname - y coordinate of the Excel file object name text
name - the Excel file object name

writeCustomData

public void writeCustomData(java.io.ObjectOutputStream out)
                     throws java.io.IOException
This method may be overridden to perform custom data writing when saving model snapshot

Parameters:
out -
Throws:
java.io.IOException

readCustomData

public void readCustomData(java.io.ObjectInputStream in)
                    throws java.io.IOException,
                           java.lang.ClassNotFoundException
This method may be overridden to perform custom data reading when loading model snapshot

Parameters:
in -
Throws:
java.io.IOException
java.lang.ClassNotFoundException

finishReadObject_xjal

public void finishReadObject_xjal(java.io.ObjectInputStream in,
                                  java.lang.Class<? extends Presentable> callerClass)
                           throws java.io.IOException,
                                  java.lang.ClassNotFoundException
This method should not be called by user

Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.