Libraries.Interface.Controls.Charts.ViolinChart Documentation

Example Code

use Libraries.Compute.Statistics.DataFrame
    use Libraries.Interface.Controls.Charts.ViolinChart
    
    DataFrame frame
    frame:Load("Data.csv")
    frame:AddSelectedColumn(1)
    ViolinChart chart = frame:ViolinChart()
    chart:SetTitle("My Awesome Title")
    chart:SetXAxisTitle("Time")
    chart:Display

Inherits from: Libraries.Interface.Item, Libraries.Interface.Controls.Charts.Chart, Libraries.Interface.Controls.Control, Libraries.Interface.Item2D, Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Activate(Libraries.Interface.Events.BehaviorEvent event)The MAINTAIN_ASPECT_RATIO layout style is used to calculate one of the dimensions of the Control relative to the other dimension.
Activate()This action returns a default behavior for this paricular control.
Add(integer index, Libraries.Interface.Item2D newItem)This action adds a different Item2D into this one, storing the added Item2D at a specific index in the internal array.
Add(Libraries.Interface.Item2D newItem)This action adds a different Item2D into this one.
AddBehavior(Libraries.Interface.Behaviors.Behavior behavior)This action adds a new Behavior to this Ite
AddControlActivationListener(Libraries.Interface.Events.ControlActivationListener listener)The FIT_FONT layout style is used to ensure a Control's height can fit the Font used in this LayoutProperties, plus padding from the children elements.
AddFocusListener(Libraries.Interface.Events.FocusListener listener)This action adds a FocusListener to the Item.
AddLayoutProperties(Libraries.Interface.Layouts.LayoutProperties properties)
AddMouseListener(Libraries.Interface.Events.MouseListener listener)This action adds a MouseListener to the Item.
AddMouseMovementListener(Libraries.Interface.Events.MouseMovementListener listener)This action adds a MouseMovementListener to the Item.
AddMouseWheelListener(Libraries.Interface.Events.MouseWheelListener listener)This action adds a MouseWheelListener to the Item.
AddSelectionListener(Libraries.Interface.Events.SelectionListener listener)
AddTouchListener(Libraries.Interface.Events.TouchListener listener)This action adds a TouchListener to the Item.
AdjustForLegend()Returns the relative size difference in the y axis label for the chart.
Advance(number time)This action is used to advance the item forward in time in physics space to synchronize it for time of impact solving.
ApplyAngularImpulse(number impulse)This action applies an angular impulse to this item.
ApplyForce(Libraries.Compute.Vector2 force, Libraries.Compute.Vector2 point)This action applies a force to this item at the passed point.
ApplyForceToCenter(Libraries.Compute.Vector2 force)This action applies a force to this item at the center of the item.
ApplyLinearImpulse(Libraries.Compute.Vector2 impulse, Libraries.Compute.Vector2 point)This action applies a linear impulse to this item at the passed point.
ApplyTorque(number torque)This action applies a torque to this item.
AreChildrenProcessingMouseEvents()This action returns whether or not this Item is allowing its children to receive mouse events if the Item is custom drawing.
BeginCollision(Libraries.Interface.Item item)This action is used to indicate that two items have just begun colliding.
BeginMouseOver()Whether or not this Control should automatically be laid out during the next Update loo
CanRotate(boolean flag)This action gets the position of the center of this item in global (world) coordinates.
CancelBehaviors()This action stops all behaviors this Item is following without finishing the
ClickedMouse()This action obtains the Input Table from this control, copies it, assigns it a group name, sets the control to use the new input table, and then adds it to the global input table hash table.
CollideWithChildren()This action sets the mass, mass moment of inertia, and how the 2D item should move (via linear velocity) to be at the desired locatio
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
ComputeDistance(Libraries.Compute.Vector2 point, integer childIndex, Libraries.Compute.Vector2 normalOut)This action computes the distance of the passed point from the collision shape attached to this item.
Contains(number containsX, number containsY)This action tests if a point in global x,y coordinates is contained inside this Item2D.
ConvertToScalableVectorGraphics()This action converts this chart to a text value that contains information for a scalable vector graphics file.
CopyAndActivateInputTable(text name)This action obtains the Input Table from this control, copies it, assigns it a group name, sets the control to use the new input table, and then adds it to the global input table hash table.
CreateNodes(Libraries.Game.Collision.BroadphaseCollision2D broadphase, Libraries.Game.Collision.PhysicsPosition2D transform)This action creates the nodes for this item for the broadphase collision.
DestroyNodes(Libraries.Game.Collision.BroadphaseCollision2D broadphase)This action destroys the nodes for this item for the broadphase collision, essentially removing it from the collision detection system.
Display(integer width, integer height)This action creates a default Game object for displaying charts and sets this chart as the sole display.
Display()This action creates a default Game object for displaying charts and sets this chart as the sole display.
Dispose()This action is used to free up any additional memory that is being used by this Item for purposes such as graphics.
DisposeAll()This action is used to call Dispose on this Item and on the entire children hierarchy of this Ite
DisposeChildren()This action is used to call Dispose on the entire children hierarchy of this Item.
DisposeDrawables()labels that is shown on the x ax
Draw(Libraries.Game.Graphics.Painter2D painter)The Draw action is used to perform custom drawing on this Item and its children.
Empty()This action will remove all items from this item's children hierarchy.
EmptyAll()This action will call Empty on the entire children hierarchy of this item, and then empty this item as wel
EmptyChildren()This action is used to call Empty on all children contained in this item's children hierarchy.
EmptySelectionListeners()
EnablePhysics(boolean flag)This action enables physics for this item.
EndMouseOver()A layout which is used to arrange the children of this objec
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
FastMoving(boolean flag)This action gets the linear velocity of this item in units per second.
FinishCollision(Libraries.Interface.Item item)This action is used to indicate that two items that were previously colliding no longer are.
FlipX()This action will flip the Item2D across the X-axis.
FlipY()This action will flip the Item2D across the Y-axis.
Focus()This action sets focus on this Item.
GainedFocus(Libraries.Interface.Events.FocusEvent event)This action is fired if the item received the focu
GainedSelection(Libraries.Interface.Controls.Charts.ChartItem ci)This will execute when an item in violin chart gain selecti
GainedSelection()The LayoutProperties that were last used to define the properties of this Control.
GenerateInfoTree()Creates the accessibility information for the chart are
GenerateSummary()This is called by GenerateInfoTree to generate the summary that is heard when you first focus on the chart.
GetAccessibilityCode()This action returns the current accessiblity code for this It
GetAccessibilityType()This action returns the name of the accessiblity code for this Item as Te
GetAccessibleParent()This action returns the parent of this Item2D.
GetActivationBehavior()This action returns a default behavior for this paricular control.
GetAngularDamping()This action gets the inverse inertia of this item (i.
GetAngularVelocity()This action gets this item's angular velocity in radians per second.
GetBackground()This action overrides the default Update action.
GetBackgroundColor()
GetBandWidth()This returns the inteval size to calculate the normal distributio
GetBorderColor()
GetBorderThickness()
GetBottomPadding()
GetBoundingBox(integer childIndex)This action is used to get the bounding box of the item.
GetBoundingRectangle()This action returns a rectangle that fully encloses the four corners of the Item as it is represented by its internal vertices array.
GetCenterX()This action returns the x coordinate of the center of this Item2D.
GetCenterY()This action returns the y coordinate of the center of this Item2D.
GetChartArea()This action is used by the layout to position the graphical components of the Chart.
GetChartAreaHeightPercent()
GetChartAreaWidthPercent()
GetChartInfos()This returns a 2D array that holds all needed informations from each violin graph.
GetChartItems()This pass a 2D array that holds all needed drawables from each violin grap
GetChildren()This action gets the children of this item in an array.
GetClipCoordinates(Libraries.Compute.Vector2 xCoords, Libraries.Compute.Vector2 yCoords)This action gets the clipping coordinates of this Item2D.
GetCollisionGroupFlag()This action gets the total force on this item.
GetCollisionGroupIndex()This action gets this item's angular velocity in radians per second.
GetCollisionList()This is an action used internally to retrieve the head of the linked list of collisions with this item.
GetCurrentLayoutProperties()This action returns the LayoutProperties that were last used to define the Control, and thus describe its current state.
GetData()This returns an array that holds datas from each violin grap
GetDefaultFont()This action obtains the default font for this control.
GetDefaultFontName()This action defines what the default font is for this control.
GetDefaultFontSize()This action is used by the layout to position the graphical components of the Chart.
GetDefaultLayoutProperties()This action returns the default LayoutProperties used for this Control.
GetDensity()This action applies a linear impulse to this item at the passed point.
GetDescription()This action returns the current internal description of the Item.
GetFocusListeners()This action returns an Iterator containing all of the FocusListeners that have been added to this Item using the AddFocusListener action.
GetFont()This action returns the Font being used by this Control.
GetFontColor()
GetFontSize()This action returns the base Font size to be used by this Control, if the Control uses a Fon
GetForce()This action gets the total force on this item.
GetFriction()This action applies a force to this item at the center of the item.
GetGlobalX()This action returns the Item's global x coordinate.
GetGlobalY()This action returns the Item's global y coordinate.
GetGlobalZ()This action returns the Item's global z value.
GetHashCode()This action gets the hash code for an object.
GetHeight()This action will return the currently set height of the Item2D.
GetHorizontalLayoutMode()The SetHorizontalLayoutMode is used to determine how the width of a Control is calculated.
GetHorizontalPanel()This action is used by the layout to position the graphical components of the Chart.
GetIcon()
GetIconColor()
GetInertia()This action gets the rotational inertia of this item.
GetInputGroup()This action returns the input group for this Item.
GetInputTable()
GetInterfaceScale()
GetInverseInertia()This action gets the inverse inertia of this item (i.
GetInverseMass()This action gets the inverse mass of the item (i.
GetItem(integer index)This action returns an Item2D that was previously added to this Item2D by finding it at the given index in the internal array of children Items.
GetItemAt(number x, number y)This action searches through all Items stored in this Item2D and finds the deepest Item which contains the given point in global coordinates.
GetItemCount()This action returns the number of items contained in this Item2D.
GetItems()This action returns an iterator containing all the items contained in this Item2D.
GetJointList()This is an action used internally to retrieve the head of the liked list of joints connected to this item.
GetLabelText()This action returns the text used for this Control's label, if it has one.
GetLayer()This action returns the current Layer2Dthat this Item2D is a part of in the Game librarie
GetLayout()
GetLayoutProperties(number containerWidth, number containerHeight)This action returns the best suited LayoutProperties stored by the Control for use with the given container width and height.
GetLayoutProperties()
GetLeftPadding()
GetLegend()This action returns the current legend, if one exists
GetLinearDamping()Given the local coordinates of a vector, this action computes the screen coordinates of the corresponding vector.
GetLinearVelocity()This action gets the linear velocity of this item in units per second.
GetLinearVelocityFromLocalPoint(Libraries.Compute.Vector2 localPoint)Given a global point (i.
GetLinearVelocityFromWorldPoint(Libraries.Compute.Vector2 worldPoint)Given the screen coordinates of a vector, this action computes the local coordinates of the vector (i.
GetLocalCenter()This action gets the position of the center of this item in local coordinates (i.
GetLocalPoint(Libraries.Compute.Vector2 worldPoint)Given a global point (i.
GetLocalVector(Libraries.Compute.Vector2 worldVector)Given the screen coordinates of a vector, this action computes the local coordinates of the vector (i.
GetMass(Libraries.Game.Physics.Mass2D mass)This action is used to advance the item forward in time in physics space to synchronize it for time of impact solving.
GetMass()This action returns the mass of the item in kilograms.
GetMouseListeners()This action returns an Iterator containing all of the MouseListeners that have been added to this Item using the AddMouseListener action.
GetMouseMovementListeners()This action returns an Iterator containing all of the MouseMovementListeners that have been added to this Item using the AddMouseMovementListener action.
GetMouseWheelListeners()This action returns an Iterator containing all of the MouseWheelListeners that have been added to this Item using the AddMouseWheelListener action.
GetName()This action returns the current internal name of the Item.
GetNextFocus()This action returns the next focus item.
GetNodeCount()This action gets the number of broadphase nodes this item has.
GetNodes()This action returns all of the broadphase nodes attached to this item in an array.
GetOffsetX()This action returns the X offset of the Item.
GetOffsetY()This action returns the Y offset of the item.
GetOffsetZ()This action returns the Z offset of the item.
GetOriginX()This action will return the current X origin of this Item2D.
GetOriginY()This action will return the current Y origin of this Item2D.
GetParent()This action returns the parent of this Item2D.
GetPercentageHeight()This action sets the x position of the Control in pixels, if the container's Layout supports it.
GetPercentageWidth()This action sets the y position of the Control in pixels, if the container's Layout supports it.
GetPercentageX()This action returns the x position of the Control relative to the size of its container, if the container's Layout supports it.
GetPercentageY()This action returns the y position of the Control relative to the size of its container, if the container's Layout supports it.
GetPhysicsProperties()This action computes the distance of the passed point from the collision shape attached to this item.
GetPixelHeight()This action sets the x position of the Control relative to the size of its container, if the container's Layout supports it.
GetPixelWidth()This action sets the y position of the Control relative to the size of its container, if the container's Layout supports it.
GetPixelX()This action returns the target x position of the Control in pixels.
GetPixelY()This action returns the target y position of the Control in pixels.
GetPopupMenu()The GetContextMenu action returns this Control's context menu, if it has one.
GetPreviousFocus()This action returns the previous focus item.
GetPropertiesSize()
GetProperty(text key)
GetPropertyKeyIterator()
GetRawInertia()This action is used to update this items position in physics space after physics solving is finished for this item.
GetResponsiveness()This action gets the inverse mass of the item (i.
GetRestitution()This action gets the total torque on this item.
GetRightPadding()
GetRotation()Gets the current degree of rotation of this Item.
GetRotationInRadians()Gets the current rotation of this Item in radians.
GetScaleLabels()This action is used by the layout to position the graphical components of the Chart.
GetScaleTicks()This action is used by the layout to position the graphical components of the Chart.
GetScaleX()This action will return the current x-scaling value of this Item2D.
GetScaleY()This action will return the current y-scaling value of this Item2D.
GetScreenX()This action returns the x coordinate of the Item on the screen.
GetScreenY()This action returns the y coordinate of the Item on the screen.
GetSelection()This action gets the ChartSelection, which contains the ChartItem that is currently selected.
GetSelectionBorderColor()
GetSelectionColor()
GetSelectionFontColor()
GetSelectionListeners()
GetShape()This item returns the collision shape of this item.
GetShapeType()This action returns an integer representing the type of collision shape currently attached to this item.
GetSleepTime()This action gets the children of this item in an array.
GetSweep()This action returns the swept movement of this item used for time of impact solving for the physics system.
GetTitle()Returns the Title of the Bar Chart.
GetTitleLabel()This action is used by the layout to position the graphical components of the Chart.
GetTopPadding()
GetTorque()This action gets the total torque on this item.
GetTouchListeners()This action returns an Iterator containing all of the TouchListeners that have been added to this Item using the AddTouchListener action.
GetTransform()This action returns the position of the item in physical space.
GetTransform0()This action gets the position of the item in physics space from the previous frame.
GetUnfocusedSelectionColor()
GetVertex(integer index)This action returns a value from one of the internal vertices of this Item2D.
GetVerticalLayoutMode()The GetVerticalLayoutMode is used to determine how the height of a Control is calculated.
GetVerticalPanel()This action is used by the layout to position the graphical components of the Chart.
GetVertices()This action returns the internal vertices array of this Item2D.
GetView2D()The SetClipping action is used to enable or disable clipping.
GetVisibleItemAt(number x, number y)This action searches through all Items stored in this Item2D and finds the deepest Item which contains the given point in global coordinates.
GetWidth()This action will return the currently set width of the Item2D.
GetWindowingAction()This gets what kind of kernel function that is used to calculate the normal distributio
GetWorldCenter()This action gets the position of the center of this item in global (world) coordinates.
GetWorldPoint(Libraries.Compute.Vector2 localPoint)Given a point relative to the center of this item, this action computes and returns that point in screen coordinates.
GetWorldVector(Libraries.Compute.Vector2 localVector)Given the local coordinates of a vector, this action computes the screen coordinates of the corresponding vector.
GetX()This action returns the currently set X coordinate of the Item.
GetXAxis()This action is used by the layout to position the graphical components of the Chart.
GetXAxisFontSizeOffset()Returns the relative size difference in the x axis label for the chart.
GetXAxisLabels()This returns how many labels on x-ax
GetXAxisTitle()Returns the title for the X-Axis(Categories) of the Bar Char
GetXLabel()This action is used by the layout to position the graphical components of the Chart.
GetXLabels()This action is used by the layout to position the graphical components of the Chart.
GetXTicks()This action is used by the layout to position the graphical components of the Chart.
GetY()This action returns the currently set Y coordinate of the Item.
GetYAxis()This action is used by the layout to position the graphical components of the Chart.
GetYAxisFontSizeOffset()Returns the relative size difference in the y axis label for the chart.
GetYAxisTitle()Returns the title for the Y-Axis(Scale) of the Bar Char
GetYLabel()This action is used by the layout to position the graphical components of the Chart.
GetYMax()This returns the maximal value on y-ax
GetYTickCount()This retuns total number of ticks on the y-ax
GetZ()This action returns the currently set Z value of this Item2D.
HasMoved()This action returns an integer representing the type of collision shape currently attached to this item.
HasProperties()
HasProperty(text key)
Hide()This action is used to indicate that an Item and all Items that were added to it should not be visible on the screen.
IsAcceptingMouseInput()This action returns whether or not this Item accepts mouse input.
IsAccessibleParent()This action returns the nearest parent object that is accessible.
IsClipping()The IsClipping action returns true if pixel clipping is enabled, or false if it is disabled.
IsCollidable()This action determines whether this item is collidable.
IsCustomDrawing()The IsCustomDrawing action returns whether or not this Item is directly managing how itself and its children are drawn.
IsEmpty()This action returns whether or not any items are contained in this Item.
IsFastMoving()This action sets this item's angular velocity in radians per second.
IsFlippedX()This action will return if the Item2D is currently flipped across the x-axis.
IsFlippedY()This action will return if the Item2D is currently flipped across the y-axis.
IsFocusable()This action returns whether or not the Item can currently receive focus.
IsFocused()The IsFocused action determines if this Item is currently focused, returning true if it is, or false if it is no
IsGrayScale()This action states to turn on the legend.
IsNonResponsive()This action gets the number of broadphase nodes this item has.
IsPhysicsEnabled()This action determines whether physics is currently enabled for this item.
IsResponsive()This action sets this item to be collidable.
IsRotationAllowed()This action determines whether physics is currently enabled for this item.
IsShowing()This action returns whether the Item is currently set to be visible on the screen.
IsShowingLegend()This action states to turn on the legend.
IsSimulated()This action gets the position of the center of this item in local coordinates (i.
IsSimulationRequired()This action sets the x-component of this item's linear velocity in units per second.
IsUnmovable()This action creates the nodes for this item for the broadphase collision.
LoadGraphics(Libraries.Interface.Layouts.LayoutProperties properties)How many ticks are set along the y axis and max value on y axi
LostFocus(Libraries.Interface.Events.FocusEvent event)This action is fired if the item lost the focu
LostSelection()The default LayoutProperties, used by many controls to set their base visual information and provide default value
LostSelection(Libraries.Interface.Controls.Charts.ChartItem ci)This will execute when an item in violin chart lose selecti
Move(Libraries.Compute.Vector2 movement)This action will increase the x and y coordinates of this Item by the values stored in the provided Vector2.
Move(number xAmount, number yAmount)This action will increase the x and y coordinates of this Item by the given amounts.
MoveX(number xAmount)This action will increase the x-coordinate of this Item by the given amount.
MoveY(number yAmount)This action will increase the y-coordinate of this Item by the given amount.
MoveZ(number zAmount)This action will increase the z-coordinate of this Item by the given amount.
NeedsLayout()This action returns whether or not the Control is in need of laying out by its container (or the parent Layer2D, if no container Control exists
NeedsTreeUpdate()This action indicates whether the system needs its graphics updated.
NotifyControlActivationListeners(Libraries.Interface.Events.ControlActivationEvent event)The FILL layout style will attempt to fill the remaining width or height of the container with this Control.
NotifySelectionListeners(Libraries.Interface.Events.SelectionEvent event)This action will notify all SelectionListeners which have been added to the Control of the given SelectionEvent.
PrepareVertices()Checks to see if the Item2D's internal vertices are up to date, and updates them if they are not.
ProcessMouseEvent(Libraries.Interface.Events.MouseEvent event)This action takes a mouse event and handles it.
ProcessTouchEvent(Libraries.Interface.Events.TouchEvent event)FIX ME: Needs commen
QueueForDrawing(Libraries.Game.Graphics.Painter2D painter)This action is used to draw this Item on the screen, and then draw all of the Item's children hierarchy on the screen.
ReleasedMouse()This action obtains the Input Table from this control, copies it, assigns it a group name, sets the control to use the new input table, and then adds it to the global input table hash table.
Remove(integer index)This action adds a different Item2D into this one.
Remove(Libraries.Interface.Item2D item)This action adds a different Item2D into this one, storing the added Item2D at a specific index in the internal array.
RemoveControlActivationListener(Libraries.Interface.Events.ControlActivationListener listener)The FIT_CONTENTS layout style will calculate this Control's dimensions as the combined total dimensions of its children elements.
RemoveFocusListener(Libraries.Interface.Events.FocusListener listener)This action removes a FocusListener from the Item.
RemoveLayoutProperties(Libraries.Interface.Layouts.LayoutProperties properties)
RemoveMouseListener(Libraries.Interface.Events.MouseListener listener)This action removes a MouseListener from the Item.
RemoveMouseMovementListener(Libraries.Interface.Events.MouseMovementListener listener)This action removes a MouseMovementListener from the Item.
RemoveMouseWheelListener(Libraries.Interface.Events.MouseWheelListener listener)This action removes a MouseWheelListener from the Item.
RemoveSelectionListener(Libraries.Interface.Events.SelectionListener listener)
RemoveTouchListener(Libraries.Interface.Events.TouchListener listener)This action removes a TouchListener from the Item.
RequestLayout()This action requests that this Control should be laid out by its container (or the Layer2D if there is no containing Control) during the next Updat
RequireSimulation(boolean flag)This action sets the y-component of this item's linear velocity in units per second.
ResetLayoutFlag()This action is used to indicate that the Control no longer needs to be laid out.
ResetMass()This action sets the mass, mass moment of inertia, and how the 2D item should move (via linear velocity) to be at the desired locatio
Resize()background of chart ar
Rotate(number degrees)Rotates this Item2D by the given number of degrees.
Save(Libraries.System.File file)This action saves this chart to disk at the position of the current file.
Save(text path)This is a helper action for saving that saves at the path relative to the current working directory.
Scale(number amount)This action will multiply the current scaling value by the given number.
Scale(number xAmount, number yAmount)This action will multiply the x scaling and y scaling values, respectively, by the given numbers.
ScaleFromCenter(number amount)This action will multiply the current scaling value by the given number.
ScaleFromCenter(number xAmount, number yAmount)This action will multiply the current scaling values of the x and y planes by the given number.
Select(Libraries.Interface.Controls.Charts.ChartItem item)This action sets the ChartItem that is currently selected.
SelectByFirstLetters(text firstLetter)This action selects an item in the Control using first letter navigation, if the Control supports it.
SelectChild()This action tells the chart to select a child in its list, if it has on
SelectNext()This action tells the chart to select the next item in its navigation pat
SelectParent()This action tells the chart to select the parent of the current ite
SelectPrevious()This action tells the chart to select the previous item in its navigation pat
SetAcceptsMouseInput(boolean accepts)This action sets whether or not this Item accepts mouse input.
SetAccessibilityCode(integer newAccessibilityCode)This action changes the accessibility code for this Item.
SetAngularDamping(number angularDamping)This action gets the rotational inertia of this item.
SetAngularVelocity(number angularVelocity)This action sets this item's angular velocity in radians per second.
SetBackground(Libraries.Game.Graphics.Drawable backgroundD)This action indicates whether the system needs its graphics updated.
SetBackgroundColor(Libraries.Game.Graphics.ColorGroup color)
SetBandWidth(integer value)This sets the inteval size to calculate the normal distributio
SetBorderColor(Libraries.Game.Graphics.ColorGroup color)
SetBorderThickness(integer thickness)
SetBottomPadding(number padding)This action returns the default LayoutProperties used for this Control.
SetBoundingBox(number newX, number newY, number newWidth, number newHeight)This action will set the x coordinate, y coordinate, width, and height of the Item2D, respectively.
SetCenter(number setX, number setY)This action will set the X and Y coordinates of the Item so that the center of the Item is located at the given X, Y coordinates.
SetCenterX(number setX)This action will set the X coordinate of the Item so that the center of the Item is aligned with the given X coordinate value.
SetCenterY(number setY)This action will set the Y coordinate of the Item so that the center of the Item is aligned with the given Y coordinate value.
SetChartAreaHeightPercent(number value)
SetChartAreaWidthPercent(number value)
SetChartInfos(Libraries.Containers.Array<Libraries.Containers.Array<number>> info)This pass a 2D array that holds all needed informations from each violin graph.
SetChildrenProcessingMouseEvents(boolean shouldProcess)The SetChildrenProcessingMouseEvents action is used to set whether or not children items should receive mouse events if this Item is using custom drawing.
SetClipCoordinates(Libraries.Game.Graphics.Painter2D painter)This action sets the clipping coordinates of the given painter to respect the coordinates of this Item (if it's clipping) as well as any clipping being performed by parent Items.
SetClipping(boolean clip)The SetClipping action is used to enable or disable clipping.
SetCollidable(boolean flag)This action sets this item to be collidable.
SetCollideWithChildren(boolean flag)This action gets the position of the item in physics space from the previous frame.
SetCollisionGroupFlag(boolean flag)This action sets the total torque on this item.
SetCollisionGroupIndex(integer index)This action sets the total force on this item.
SetCollisionList(Libraries.Game.Collision.CollisionEdge2D edge)This is an action used internally by the physics system to keep track of the collisions with this item in a linked list structure.
SetCustomDrawing(boolean isCustom)The SetCustomDrawing action is used to indicate that this Item wants to directly manage how itself and its children are drawn.
SetData(Libraries.Containers.Array<Libraries.Compute.Vector> data)This pass an array that holds datas from each violin grap
SetDensity(number density)This action applies an angular impulse to this item.
SetDescription(text newDescription)This action sets the internal description of the Item.
SetFlipX(boolean flip)This action will set the Item2D to be flipped across the X-axis according to the boolean.
SetFlipY(boolean flip)This action will set the Item2D to be flipped across the Y-axis according to the boolean.
SetFocusable(boolean focus)The SetFocusable action sets whether or not this Item should be focusable.
SetFont(Libraries.Game.Graphics.Font font)This action sets the Font to be used by this Control.
SetFontColor(Libraries.Game.Graphics.Color color)
SetFontSize(integer size)This action sets the base Font size to be used by this Control, if the Control uses a Fon
SetForce(Libraries.Compute.Vector2 force)This action sets the total force on this item.
SetFriction(number friction)This action applies a torque to this item.
SetHasMoved(boolean flag)This action returns the swept movement of this item used for time of impact solving for the physics system.
SetHeight(number newHeight)This action will set the height of the Item2D.
SetHorizontalLayoutMode(integer mode)The SetHorizontalLayoutMode is used to determine how the width of a Control is calculated.
SetIcon(Libraries.Game.Graphics.TextureRegion icon)This action sets the Icon used by this Control.
SetIconColor(Libraries.Game.Graphics.ColorGroup color)
SetInputGroup(text group)This action sets the input group for this Item.
SetInterfaceScale(number scale)
SetItem(integer index, Libraries.Interface.Item2D newItem)This action sets a value inside the internal item array of this Item2D.
SetJointList(Libraries.Game.Physics.Joints.JointEdge2D edge)This is an action used internally by the physics system to keep track of the joints connected to this item in a linked list structure.
SetLabelText(text labelText)This action sets the text in this Control's label, if it has one.
SetLayer(Libraries.Game.Layer2D parentLayer)This action is used by the Game libraries to create a reference to the layer that this Item2D exists on.
SetLayout(Libraries.Interface.Layouts.Layout layout)
SetLeftPadding(number padding)This action is used to load the graphical components of the Control.
SetLegend(Libraries.Interface.Controls.Charts.Legend legend)This action sets the Legend object
SetLinearDamping(number linearDamping)Given a point relative to the center of this item, this action computes and returns that point in screen coordinates.
SetLinearVelocity(Libraries.Compute.Vector2 linearVelocity)This action sets the linear velocity of this item in units per second.
SetLinearVelocityX(number linearVelocityX)This action sets the x-component of this item's linear velocity in units per second.
SetLinearVelocityY(number linearVelocityY)This action sets the y-component of this item's linear velocity in units per second.
SetMass(number mass)This action is used to syncronize the item's position in physics space with its position in the tree used for broadphase collision.
SetMass(Libraries.Game.Physics.Mass2D mass)This action sets the position of the item in physics space from the previous frame.
SetName(text name)This action is used by the layout to position the graphical components of the Chart.
SetNeedsUpdate(boolean update)This action tells the system to update all of its graphics because its structure has changed.
SetNextFocus(Libraries.Interface.Item next)This action sets the next focus item.
SetNonResponsive()This action returns all of the broadphase nodes attached to this item in an array.
SetOffset(number xAmount, number yAmount, number zAmount)This action will set X, Y, and Z offsets of the item, respectively.
SetOffset(number xAmount, number yAmount)This action will set both the X and Y offsets of the item, respectively.
SetOffsetX(number xAmount)This action sets the X offset of the Item.
SetOffsetY(number yAmount)This action sets the Y offset of the item.
SetOffsetZ(number zAmount)This action sets the Z offset of the item.
SetOrigin(number setX, number setY)This action will set the origin of the Item to be at the given location in the Item.
SetOriginCenter()This action will set the origin of the Item to be at the current center of the Item's width and height bounds.
SetParent(Libraries.Interface.Item2D newItem)This action sets a reference to the parent item.
SetPercentageHeight(number height)This action returns the target x position of the Control in pixels.
SetPercentageWidth(number width)This action returns the target y position of the Control in pixels.
SetPercentageX(number x)This action sets the x position of the Control relative to the size of its container, if the container's Layout supports it.
SetPercentageY(number y)This action sets the y position of the Control relative to the size of its container, if the container's Layout supports it.
SetPhysicsProperties(Libraries.Game.Physics.PhysicsProperties2D properties)This action is used to get the bounding box of the item.
SetPixelHeight(number height)This action returns the x position of the Control relative to the size of its container, if the container's Layout supports it.
SetPixelWidth(number width)This action returns the y position of the Control relative to the size of its container, if the container's Layout supports it.
SetPixelX(number x)This action sets the x position of the Control in pixels, if the container's Layout supports it.
SetPixelY(number y)This action sets the y position of the Control in pixels, if the container's Layout supports it.
SetPopupMenu(Libraries.Interface.Controls.PopupMenu menu)The SetPopupMenu action attaches a PopupMenu to this Control, which can be opened by interacting with it (most commonly by right-clicking on the Control
SetPosition(number setX, number setY)This action will set both the X coordinate and the Y coordinate of the Item, in that order.
SetPosition(number setX, number setY, number setZ)This action will set both the X and Y coordinates of this Item2D, and will additionally set the Z value of this Item2D.
SetPreviousFocus(Libraries.Interface.Item previous)This action sets the previous focus item.
SetProperty(text key, Libraries.Data.Formats.JavaScriptObjectNotation value)
SetResponsive()This action determines whether this item is collidable.
SetResponsiveness(integer type)This action returns the mass of the item in kilograms.
SetRestitution(number restitution)This action applies a force to this item at the passed point.
SetRightPadding(number padding)This action returns the LayoutProperties that were last used to define the Control, and thus describe its current state.
SetRotation(number degrees)Sets this Item2D to be rotated to an angle of the given number of degrees.
SetScale(number scale)This action sets the scale of this Item2D, causing the vertices of the item to be calculated based on a scaled percentage of the width and height.
SetScale(number newX, number newY)This action sets separate scaling values for the x and y planes on this Item2D.
SetScaleFromCenter(number scale)This action sets the scale of this Item2D, causing the vertices of the item to be calculated based on a scaled percentage of the width and height.
SetScaleFromCenter(number newX, number newY)This action sets separate scaling values for the x and y planes on this Item2D.
SetScaleX(number scaleX)This action sets the scaling value of the x plane on this Item2D.
SetScaleY(number scaleY)This action sets the scaling value of the y plane on this Item2D.
SetScreenPositionFromPhysicsPosition()This item returns the collision shape of this item.
SetSelectionBorderColor(Libraries.Game.Graphics.ColorGroup color)
SetSelectionColor(Libraries.Game.Graphics.ColorGroup color)
SetSelectionFontColor(Libraries.Game.Graphics.Color color)
SetShape(Libraries.Game.Collision.Shapes.CollisionShape2D shape)This action sets the collision shape of this item.
SetSize(number newWidth, number newHeight)This action will set the width and height of the Item2D, respectively.
SetSleepTime(number time)This action enables physics for this item.
SetTitle(text name)Set the Title of the Bar Chart.
SetTitleLabel(Libraries.Game.Graphics.Label label)This action is used by the layout to position the graphical components of the Chart.
SetTopPadding(number padding)This action returns the best suited LayoutProperties stored by the Control for use with the given container width and height.
SetTorque(number torque)This action sets the total torque on this item.
SetTransform(Libraries.Compute.Vector2 position, number angle)This action is used internally by the physics system to set the position of this item in the physics world.
SetTransform(Libraries.Game.Collision.PhysicsPosition2D transform)This action sets the position of the item in physical space.
SetTransform0(Libraries.Game.Collision.PhysicsPosition2D transform)This action sets the position of the item in physics space from the previous frame.
SetUnfocusedSelectionColor(Libraries.Game.Graphics.ColorGroup color)
SetUnmovable()This action destroys the nodes for this item for the broadphase collision, essentially removing it from the collision detection system.
SetUpdateTransform(boolean flag)This item is used to test whether a passed point is on the collision shape of this item.
SetVertex(integer index, number value)This action sets a value of one of the internal vertices of this Item2D.
SetVerticalLayoutMode(integer mode)The GetVerticalLayoutMode is used to determine how the height of a Control is calculated.
SetView2D(Libraries.Interface.Views.View2D content)The IsClipping action returns true if pixel clipping is enabled, or false if it is disabled.
SetWidth(number newWidth)This action will set the width of the Item2D.
SetWindowingAction(Libraries.Compute.Statistics.Analysis.UnivariateAction act)This sets what kind of kernel function to use to calculate the normal distributio
SetX(number setX)This action sets the X coordinate of the Item.
SetXAxis(Libraries.Game.Graphics.Drawable drawable)This action is used by the layout to position the graphical components of the Chart.
SetXAxisFontSizeOffset(number value)Sets the relative size difference in the x axis label for the chart.
SetXAxisLabels(Libraries.Containers.Array<text> label)This sets how many labels on x-ax
SetXAxisTitle(text name)Set the title for the X-Axis(Categories) of the Bar Char
SetXLabel(Libraries.Interface.Controls.ControlLabel label)This action is used by the layout to position the graphical components of the Chart.
SetY(number setY)This action sets the Y coordinate of the Item.
SetYAxis(Libraries.Game.Graphics.Drawable drawable)This action is used by the layout to position the graphical components of the Chart.
SetYAxisFontSizeOffset(number value)Sets the relative size difference in the y axis label for the chart.
SetYAxisTitle(text name)Set the title for the Y-Axis(Scale) of the Bar Char
SetYLabel(Libraries.Interface.Controls.ControlLabel label)Returns the title for the Y-Axis(Scale) of the Bar Char
SetYMax(number num)This sets the maximal value on y-ax
SetYTickCount(integer ticks)This sets how many ticks on the y-ax
SetZ(number setZ)This action sets the Z value of the Item2D.
ShouldCollide(Libraries.Interface.Item2D otherItem)get the old target global center of the obje
Show()This action is used to indicate that an Item and all Items that were added to it should be visible on the screen.
ShowLegend(boolean show)This action states to turn on the legend.
Simulate(boolean flag)This action sets the linear velocity of this item in units per second.
SynchronizeNodes()This action is used to syncronize the item's position in physics space with its position in the tree used for broadphase collision.
SynchronizeTransform()This action is used to update this items position in physics space after physics solving is finished for this item.
TestPoint(Libraries.Compute.Vector2 point)This item is used to test whether a passed point is on the collision shape of this item.
Update(number seconds)This action overrides the default Update action.
UpdateAll(number seconds)
UpdateTransformAngle()This action is used internally by the physics system to set the position of this item in the physics world.
UpdateTransformX()This action sets the position of the item in physical space.
UpdateTransformY()This action returns the position of the item in physical space.
UseGrayScale(boolean usegray)This action states to turn on the legend.

Actions Documentation

Activate(Libraries.Interface.Events.BehaviorEvent event)

The MAINTAIN_ASPECT_RATIO layout style is used to calculate one of the dimensions of the Control relative to the other dimension. For example, it can be used to ensure that the width of a Control is always 120% of the height. This style can only be used to calculate one of the two dimensions (width or height) at a time. For example, if the horizontal layout style is MAINTAIN_ASPECT_RATIO, the vertical layout style must be different, such as using the STANDARD styl

Parameters

Activate()

This action returns a default behavior for this paricular control. Some controls do nothing by default, like a TextBox that responds to different kinds of input. Others, however, have default behaviors, like a Button or a MenuItem. If there is no default behavior, this action returns undefine

Add(integer index, Libraries.Interface.Item2D newItem)

This action adds a different Item2D into this one, storing the added Item2D at a specific index in the internal array.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child
        parentItem:Add(0, chil

Parameters

Add(Libraries.Interface.Item2D newItem)

This action adds a different Item2D into this one. This makes a few things happen. 1. The added item will get this item as its parent. 2. The added item's x and y coordinates will become relative to this Item. 3. Most actions on this Item will also affect the added Item.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child
        parentItem:Add(chil

Parameters

AddBehavior(Libraries.Interface.Behaviors.Behavior behavior)

This action adds a new Behavior to this Ite

Parameters

AddControlActivationListener(Libraries.Interface.Events.ControlActivationListener listener)

The FIT_FONT layout style is used to ensure a Control's height can fit the Font used in this LayoutProperties, plus padding from the children elements. FIT_FONT is only effective for the vertical layout style, and requires that a Font is present in this LayoutPropertie

Parameters

AddFocusListener(Libraries.Interface.Events.FocusListener listener)

This action adds a FocusListener to the Item. When the Item receives a FocusEvent due to either gaining or losing the focus, the listener will be notified.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.FocusListener
        Item myItem
        FocusListener listener
        myItem:AddFocusListener(listene

Parameters

AddLayoutProperties(Libraries.Interface.Layouts.LayoutProperties properties)

Parameters

AddMouseListener(Libraries.Interface.Events.MouseListener listener)

This action adds a MouseListener to the Item. If the Item ever receives a MouseEvent due to a mouse click, the mouse listener will be notified.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.MouseListener
        Item myItem
        MouseListener listener
        myItem:AddMouseListener(listene

Parameters

AddMouseMovementListener(Libraries.Interface.Events.MouseMovementListener listener)

This action adds a MouseMovementListener to the Item. If the Item ever receives a MouseEvent due to mouse movement, the listener will be notified.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.MouseMovementListener
        Item myItem
        MouseMovementListener listener
        myItem:AddMouseMovementListener(listene

Parameters

AddMouseWheelListener(Libraries.Interface.Events.MouseWheelListener listener)

This action adds a MouseWheelListener to the Item. If the Item ever receives a MouseEvent due to the mouse wheel being scrolled, the listener will be notified.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.MouseWheelListener
        Item myItem
        MouseWheelListener listener
        myItem:AddMouseWheelListener(listene

Parameters

AddSelectionListener(Libraries.Interface.Events.SelectionListener listener)

Parameters

AddTouchListener(Libraries.Interface.Events.TouchListener listener)

This action adds a TouchListener to the Item. If the Item ever receives a TouchEvent, the listener will be notified.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.TouchListener
        Item myItem
        TouchListener listener
        myItem:AddTouchListener(listene

Parameters

AdjustForLegend()

Returns the relative size difference in the y axis label for the chart.

Advance(number time)

This action is used to advance the item forward in time in physics space to synchronize it for time of impact solving. This action is used internally and users should not need to use this action. Attribute Parameter time The amount of seconds to advance the item forward in ti

Parameters

ApplyAngularImpulse(number impulse)

This action applies an angular impulse to this item. The units are in kilogram units squared per second. This modifies the angular velocity of this item. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:ApplyAngularImpulse(8

Parameters

ApplyForce(Libraries.Compute.Vector2 force, Libraries.Compute.Vector2 point)

This action applies a force to this item at the passed point. The force is in kilogram units per second per second. The point is the screen coordinates where the point will be applied. If the point is not on the center of the item, then a torque will be introduced causing the item to rotate. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Compute.Vector2
    use Libraries.Interface.Item2D

    Item2D item
    Vector2 force
    Vector2 point

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    
    force:Set(300, 350)
    point:Set(100, 100)    // apply the force to the top right corner of the item
    
    item:ApplyForce(force, poin

Parameters

ApplyForceToCenter(Libraries.Compute.Vector2 force)

This action applies a force to this item at the center of the item. The force is in kilogram units per second per second. No torque is introduced to the item when using this action. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Compute.Vector2
    use Libraries.Interface.Item2D

    Item2D item
    Vector2 force

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    
    force:Set(300, 350)
    
    item:ApplyForce(forc

Parameters

ApplyLinearImpulse(Libraries.Compute.Vector2 impulse, Libraries.Compute.Vector2 point)

This action applies a linear impulse to this item at the passed point. The impulse is in kilogram units per second. This immeadietly modifies the linear velocity of this item. The point is the screen coordinates where the impulse will be applied. If the point is not the center of the item, then the angular velocity of this item will also be modified. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 impulse
    Vector2 point

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)

    impulse:Set(100)
    point:Set(100, 100)     // apply the impulse to the top right corner

    item:ApplyLinearImpulse(impulse, poin

Parameters

ApplyTorque(number torque)

This action applies a torque to this item. The units are kilogram units squared per second per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:ApplyTorque(35

Parameters

AreChildrenProcessingMouseEvents()

This action returns whether or not this Item is allowing its children to receive mouse events if the Item is custom drawing. If the Item isn't using custom drawing, this value is irrelevant -- children objects always receive mouse events before the parent if the parent isn't performing custom drawin

Return

boolean:

BeginCollision(Libraries.Interface.Item item)

This action is used to indicate that two items have just begun colliding. When two Items collide, the BeginCollision action should be called on both of them, with the other item passed as a parameter to the action. Note that this action does nothing by default, but classes that inherit from Item may override it.

Example Code

use Libraries.Interface.Item

        Item collider1
        Item collider2
        collider1:BeginCollision(collider2)
        collider2:BeginCollision(collider

Parameters

BeginMouseOver()

Whether or not this Control should automatically be laid out during the next Update loo

CanRotate(boolean flag)

This action gets the position of the center of this item in global (world) coordinates.

Parameters

CancelBehaviors()

This action stops all behaviors this Item is following without finishing the

ClickedMouse()

This action obtains the Input Table from this control, copies it, assigns it a group name, sets the control to use the new input table, and then adds it to the global input table hash table.

Example Code

use Libraries.Game.Game
        use Libraries.Interface.Controls.TextBox
        use Libraries.Game.InputTable

        class Main is Game
            action Main
                StartGame()
            end

            action CreateGame
                TextBox box
                InputTable copy = box:CopyAndActivateInputTable("New Group")
            end

            action Update(number seconds)
            end
        e

CollideWithChildren()

This action sets the mass, mass moment of inertia, and how the 2D item should move (via linear velocity) to be at the desired locatio

Return

boolean:

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

ComputeDistance(Libraries.Compute.Vector2 point, integer childIndex, Libraries.Compute.Vector2 normalOut)

This action computes the distance of the passed point from the collision shape attached to this item. This action is used internally and users should not need to use this action.

Parameters

Return

number: The distance of the point from the collision shape of this it

Contains(number containsX, number containsY)

This action tests if a point in global x,y coordinates is contained inside this Item2D. The global coordinates are considered to be the x and y coordinates of this Item plus its offsetX and offsetY values.

Example Code

use Libraries.Interface.Item2D

        Item2D item
        item:SetPosition(50, 50)
        item:SetWidth(100)
        item:SetHeight(50)
        boolean value = item:Contains(125, 7

Parameters

Return

boolean: Whether or not the point is contained in this Item.

ConvertToScalableVectorGraphics()

This action converts this chart to a text value that contains information for a scalable vector graphics file. This is useful for saving charts to disk. Each sub-class of chart must implement this action separately.

Return

text: the Scalable Vector Graphics (SVG) tex

CopyAndActivateInputTable(text name)

This action obtains the Input Table from this control, copies it, assigns it a group name, sets the control to use the new input table, and then adds it to the global input table hash table.

Example Code

use Libraries.Game.Game
        use Libraries.Interface.Controls.TextBox
        use Libraries.Game.InputTable

        class Main is Game
            action Main
                StartGame()
            end

            action CreateGame
                TextBox box
                InputTable copy = box:CopyAndActivateInputTable("New Group")
            end

            action Update(number seconds)
            end
        e

Parameters

Return

Libraries.Game.InputTable: the input table copy

CreateNodes(Libraries.Game.Collision.BroadphaseCollision2D broadphase, Libraries.Game.Collision.PhysicsPosition2D transform)

This action creates the nodes for this item for the broadphase collision. This action is needed in order to add the item to the collision detection system. This action is used internally and users should not need to use this action.

Parameters

DestroyNodes(Libraries.Game.Collision.BroadphaseCollision2D broadphase)

This action destroys the nodes for this item for the broadphase collision, essentially removing it from the collision detection system. This action is used internally and users should not need to use this action.

Parameters

Display(integer width, integer height)

This action creates a default Game object for displaying charts and sets this chart as the sole display. It is useful for interacting with charts without creating a complex game setu

Parameters

Display()

This action creates a default Game object for displaying charts and sets this chart as the sole display. It is useful for interacting with charts without creating a complex game setu

Dispose()

This action is used to free up any additional memory that is being used by this Item for purposes such as graphics. Note that the Item class doesn't have any extra memory that needs to be released with this action, but some classes which inherit from Item, such as Libraries.Game.Graphics.Drawable, d

DisposeAll()

This action is used to call Dispose on this Item and on the entire children hierarchy of this Ite

DisposeChildren()

This action is used to call Dispose on the entire children hierarchy of this Item. This will not call Dispose on this Ite

DisposeDrawables()

labels that is shown on the x ax

Draw(Libraries.Game.Graphics.Painter2D painter)

The Draw action is used to perform custom drawing on this Item and its children. This is only called during the Game engine's draw phase if this Item has enabled custom drawing via the SetCustomDrawing action. This is an advanced feature, and shouldn't be used by most users. If custom drawing is enabled, this action should be overriden -- if it isn't, the Item will attempt to provide default rendering for itself, its view, and its children, without regard to depth buffering. This action is responsible for instructing the provided Painter on how to draw this item, the view, and its children, and in what order to do s

Parameters

Empty()

This action will remove all items from this item's children hierarchy. Note that this will not empty the hierarchies of the contained Items.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child1
        Item2D child2
        Item2D grandchild
        parentItem:Add(child1)
        parentItem:Add(child2)
        child1:Add(grandChild)
        parentItem:Empty

EmptyAll()

This action will call Empty on the entire children hierarchy of this item, and then empty this item as wel

EmptyChildren()

This action is used to call Empty on all children contained in this item's children hierarchy. This will not empty the children of this ite

EmptySelectionListeners()

EnablePhysics(boolean flag)

This action enables physics for this item. Passing true turns on physics for this item while passing false turns off physics for this item.

Example Code

use Libraries.Game.Graphics.Drawable

    Drawable circle
    circle:LoadFilledCircle(30)
    circle:EnablePhysics(tru

Parameters

EndMouseOver()

A layout which is used to arrange the children of this objec

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

FastMoving(boolean flag)

This action gets the linear velocity of this item in units per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 velocity

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    velocity:Set(100, 0)
    item:SetLinearVelocity(velocity)

    Vector2 currentVelocity = item:GetLinearVelocity

Parameters

FinishCollision(Libraries.Interface.Item item)

This action is used to indicate that two items that were previously colliding no longer are. The FinishCollision action should be called on both Items involved, with the other item passed as a parameter to the action. Note that this action does nothing by default, but classes that inherit from Item may override it.

Example Code

use Libraries.Interface.Item

        Item collider1
        Item collider2
        collider1:FinishCollision(collider2)
        collider2:FinishCollision(collider

Parameters

FlipX()

This action will flip the Item2D across the X-axis. This flip is represented by the internal vertices of the Item2D. For classes that inherit from Item and can draw on the screen, this will flip the drawn image on the screen.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:FlipX

FlipY()

This action will flip the Item2D across the Y-axis. This flip is represented by the internal vertices of the Item2D. For classes that inherit from Item and can draw on the screen, this will flip the drawn image on the screen.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:FlipY

Focus()

This action sets focus on this Item. If the Item is not focusable, it will instead look through the parent hierarchy and set focus on the first focusable ancestor. If no focusable Item can be found, this action will have no effec

GainedFocus(Libraries.Interface.Events.FocusEvent event)

This action is fired if the item received the focu

Parameters

GainedSelection(Libraries.Interface.Controls.Charts.ChartItem ci)

This will execute when an item in violin chart gain selecti

Parameters

GainedSelection()

The LayoutProperties that were last used to define the properties of this Control. Used to indicate when graphics should be reloaded due to Layout change

GenerateInfoTree()

Creates the accessibility information for the chart are

GenerateSummary()

This is called by GenerateInfoTree to generate the summary that is heard when you first focus on the chart. Also the highest level of the information tree of the char

Return

text:

GetAccessibilityCode()

This action returns the current accessiblity code for this It

Return

integer:

GetAccessibilityType()

This action returns the name of the accessiblity code for this Item as Te

Return

text:

GetAccessibleParent()

This action returns the parent of this Item2D. An Item2D gets a parent when it is added to another Item using the Add action.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child
        parentItem:Add(child)
        Item2D item = child:GetParent

Return

Libraries.Interface.Item:

GetActivationBehavior()

This action returns a default behavior for this paricular control. Some controls do nothing by default, like a TextBox that responds to different kinds of input. Others, however, have default behaviors, like a Button or a MenuItem. If there is no default behavior, this action returns undefine

Return

Libraries.Interface.Behaviors.Behavior:

GetAngularDamping()

This action gets the inverse inertia of this item (i.e., one divided by the inertia of this item). Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetMass(20)
    number inverseInertia = item:GetInverseInertia

Return

number: The inverse inertia of this item

GetAngularVelocity()

This action gets this item's angular velocity in radians per second. Physics must be enabled in this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetAngularVelocity(0.1)
    number angularVelocity = item:GetAngularVelocity

Return

number: The angular velocity of this item in radians per second

GetBackground()

This action overrides the default Update action. If the tree needs to be updated, the tree is regenerated.

Return

Libraries.Game.Graphics.Drawable:

GetBackgroundColor()

Return

Libraries.Game.Graphics.ColorGroup:

GetBandWidth()

This returns the inteval size to calculate the normal distributio

Return

integer:

GetBorderColor()

Return

Libraries.Game.Graphics.ColorGroup:

GetBorderThickness()

Return

integer:

GetBottomPadding()

Return

number

GetBoundingBox(integer childIndex)

This action is used to get the bounding box of the item. A bounding box is an axis-alligned rectangle containing the shape used for broadphase collision. This action is used internally and users should not need to use this action.

Parameters

Return

Libraries.Game.Collision.BoundingBox2D: The bounding box of the collision shape attached to this it

GetBoundingRectangle()

This action returns a rectangle that fully encloses the four corners of the Item as it is represented by its internal vertices array. Note that the rectangle produced by this action will be larger than the actual box formed by this Item's vertices if the Item is rotated.

Example Code

use Libraries.Interface.Item2D
        use Libraries.Game.Shapes.Rectangle

        Item2D myItem
        myItem:SetBoundingBox(20, 80, 100, 100)
        Rectangle box = myItem:GetBoundingRectangle

Return

Libraries.Game.Shapes.Rectangle:

GetCenterX()

This action returns the x coordinate of the center of this Item2D.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetWidth(20)
        myItem:SetX(100)
        number x = myItem:GetCenterX

Return

number:

GetCenterY()

This action returns the y coordinate of the center of this Item2D.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetHeight(20)
        myItem:SetY(100)
        number y = myItem:GetCenterY

Return

number:

GetChartArea()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Interface.Controls.Control:

GetChartAreaHeightPercent()

Return

number

GetChartAreaWidthPercent()

Return

number

GetChartInfos()

This returns a 2D array that holds all needed informations from each violin graph. Like median, quartile, e

Return

Libraries.Containers.Array:

GetChartItems()

This pass a 2D array that holds all needed drawables from each violin grap

Return

Libraries.Containers.Array:

GetChildren()

This action gets the children of this item in an array.

Example Code

use Libraries.Interface.Item2D

    Item2D parent
    Item2D child1
    Item2D child2

    parent:Add(child1)
    parent:Add(child2)

    Array<Item2D> children = parent:GetChildren

Return

Libraries.Containers.Array: The children of this item in an array

GetClipCoordinates(Libraries.Compute.Vector2 xCoords, Libraries.Compute.Vector2 yCoords)

This action gets the clipping coordinates of this Item2D. The coordinates are returned via the two provided Vector2 parameters, the first vector storing the x values of the left and right sides of the clipping coordinates and the second vector storing the y values of the bottom and top sides. The returned boolean value indicates if this Item uses these clipping coordinates (i.e. if this Item or one of its parent Items has clipping enabled). If the clipping is valid, the action returns true. Otherwise, it returns fals

Parameters

Return

boolean:

GetCollisionGroupFlag()

This action gets the total force on this item. The units are kilogram units per second per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 force

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    force:Set(300, 350)
    item:SetForce(force)
    Vector2 totalForce = item:GetForce

Return

boolean: The total force in kilogram units per second per second

GetCollisionGroupIndex()

This action gets this item's angular velocity in radians per second. Physics must be enabled in this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetAngularVelocity(0.1)
    number angularVelocity = item:GetAngularVelocity

Return

integer: The angular velocity of this item in radians per second

GetCollisionList()

This is an action used internally to retrieve the head of the linked list of collisions with this item. This action is used internally and users should not need to use this action.

Return

Libraries.Game.Collision.CollisionEdge2D: The head of the doubly linked list of collisio

GetCurrentLayoutProperties()

This action returns the LayoutProperties that were last used to define the Control, and thus describe its current state. Note that if the Control hasn't been laid out yet, this will return undefined.

Return

Libraries.Interface.Layouts.LayoutProperties: The last LayoutProperties used to layout this Control, or undefined if it hasn't been laid out ye

GetData()

This returns an array that holds datas from each violin grap

Return

Libraries.Containers.Array:

GetDefaultFont()

This action obtains the default font for this control. This allows individual controls to customize their default font properties on a per control basis. By default, the system asks for the default system font name on a per control basis, then loads that font and returns it. Font loading is shared, so loading many fonts of the same type and size is not particularly expensive and can be done without much concern for memory requirements.

Example Code

use Libraries.Interface.Controls.TextBox
        use Libraries.Game.Graphics.Font

        TextBox box
        text name = box:GetDefaultFont()
        output na

Return

Libraries.Game.Graphics.Font:

GetDefaultFontName()

This action defines what the default font is for this control. This allows individual controls to customize their default font properties on a per control basis.

Example Code

use Libraries.Interface.Controls.TextBox

        TextBox box
        text name = box:GetDefaultFontName()
        output na

Return

text:

GetDefaultFontSize()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

integer:

GetDefaultLayoutProperties()

This action returns the default LayoutProperties used for this Control.

Return

Libraries.Interface.Layouts.LayoutProperties: The default LayoutProperties of this Contro

GetDensity()

This action applies a linear impulse to this item at the passed point. The impulse is in kilogram units per second. This immeadietly modifies the linear velocity of this item. The point is the screen coordinates where the impulse will be applied. If the point is not the center of the item, then the angular velocity of this item will also be modified. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 impulse
    Vector2 point

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)

    impulse:Set(100)
    point:Set(100, 100)     // apply the impulse to the top right corner

    item:ApplyLinearImpulse(impulse, poin

Return

number:

GetDescription()

This action returns the current internal description of the Item.

Example Code

use Libraries.Interface.Item

        Item item
        item:SetDescription("Used for demo purposes.")
        output "My item's description is : " + item:GetDescription

Return

text:

GetFocusListeners()

This action returns an Iterator containing all of the FocusListeners that have been added to this Item using the AddFocusListener action.

Return

Libraries.Containers.Iterator: An iterator containing all of the registered FocusListener

GetFont()

This action returns the Font being used by this Control. How this Font is used varies between Controls, and in some cases the Control will ignore it entirely (for example, ScrollPanes), but typically this sets the font that's used for the default label on many Controls, such as Buttons. If the Font is undefined, many Controls will omit their default label.

Return

Libraries.Game.Graphics.Font: The Font being used for this Contro

GetFontColor()

Return

Libraries.Game.Graphics.Color:

GetFontSize()

This action returns the base Font size to be used by this Control, if the Control uses a Fon

Return

integer:

GetForce()

This action gets the total force on this item. The units are kilogram units per second per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 force

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    force:Set(300, 350)
    item:SetForce(force)
    Vector2 totalForce = item:GetForce

Return

Libraries.Compute.Vector2: The total force in kilogram units per second per second

GetFriction()

This action applies a force to this item at the center of the item. The force is in kilogram units per second per second. No torque is introduced to the item when using this action. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Compute.Vector2
    use Libraries.Interface.Item2D

    Item2D item
    Vector2 force

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    
    force:Set(300, 350)
    
    item:ApplyForce(forc

Return

number:

GetGlobalX()

This action returns the Item's global x coordinate. This is the actual world coordinate that the item exists at after it has been offset by its parent's position. If this Item doesn't have a parent, and the offset hasn't been set manually, this is the same as GetX().

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffsetX(100)
        myItem:SetX(30)
        number globalX = myItem:GetGlobalX

Return

number:

GetGlobalY()

This action returns the Item's global y coordinate. This is the actual world coordinate that the item exists at after it has been offset by its parent's position. If this Item doesn't have a parent, and the offset hasn't been set manually, this is the same as GetY().

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffsetY(60)
        myItem:SetX(90)
        number globalY = myItem:GetGlobalY

Return

number:

GetGlobalZ()

This action returns the Item's global z value. For an Item2D, this simply returns the Item2D's current z valu

Return

number:

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode

Return

integer: The integer hash code of the object.

GetHeight()

This action will return the currently set height of the Item2D.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        number height = myItem:GetHeight

Return

number:

GetHorizontalLayoutMode()

The SetHorizontalLayoutMode is used to determine how the width of a Control is calculated. It should be one of the following constants: STANDARD, which will calculate the width as a set number of pixels plus a percentage of the container's width. FILL, which will make the width fill the remaining width of the container. FIT_CONTENTS, which will calculate the width to fit the children contents.

Return

integer:

GetHorizontalPanel()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Interface.Controls.Control:

GetIcon()

Return

Libraries.Game.Graphics.TextureRegion:

GetIconColor()

Return

Libraries.Game.Graphics.ColorGroup:

GetInertia()

This action gets the rotational inertia of this item. The inertia is in kilogram units squared.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetMass(20)
    number inertia = item:GetInertia

Return

number: The inertia of this item in kilogram units squared

GetInputGroup()

This action returns the input group for this Item. When used with the Game libraries, this tag describes what InputTable (if any) can interact with this Item due to input.

Example Code

use Libraries.Interface.Item

        Item item
        item:SetInputGroup("arrowKeys")
        output "My item's input group is : " + item:GetInputGroup

Return

text: The input group tag being used by this Item.

GetInputTable()

Return

Libraries.Game.InputTable:

GetInterfaceScale()

Return

number:

GetInverseInertia()

This action gets the inverse inertia of this item (i.e., one divided by the inertia of this item). Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetMass(20)
    number inverseInertia = item:GetInverseInertia

Return

number: The inverse inertia of this item

GetInverseMass()

This action gets the inverse mass of the item (i.e., one divided by the mass of this item). Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetMass(20)
    number inverseMass = item:GetInverseMass

Return

number: The inverse mass of this item

GetItem(integer index)

This action returns an Item2D that was previously added to this Item2D by finding it at the given index in the internal array of children Items.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child1
        Item2D child2
        parentItem:Add(child1)
        parentItem:Add(child2)
        Item temp = parentItem:GetItem(

Parameters

Return

Libraries.Interface.Item2D:

GetItemAt(number x, number y)

This action searches through all Items stored in this Item2D and finds the deepest Item which contains the given point in global coordinates.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child
        Item2D grandchild
        parentItem:Add(child)
        child:Add(grandchild)
        grandchild:SetHeight(100)
        grandchild:SetWidth(100)
        Item2D temp = parentItem:GetItemAt(75, 7

Parameters

Return

Libraries.Interface.Item2D: The deepest item in the children hierarchy at the given point.

GetItemCount()

This action returns the number of items contained in this Item2D.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child1
        Item2D child2
        parentItem:Add(child1)
        parentItem:Add(child2)
        integer size = parentItem:GetItemCount

Return

integer:

GetItems()

This action returns an iterator containing all the items contained in this Item2D.

Example Code

use Libraries.Interface.Item2D
        use Libraries.Containers.Iterator

        Item2D parentItem
        Item2D child1
        Item2D child2
        parentItem:Add(child1)
        parentItem:Add(child2)
        Iterator<Item2D> iterator = parentItem:GetItems

Return

Libraries.Containers.Iterator:

GetJointList()

This is an action used internally to retrieve the head of the liked list of joints connected to this item. This action is used internally and users should not need to use this action.

Return

Libraries.Game.Physics.Joints.JointEdge2D: The head of the linked list of connected join

GetLabelText()

This action returns the text used for this Control's label, if it has one.

Return

text: The text of this Control's labe

GetLayer()

This action returns the current Layer2Dthat this Item2D is a part of in the Game librarie

Return

Libraries.Game.Layer2D:

GetLayout()

Return

Libraries.Interface.Layouts.Layout

GetLayoutProperties(number containerWidth, number containerHeight)

This action returns the best suited LayoutProperties stored by the Control for use with the given container width and height. The Control will attempt to find the most restricted LayoutProperties that is still valid, prioritizing width over height in case of equal values.

Parameters

Return

Libraries.Interface.Layouts.LayoutProperties: The LayoutProperties contained in the Control that is best suited to the requested container dimension

GetLayoutProperties()

Return

Libraries.Containers.Array

GetLeftPadding()

Return

number

GetLegend()

This action returns the current legend, if one exists

Return

Libraries.Interface.Controls.Charts.Legend: true if the legend is show

GetLinearDamping()

Given the local coordinates of a vector, this action computes the screen coordinates of the corresponding vector.

Return

number: The coordinates of the corresponding global vector Attribute Example use Libraries.Interface.Item2D use Libraries.Compute.Vector2 Item2D item Vector2 localVector item:SetWidth(100) item:SetHeight(100) item:SetPosition(400, 250) localVector:Set(0, 0) // Get the coordinates of the center of the item Vector2 worldVector = item:GetWorldVector(localVecto

GetLinearVelocity()

This action gets the linear velocity of this item in units per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 velocity

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    velocity:Set(100, 0)
    item:SetLinearVelocity(velocity)

    Vector2 currentVelocity = item:GetLinearVelocity

Return

Libraries.Compute.Vector2: The vector representing the linear velocity of this item in units per second

GetLinearVelocityFromLocalPoint(Libraries.Compute.Vector2 localPoint)

Given a global point (i.e., the screen coordinates of the point), this action computes the corresponding point relative to the center of this item.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 worldPoint

    item:SetWidth(100)
    item:SetHeight(100)
    item:SetPosition(400, 350)
    
    worldPoint:Set(400, 350)    // the lower left corner of the item

    Vector2 localPoint = item:GetLocalPoint(worldPoin

Parameters

Return

Libraries.Compute.Vector2: The coordinates of the point relative to the center of this item

GetLinearVelocityFromWorldPoint(Libraries.Compute.Vector2 worldPoint)

Given the screen coordinates of a vector, this action computes the local coordinates of the vector (i.e., the coordinates of the vector relative to the center of this item)

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 worldVector

    item:SetWidth(100)
    item:SetHeight(100)
    item:SetPosition(400, 350)
    
    worldVector:Set(400, 350)    // the lower left corner of the item

    Vector2 localVector = item:GetLocalVector(worldVecto

Parameters

Return

Libraries.Compute.Vector2: The local coordinates of the corresponding vector

GetLocalCenter()

This action gets the position of the center of this item in local coordinates (i.e., with respect to itself).

Return

Libraries.Compute.Vector2: The vector representing the center of this item in local coordinat

GetLocalPoint(Libraries.Compute.Vector2 worldPoint)

Given a global point (i.e., the screen coordinates of the point), this action computes the corresponding point relative to the center of this item.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 worldPoint

    item:SetWidth(100)
    item:SetHeight(100)
    item:SetPosition(400, 350)
    
    worldPoint:Set(400, 350)    // the lower left corner of the item

    Vector2 localPoint = item:GetLocalPoint(worldPoin

Parameters

Return

Libraries.Compute.Vector2: The coordinates of the point relative to the center of this item

GetLocalVector(Libraries.Compute.Vector2 worldVector)

Given the screen coordinates of a vector, this action computes the local coordinates of the vector (i.e., the coordinates of the vector relative to the center of this item)

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 worldVector

    item:SetWidth(100)
    item:SetHeight(100)
    item:SetPosition(400, 350)
    
    worldVector:Set(400, 350)    // the lower left corner of the item

    Vector2 localVector = item:GetLocalVector(worldVecto

Parameters

Return

Libraries.Compute.Vector2: The local coordinates of the corresponding vector

GetMass(Libraries.Game.Physics.Mass2D mass)

This action is used to advance the item forward in time in physics space to synchronize it for time of impact solving. This action is used internally and users should not need to use this action. Attribute Parameter time The amount of seconds to advance the item forward in ti

Parameters

GetMass()

This action returns the mass of the item in kilograms. Physics must be enabled on this item before using this action. If the item is non-responsive or unmovable, the mass is zero.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetMass(20)
    number mass = item:GetMass

Return

number: The mass in kilograms

GetMouseListeners()

This action returns an Iterator containing all of the MouseListeners that have been added to this Item using the AddMouseListener action.

Return

Libraries.Containers.Iterator: An iterator containing all of the registered MouseListener

GetMouseMovementListeners()

This action returns an Iterator containing all of the MouseMovementListeners that have been added to this Item using the AddMouseMovementListener action.

Return

Libraries.Containers.Iterator: An iterator containing all of the registered MouseMovementListener

GetMouseWheelListeners()

This action returns an Iterator containing all of the MouseWheelListeners that have been added to this Item using the AddMouseWheelListener action.

Return

Libraries.Containers.Iterator: An iterator containing all of the registered MouseWheelListener

GetName()

This action returns the current internal name of the Item.

Example Code

use Libraries.Interface.Item

        Item item
        item:SetName("My Item")
        output "My item's name is " + item:GetName

Return

text:

GetNextFocus()

This action returns the next focus item. When this Item has the focus and the user requests the focus to advance (e.g. by pressing the tab key), the returned value is the next item to receive that focus, if it is defined. If it isn't defined, the focus can not advance from this Item.

Return

Libraries.Interface.Item: The next Item to receive focus after this on

GetNodeCount()

This action gets the number of broadphase nodes this item has. This action is used internally and users should not need to use this action.

Return

integer: The number of broadphase nodes attached to this it

GetNodes()

This action returns all of the broadphase nodes attached to this item in an array. This action is used internally and users should not need to use this action.

Return

Libraries.Containers.Array: The broadphase nodes attached to this item in an arr

GetOffsetX()

This action returns the X offset of the Item. The offset tells the Item where to relate its X position to. In other words, the X offset is where an X coordinate of 0 is for this Item. This is automatically set when using an action to add an Item to another Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffsetX(100)
        number offset = myItem:GetOffsetX

Return

number:

GetOffsetY()

This action returns the Y offset of the item. The offset tells the Item where to relate its Y position to. In other words, the Y offset is where a Y coordinate of 0 is for this item. This is automatically set when using an action to add an Item to another Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffsetY(75)
        number offset = myItem:GetOffsetY

Return

number:

GetOffsetZ()

This action returns the Z offset of the item. The offset tells the Item where to relate its Z position to. In other words, the Z offset is where a Z coordinate of 0 is for this item. This is automatically set when using an action to add an Item to another Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffsetZ(75)
        number offset = myItem:GetOffsetZ

Return

number:

GetOriginX()

This action will return the current X origin of this Item2D. By default, the origin is at the coordinates 0, 0.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetOriginCenter()
        number xOrigin = myItem:GetOriginX

Return

number:

GetOriginY()

This action will return the current Y origin of this Item2D. By default, the origin is at the coordinates 0, 0.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetOriginCenter()
        number yOrigin = myItem:GetOriginY

Return

number:

GetParent()

This action returns the parent of this Item2D. An Item2D gets a parent when it is added to another Item using the Add action.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child
        parentItem:Add(child)
        Item2D item = child:GetParent

Return

Libraries.Interface.Item2D:

GetPercentageHeight()

This action sets the x position of the Control in pixels, if the container's Layout supports it. If the Control has also been set to use a percentage of the container's width to set the x position, then the two values will be added together.

Return

number:

GetPercentageWidth()

This action sets the y position of the Control in pixels, if the container's Layout supports it. If the Control has also been set to use a percentage of the container's height to set the y position, then the two values will be added together.

Return

number:

GetPercentageX()

This action returns the x position of the Control relative to the size of its container, if the container's Layout supports it.

Return

number: The target x position as a percentage (as a value between 0.0 and 1.0) of the container's widt

GetPercentageY()

This action returns the y position of the Control relative to the size of its container, if the container's Layout supports it.

Return

number: The target y position as a percentage (as a value between 0.0 and 1.0) of the container's heigh

GetPhysicsProperties()

This action computes the distance of the passed point from the collision shape attached to this item. This action is used internally and users should not need to use this action.

Return

Libraries.Game.Physics.PhysicsProperties2D: The distance of the point from the collision shape of this it

GetPixelHeight()

This action sets the x position of the Control relative to the size of its container, if the container's Layout supports it.

Return

number:

GetPixelWidth()

This action sets the y position of the Control relative to the size of its container, if the container's Layout supports it.

Return

number:

GetPixelX()

This action returns the target x position of the Control in pixels. Note that this may not be used by some layouts (such as FlowLayout).

Return

number: The target x position of this Control in pixel

GetPixelY()

This action returns the target y position of the Control in pixels. Note that this may not be used by some layouts (such as FlowLayout).

Return

number: The target y position of this Control in pixel

GetPopupMenu()

The GetContextMenu action returns this Control's context menu, if it has one. A context menu is a PopupMenu which appears when a user wants additonal context about this Control (most commonly by right-clicking on the Control

Return

Libraries.Interface.Controls.PopupMenu:

GetPreviousFocus()

This action returns the previous focus item. When this Item has the focus and the user requests the focus to move backwards (e.g. by pressing shift & tab), the returned value is the previous item to receive that focus, if it is defined. If it isn't defined, the focus can not move backwards from this Item.

Return

Libraries.Interface.Item: The previous Item to receive focus before this on

GetPropertiesSize()

Return

integer

GetProperty(text key)

Parameters

Return

Libraries.Data.Formats.JavaScriptObjectNotation

GetPropertyKeyIterator()

Return

Libraries.Containers.Iterator

GetRawInertia()

This action is used to update this items position in physics space after physics solving is finished for this item. This action is used internally and users should not need to use this actio

Return

number:

GetResponsiveness()

This action gets the inverse mass of the item (i.e., one divided by the mass of this item). Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetMass(20)
    number inverseMass = item:GetInverseMass

Return

integer: The inverse mass of this item

GetRestitution()

This action gets the total torque on this item. The units are kilogram units squared per second per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetTorque(200)
    number totalTorque = item:GetTorque

Return

number: The total torque in kilogram units squared per second per second

GetRightPadding()

Return

number

GetRotation()

Gets the current degree of rotation of this Item.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetRotation(90)
        number rotation = myItem:GetRotation

Return

number:

GetRotationInRadians()

Gets the current rotation of this Item in radians.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetRotation(90)
        number rotation = myItem:GetRotationInRadians

Return

number:

GetScaleLabels()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Containers.Array:

GetScaleTicks()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Containers.Array:

GetScaleX()

This action will return the current x-scaling value of this Item2D. By default, the x-scaling value of an Item is 1.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:Scale(1.25)
        number scaleX = myItem:GetScaleX

Return

number:

GetScaleY()

This action will return the current y-scaling value of this Item2D. By default, the y-scaling value of an Item is 1.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:Scale(1.25)
        number scaleY = myItem:GetScaleY

Return

number:

GetScreenX()

This action returns the x coordinate of the Item on the screen. If the Item hasn't been attached to a Layer, this will return a "Not a Number" value instea

Return

number:

GetScreenY()

This action returns the y coordinate of the Item on the screen. If the Item hasn't been attached to a Layer, this will return a "Not a Number" value instea

Return

number:

GetSelection()

This action gets the ChartSelection, which contains the ChartItem that is currently selected. The reason why we use this indirection, instead of getting the items directly, is because this ensures the operating system is informed whenever selections are changed. The item can be obtained from this selection by calling GetChartItem on the selection. The selection is intended to never be undefined, even if nothing is selected.

Return

Libraries.Interface.Selections.ChartSelection: the current selecti

GetSelectionBorderColor()

Return

Libraries.Game.Graphics.ColorGroup:

GetSelectionColor()

Return

Libraries.Game.Graphics.ColorGroup:

GetSelectionFontColor()

Return

Libraries.Game.Graphics.Color:

GetSelectionListeners()

Return

Libraries.Containers.Array:

GetShape()

This item returns the collision shape of this item. The collision shape is the shape the collision system will use to test for collisions with this item. Note that this may be different from the shape drawn on the screen.

Example Code

use Libraries.Game.Drawable
    use Libraries.Game.Collision.Shapes.Circle

    Drawable ball
    ball:Load("ball.png")
    Circle circle
    circle:SetRadius(30)
    ball:SetShape(circle)
    CollisionShape2D shape = ball:GetShape

Return

Libraries.Game.Collision.Shapes.CollisionShape2D: The collision shape for this item

GetShapeType()

This action returns an integer representing the type of collision shape currently attached to this item.

Return

integer: The integer representing the type of collision shape for this it

GetSleepTime()

This action gets the children of this item in an array.

Example Code

use Libraries.Interface.Item2D

    Item2D parent
    Item2D child1
    Item2D child2

    parent:Add(child1)
    parent:Add(child2)

    Array<Item2D> children = parent:GetChildren

Return

number: The children of this item in an array

GetSweep()

This action returns the swept movement of this item used for time of impact solving for the physics system. This action is used internally and users should not need to call this action.

Return

Libraries.Game.Collision.Sweep2D: The swept motion of this it

GetTitle()

Returns the Title of the Bar Chart.

Return

text: the na

GetTitleLabel()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Game.Graphics.Label:

GetTopPadding()

Return

number

GetTorque()

This action gets the total torque on this item. The units are kilogram units squared per second per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetTorque(200)
    number totalTorque = item:GetTorque

Return

number: The total torque in kilogram units squared per second per second

GetTouchListeners()

This action returns an Iterator containing all of the TouchListeners that have been added to this Item using the AddTouchListener action.

Return

Libraries.Containers.Iterator: An iterator containing all of the registered TouchListener

GetTransform()

This action returns the position of the item in physical space. This acction is used internally and should not be used by users to get the position of this item on the screen.

Return

Libraries.Game.Collision.PhysicsPosition2D: The position and angle of this item in physics spa

GetTransform0()

This action gets the position of the item in physics space from the previous frame. This action is used internally and users should not need to use this action

Return

Libraries.Game.Collision.PhysicsPosition2D: The position and angle of the item in physics space in the previous fra

GetUnfocusedSelectionColor()

Return

Libraries.Game.Graphics.ColorGroup:

GetVertex(integer index)

This action returns a value from one of the internal vertices of this Item2D. This action is primarily for internal use, and most users will never need to use this action directl

Parameters

Return

number:

GetVerticalLayoutMode()

The GetVerticalLayoutMode is used to determine how the height of a Control is calculated. It should be one of the following constants: STANDARD, which will calculate the height as a set number of pixels plus a percentage of the container's height. FILL, which will make the height fill the remaining height of the container. FIT_CONTENTS, which will calculate the height to fit the children contents. FIT_FONT, which will fit the height of the Control to the line height of the Font set in this LayoutProperties.

Return

integer:

GetVerticalPanel()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Interface.Controls.Control:

GetVertices()

This action returns the internal vertices array of this Item2D. This action is primarily for internal use, and most users will never need to use this action directl

Return

Libraries.Containers.Number32BitArray:

GetView2D()

The SetClipping action is used to enable or disable clipping. If it is enabled, when the Item and its children are drawn as part of the QueueForDrawing action, any pixels that would be drawn outside of the unrotated dimensions of the Item are not rendered. In other words, the Item will only draw inside the exact rectangle formed by its x, y position and its width and height.

Return

Libraries.Interface.Views.View2D:

GetVisibleItemAt(number x, number y)

This action searches through all Items stored in this Item2D and finds the deepest Item which contains the given point in global coordinates. This action will only return items which are visible (that is, IsShowing() returns true).

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child
        Item2D grandchild
        parentItem:Add(child)
        child:Add(grandchild)
        grandchild:SetHeight(100)
        grandchild:SetWidth(100)
        Item2D temp = parentItem:GetVisibleItemAt(75, 7

Parameters

Return

Libraries.Interface.Item2D: The deepest visible item in the children hierarchy at the given point.

GetWidth()

This action will return the currently set width of the Item2D.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        number width = myItem:GetWidth

Return

number:

GetWindowingAction()

This gets what kind of kernel function that is used to calculate the normal distributio

Return

Libraries.Compute.Statistics.Analysis.UnivariateAction:

GetWorldCenter()

This action gets the position of the center of this item in global (world) coordinates.

Return

Libraries.Compute.Vector2: The vector representing the center of this item in global coordinat

GetWorldPoint(Libraries.Compute.Vector2 localPoint)

Given a point relative to the center of this item, this action computes and returns that point in screen coordinates.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 localPoint

    item:SetWidth(100)
    item:SetHeight(100)
    item:SetPosition(400, 250)
    
    localPoint:Set(0, 0)    // Get the coordinates of the center of the item

    Vector2 worldPoint = item:GetWorldPoint(localPoin

Parameters

Return

Libraries.Compute.Vector2: The screen coordinates of the passed local point

GetWorldVector(Libraries.Compute.Vector2 localVector)

Given the local coordinates of a vector, this action computes the screen coordinates of the corresponding vector.

Parameters

Return

Libraries.Compute.Vector2: The coordinates of the corresponding global vector Attribute Example use Libraries.Interface.Item2D use Libraries.Compute.Vector2 Item2D item Vector2 localVector item:SetWidth(100) item:SetHeight(100) item:SetPosition(400, 250) localVector:Set(0, 0) // Get the coordinates of the center of the item Vector2 worldVector = item:GetWorldVector(localVecto

GetX()

This action returns the currently set X coordinate of the Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        number value = myItem:GetX

Return

number:

GetXAxis()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Game.Graphics.Drawable:

GetXAxisFontSizeOffset()

Returns the relative size difference in the x axis label for the chart.

Return

number: the size difference compared to the base font si

GetXAxisLabels()

This returns how many labels on x-ax

Return

Libraries.Containers.Array:

GetXAxisTitle()

Returns the title for the X-Axis(Categories) of the Bar Char

Return

text:

GetXLabel()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Interface.Controls.ControlLabel:

GetXLabels()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Containers.Array:

GetXTicks()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Containers.Array:

GetY()

This action returns the currently set Y coordinate of the Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        number value = myItem:GetY

Return

number:

GetYAxis()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Game.Graphics.Drawable:

GetYAxisFontSizeOffset()

Returns the relative size difference in the y axis label for the chart.

Return

number: the size difference compared to the base font si

GetYAxisTitle()

Returns the title for the Y-Axis(Scale) of the Bar Char

Return

text:

GetYLabel()

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Return

Libraries.Interface.Controls.ControlLabel:

GetYMax()

This returns the maximal value on y-ax

Return

number:

GetYTickCount()

This retuns total number of ticks on the y-ax

Return

integer:

GetZ()

This action returns the currently set Z value of this Item2D.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        number value = myItem:GetZ

Return

number:

HasMoved()

This action returns an integer representing the type of collision shape currently attached to this item.

Return

boolean: The integer representing the type of collision shape for this it

HasProperties()

Return

boolean

HasProperty(text key)

Parameters

Return

boolean

Hide()

This action is used to indicate that an Item and all Items that were added to it should not be visible on the screen. Note that the Item class on its own cannot be drawn on the screen, but classes that inherit from it such as Libraries.Game.Graphics.Drawable can be. By default, Items are considered visible.

Example Code

use Libraries.Interface.Item

        Item item
        item:Hide

IsAcceptingMouseInput()

This action returns whether or not this Item accepts mouse input. If the value is true, this will intercept incoming mouse events, triggering any related MouseListeners and InputSets and preventing the mouse event from propagating to other Items on the Layer. The default value is true.

Return

boolean: True if this Item can receive mouse events, or false otherwis

IsAccessibleParent()

This action returns the nearest parent object that is accessible. This can be anything that the programmer wants to be accessible, from user interface components in a 2D interface to 3D components relative in 3-space on screen. By default, items have no accessible parent and are self-contained, but user interface components normally override the behavior so that controls can be logically nested within each other. attribute: returns It

Return

boolean:

IsClipping()

The IsClipping action returns true if pixel clipping is enabled, or false if it is disabled. If it is enabled, when the Item and its children are drawn as part of the QueueForDrawing action, any pixels that would be drawn outside of the unrotated dimensions of the Item are not rendered. In other words, the Item will only draw inside the exact rectangle formed by its x, y position and its width and height.

Return

boolean: Whether or not pixel clipping is enabled for this Ite

IsCollidable()

This action determines whether this item is collidable.

Example Code

use Libraries.Game.Graphics.Drawable
    
    Drawable circle
    circle:LoadFilledCircle(30)
    circle:SetCollidable(true)
    boolean result = circle:IsCollidab

Return

boolean: True if this item is collidable, false otherwise

IsCustomDrawing()

The IsCustomDrawing action returns whether or not this Item is directly managing how itself and its children are drawn. When this value is true, the Item is responsible for determining its rendering via the Draw(Painter2D) action -- if this action isn't overridden, the Item and its children won't be drawn. This is an advanced feature only necessary for complex custom components, and most users will not need to use this functionality.

Return

boolean: Whether or not this Item is currently using custom drawing rule

IsEmpty()

This action returns whether or not any items are contained in this Item.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child1
        parentItem:Add(child1)
        boolean wasEmpty = parentItem:IsEmpty

Return

boolean:

IsFastMoving()

This action sets this item's angular velocity in radians per second. Physics must be enabled in this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetAngularVelocity(0.

Return

boolean:

IsFlippedX()

This action will return if the Item2D is currently flipped across the x-axis.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:FlipX()
        boolean flip = myItem:IsFlippedX

Return

boolean:

IsFlippedY()

This action will return if the Item2D is currently flipped across the y-axis.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:FlipY()
        boolean flip = myItem:IsFlippedY

Return

boolean:

IsFocusable()

This action returns whether or not the Item can currently receive focus. This property can be set with SetFocusable(

Return

boolean:

IsFocused()

The IsFocused action determines if this Item is currently focused, returning true if it is, or false if it is no

Return

boolean:

IsGrayScale()

This action states to turn on the legend.

Return

boolean:

IsNonResponsive()

This action gets the number of broadphase nodes this item has. This action is used internally and users should not need to use this action.

Return

boolean: The number of broadphase nodes attached to this it

IsPhysicsEnabled()

This action determines whether physics is currently enabled for this item.

Example Code

use Libraries.Game.Graphics.Drawable

    Drawable circle
    circle:LoadFilledCircle(30)
    circle:EnablePhysics(true)
    boolean result = circle:IsPhysicsEnabled

Return

boolean: True if physics is enabled for this item, false otherwise

IsResponsive()

This action sets this item to be collidable. Passing true turns on collision for this item while passing false turns off collision for this item.

Example Code

use Libraries.Game.Graphics.Drawable
    
    Drawable circle
    circle:LoadFilledCircle(30)
    circle:SetCollidable(tru

Return

boolean:

IsRotationAllowed()

This action determines whether physics is currently enabled for this item.

Example Code

use Libraries.Game.Graphics.Drawable

    Drawable circle
    circle:LoadFilledCircle(30)
    circle:EnablePhysics(true)
    boolean result = circle:IsPhysicsEnabled

Return

boolean: True if physics is enabled for this item, false otherwise

IsShowing()

This action returns whether the Item is currently set to be visible on the screen.

Example Code

use Libraries.Interface.Item

        Item item
        item:Hide()
        boolean visible = item:IsShowing

Return

boolean: A boolean representing whether or not the Item is currently visible.

IsShowingLegend()

This action states to turn on the legend.

Return

boolean: true if the legend is show

IsSimulated()

This action gets the position of the center of this item in local coordinates (i.e., with respect to itself).

Return

boolean: The vector representing the center of this item in local coordinat

IsSimulationRequired()

This action sets the x-component of this item's linear velocity in units per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetLinearVelocityX(10

Return

boolean:

IsUnmovable()

This action creates the nodes for this item for the broadphase collision. This action is needed in order to add the item to the collision detection system. This action is used internally and users should not need to use this action.

Return

boolean:

LoadGraphics(Libraries.Interface.Layouts.LayoutProperties properties)

How many ticks are set along the y axis and max value on y axi

Parameters

LostFocus(Libraries.Interface.Events.FocusEvent event)

This action is fired if the item lost the focu

Parameters

LostSelection()

The default LayoutProperties, used by many controls to set their base visual information and provide default value

LostSelection(Libraries.Interface.Controls.Charts.ChartItem ci)

This will execute when an item in violin chart lose selecti

Parameters

Move(Libraries.Compute.Vector2 movement)

This action will increase the x and y coordinates of this Item by the values stored in the provided Vector2.

Example Code

use Libraries.Interface.Item2D
        use Libraries.Compute.Vector2

        Item2D myItem
        myItem:SetX(50)
        myItem:SetY(80)
        Vector2 vector
        vector:Set(25, -20)
        myItem:Move(vecto

Parameters

Move(number xAmount, number yAmount)

This action will increase the x and y coordinates of this Item by the given amounts.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetX(50)
        myItem:SetY(80)
        myItem:Move(25, -2

Parameters

MoveX(number xAmount)

This action will increase the x-coordinate of this Item by the given amount.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetX(50)
        myItem:MoveX(2

Parameters

MoveY(number yAmount)

This action will increase the y-coordinate of this Item by the given amount.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetY(50)
        myItem:MoveY(2

Parameters

MoveZ(number zAmount)

This action will increase the z-coordinate of this Item by the given amount.

Example Code

use Libraries.Interface.Item@D

        Item2D myItem
        myItem:SetZ(5)
        myItem:MoveZ(

Parameters

NeedsLayout()

This action returns whether or not the Control is in need of laying out by its container (or the parent Layer2D, if no container Control exists

Return

boolean:

NeedsTreeUpdate()

This action indicates whether the system needs its graphics updated.

Return

boolean: whether or not an update is requir

NotifyControlActivationListeners(Libraries.Interface.Events.ControlActivationEvent event)

The FILL layout style will attempt to fill the remaining width or height of the container with this Control. Note that this is only effective if the container's dimensions are already known independently of this element's size -- for example, a FILL layout can't be effectively used if the container's layout style is FIT_CONTENT

Parameters

NotifySelectionListeners(Libraries.Interface.Events.SelectionEvent event)

This action will notify all SelectionListeners which have been added to the Control of the given SelectionEvent.

Parameters

PrepareVertices()

Checks to see if the Item2D's internal vertices are up to date, and updates them if they are not. This is used primarily internally to ensure that the item's vertices are properly aligned before use, e.g. to project an image on the screen at the coordinates of the vertices. Most users will never need to use this action directl

ProcessMouseEvent(Libraries.Interface.Events.MouseEvent event)

This action takes a mouse event and handles it. It will first test to see if the mouse event took place within the bounds of this Item. If so, it will notify any MouseListeners of the event. If the event was not contained within this Item, or if there are no MouseListeners on this Item, the Item will ask its parent Item to process the mouse event, if there is a parent.

Example Code

use Libraries.Interface.Item2D
        use Libraries.Interface.Events.MouseEvent
        use Libraries.Interface.Events.MouseListener
        Item2D myItem
        MouseListener listener
        myItem:AddMouseListener(listener)
        MouseEvent event
        event:eventType = event:CLICKED_MOUSE
        myItem:ProcessMouseEvent(even

Parameters

ProcessTouchEvent(Libraries.Interface.Events.TouchEvent event)

FIX ME: Needs commen

Parameters

QueueForDrawing(Libraries.Game.Graphics.Painter2D painter)

This action is used to draw this Item on the screen, and then draw all of the Item's children hierarchy on the screen. Note that Items themselves can not be drawn, but some classes that extend the Item class, such as the Libraries.Game.Graphics.Drawable class, can be. To see how they draw, see their documentatio

Parameters

ReleasedMouse()

This action obtains the Input Table from this control, copies it, assigns it a group name, sets the control to use the new input table, and then adds it to the global input table hash table.

Example Code

use Libraries.Game.Game
        use Libraries.Interface.Controls.TextBox
        use Libraries.Game.InputTable

        class Main is Game
            action Main
                StartGame()
            end

            action CreateGame
                TextBox box
                InputTable copy = box:CopyAndActivateInputTable("New Group")
            end

            action Update(number seconds)
            end
        e

Remove(integer index)

This action adds a different Item2D into this one. This makes a few things happen. 1. The added item will get this item as its parent. 2. The added item's x and y coordinates will become relative to this Item. 3. Most actions on this Item will also affect the added Item.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child
        parentItem:Add(chil

Parameters

Return

Libraries.Interface.Item2D:

Remove(Libraries.Interface.Item2D item)

This action adds a different Item2D into this one, storing the added Item2D at a specific index in the internal array.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child
        parentItem:Add(0, chil

Parameters

Return

boolean:

RemoveControlActivationListener(Libraries.Interface.Events.ControlActivationListener listener)

The FIT_CONTENTS layout style will calculate this Control's dimensions as the combined total dimensions of its children elements. Because children elements often need to have some concrete information about the parent's dimensions, it's recommended to only use this in one of the two directions (horizontally or vertically) for the Control. For example, FlowLayouts work well with elements with a predetermined STANDARD horizontal layout style and using FIT_CONTENTS for the vertical layout styl

Parameters

RemoveFocusListener(Libraries.Interface.Events.FocusListener listener)

This action removes a FocusListener from the Item. The listener will no longer receive notification if the Item gets a FocusEvent.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.FocusListener
        Item myItem
        FocusListener listener
        myItem:AddFocusListener(listener)
        myItem:RemoveFocusListener(listene

Parameters

RemoveLayoutProperties(Libraries.Interface.Layouts.LayoutProperties properties)

Parameters

RemoveMouseListener(Libraries.Interface.Events.MouseListener listener)

This action removes a MouseListener from the Item. The listener will no longer receive notification if the Item gets a mouse click event.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.MouseListener
        Item myItem
        MouseListener listener
        myItem:AddMouseListener(listener)
        myItem:RemoveMouseListener(listene

Parameters

RemoveMouseMovementListener(Libraries.Interface.Events.MouseMovementListener listener)

This action removes a MouseMovementListener from the Item. The listener will no longer receive notification if the Item gets a mouse movement event.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.MouseMovementListener
        Item myItem
        MouseMovementListener listener
        myItem:AddMouseMovementListener(listener)
        myItem:RemoveMouseMovementListener(listene

Parameters

RemoveMouseWheelListener(Libraries.Interface.Events.MouseWheelListener listener)

This action removes a MouseWheelListener from the Item. The listener will no longer receive notification if the Item gets a mouse wheel event.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.MouseWheelListener
        Item myItem
        MouseWheelListener listener
        myItem:AddMouseWheelListener(listener)
        myItem:RemoveMouseWheelListener(listene

Parameters

RemoveSelectionListener(Libraries.Interface.Events.SelectionListener listener)

Parameters

Return

boolean:

RemoveTouchListener(Libraries.Interface.Events.TouchListener listener)

This action removes a TouchListener from the Item. The listener will no longer receive notification if the Item gets a TouchEvent.

Example Code

use Libraries.Interface.Item
        use Libraries.Interface.Events.TouchListener
        Item myItem
        TouchListener listener
        myItem:AddTouchListener(listener)
        myItem:RemoveTouchListener(listene

Parameters

RequestLayout()

This action requests that this Control should be laid out by its container (or the Layer2D if there is no containing Control) during the next Updat

RequireSimulation(boolean flag)

This action sets the y-component of this item's linear velocity in units per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetLinearVelocityY(10

Parameters

ResetLayoutFlag()

This action is used to indicate that the Control no longer needs to be laid out. This is called internally by the system as needed, and shouldn't be necessary for most user

ResetMass()

This action sets the mass, mass moment of inertia, and how the 2D item should move (via linear velocity) to be at the desired locatio

Resize()

background of chart ar

Rotate(number degrees)

Rotates this Item2D by the given number of degrees. This will also rotate all Items in the children hierarchy of this Item.

Example Code

use Libraries.Interface.Item

        Item myItem
        myItem:Rotate(6

Parameters

Save(Libraries.System.File file)

This action saves this chart to disk at the position of the current file. To conduct the conversion, the file extension is used. Only Scalable Vector Graphics (SVG) is currently supported.

Parameters

Save(text path)

This is a helper action for saving that saves at the path relative to the current working directory.

Parameters

Scale(number amount)

This action will multiply the current scaling value by the given number. A parameter of 0 or less will be ignored.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScale(1.5)
        myItem:Scale(1.

Parameters

Scale(number xAmount, number yAmount)

This action will multiply the x scaling and y scaling values, respectively, by the given numbers. A parameter of 0 or less will be ignored.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScale(1.5)
        myItem:Scale(1.1, 0.

Parameters

ScaleFromCenter(number amount)

This action will multiply the current scaling value by the given number. A parameter of 0 or less will be ignored. This action will increase or decrease the scale of the object from the center, and update the Item's x,y coordinates to reflect the new bottom-left corner of the Item.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScale(1.5)
        myItem:ScaleFromCenter(1.

Parameters

ScaleFromCenter(number xAmount, number yAmount)

This action will multiply the current scaling values of the x and y planes by the given number. A parameter of 0 or less will be ignored. This action will increase or decrease the scale of the object from the center, and update the Item's x,y coordinates to reflect the new bottom-left corner of the Item.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScale(1.5)
        myItem:ScaleFromCenter(1.1, 0.

Parameters

Select(Libraries.Interface.Controls.Charts.ChartItem item)

This action sets the ChartItem that is currently selected. This call has the same effect as calling GetSelection, then Set(ChartItem) on the selection.

Parameters

SelectByFirstLetters(text firstLetter)

This action selects an item in the Control using first letter navigation, if the Control supports it. If the Control doesn't support first letter navigation, this will do nothin

Parameters

SelectChild()

This action tells the chart to select a child in its list, if it has on

SelectNext()

This action tells the chart to select the next item in its navigation pat

SelectParent()

This action tells the chart to select the parent of the current ite

SelectPrevious()

This action tells the chart to select the previous item in its navigation pat

SetAcceptsMouseInput(boolean accepts)

This action sets whether or not this Item accepts mouse input. If set to true, this will intercept incoming mouse events, triggering any related MouseListeners and InputSets and preventing the mouse event from propagating to other Items on the Layer. The default value is true.

Parameters

SetAccessibilityCode(integer newAccessibilityCode)

This action changes the accessibility code for this Item. This should be done with care because setting the accessiblity code to the incorrect type can cause accessibility to stop functioning or, in some cases, cause the program to crash.

Parameters

SetAngularDamping(number angularDamping)

This action gets the rotational inertia of this item. The inertia is in kilogram units squared.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetMass(20)
    number inertia = item:GetInertia

Parameters

SetAngularVelocity(number angularVelocity)

This action sets this item's angular velocity in radians per second. Physics must be enabled in this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetAngularVelocity(0.

Parameters

SetBackground(Libraries.Game.Graphics.Drawable backgroundD)

This action indicates whether the system needs its graphics updated.

Parameters

SetBackgroundColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetBandWidth(integer value)

This sets the inteval size to calculate the normal distributio

Parameters

SetBorderColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetBorderThickness(integer thickness)

Parameters

SetBottomPadding(number padding)

This action returns the default LayoutProperties used for this Control.

Parameters

SetBoundingBox(number newX, number newY, number newWidth, number newHeight)

This action will set the x coordinate, y coordinate, width, and height of the Item2D, respectively.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetBoundingBox(50, 200, 100, 7

Parameters

SetCenter(number setX, number setY)

This action will set the X and Y coordinates of the Item so that the center of the Item is located at the given X, Y coordinates.

Example Code

use Libraries.Interface.Item
        Item myItem
        myItem:SetCenter(70, 4

Parameters

SetCenterX(number setX)

This action will set the X coordinate of the Item so that the center of the Item is aligned with the given X coordinate value.

Example Code

use Libraries.Interface.Item
        Item myItem
        myItem:SetCenterX(7

Parameters

SetCenterY(number setY)

This action will set the Y coordinate of the Item so that the center of the Item is aligned with the given Y coordinate value.

Example Code

use Libraries.Interface.Item
        Item myItem
        myItem:SetCenterY(6

Parameters

SetChartAreaHeightPercent(number value)

Parameters

SetChartAreaWidthPercent(number value)

Parameters

SetChartInfos(Libraries.Containers.Array<Libraries.Containers.Array<number>> info)

This pass a 2D array that holds all needed informations from each violin graph. Like median, quartile, e

Parameters

SetChildrenProcessingMouseEvents(boolean shouldProcess)

The SetChildrenProcessingMouseEvents action is used to set whether or not children items should receive mouse events if this Item is using custom drawing. This affects only custom drawing Items -- if the Item isn't drawing, children objects will always receive the mouse events first. This value is false by default. This is an advanced feature only necessary for complex custom components, and most users will not need to use thi

Parameters

SetClipCoordinates(Libraries.Game.Graphics.Painter2D painter)

This action sets the clipping coordinates of the given painter to respect the coordinates of this Item (if it's clipping) as well as any clipping being performed by parent Items. This action is called automatically by the Game engine as necessary, and most users will never need to use this action directl

Parameters

SetClipping(boolean clip)

The SetClipping action is used to enable or disable clipping. If it is enabled, when the Item and its children are drawn as part of the QueueForDrawing action, any pixels that would be drawn outside of the unrotated dimensions of the Item are not rendered. In other words, the Item will only draw inside the exact rectangle formed by its x, y position and its width and height.

Parameters

SetCollidable(boolean flag)

This action sets this item to be collidable. Passing true turns on collision for this item while passing false turns off collision for this item.

Example Code

use Libraries.Game.Graphics.Drawable
    
    Drawable circle
    circle:LoadFilledCircle(30)
    circle:SetCollidable(tru

Parameters

SetCollideWithChildren(boolean flag)

This action gets the position of the item in physics space from the previous frame. This action is used internally and users should not need to use this action

Parameters

SetCollisionGroupFlag(boolean flag)

This action sets the total torque on this item. The units are kilogram units squared per second per second. This action should be used to set the total torque on this item. If we want to apply a torque to this item, we should use the ApplyTorque actions instead. Physics must be enabled on this action before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetTorque(20

Parameters

SetCollisionGroupIndex(integer index)

This action sets the total force on this item. The units are kilogram units per second per second. This action should be used to set the total force on this item. If we want to apply a force to this item, we should use the ApplyForce actions instead. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 force

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    force:Set(300, 350)
    item:SetForce(forc

Parameters

SetCollisionList(Libraries.Game.Collision.CollisionEdge2D edge)

This is an action used internally by the physics system to keep track of the collisions with this item in a linked list structure. This action sets the head of the linked list of collisions to the passed CollisionEdge2D object. This action is used internally and users should not need to use this action.

Parameters

SetCustomDrawing(boolean isCustom)

The SetCustomDrawing action is used to indicate that this Item wants to directly manage how itself and its children are drawn. When this is set to true, the Item must be responsible for determining this rendering via the Draw(Painter2D) action -- if this action isn't overridden, the Item and its children won't be drawn. This is an advanced feature only necessary for complex custom components, and most users will not need to use this functionality.

Parameters

SetData(Libraries.Containers.Array<Libraries.Compute.Vector> data)

This pass an array that holds datas from each violin grap

Parameters

SetDensity(number density)

This action applies an angular impulse to this item. The units are in kilogram units squared per second. This modifies the angular velocity of this item. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:ApplyAngularImpulse(8

Parameters

SetDescription(text newDescription)

This action sets the internal description of the Item.

Example Code

use Libraries.Interface.Item

        Item item
        item:SetDescription("Used for demo purposes.

Parameters

SetFlipX(boolean flip)

This action will set the Item2D to be flipped across the X-axis according to the boolean. If the boolean value is false, the Item2D will be set to its unflipped state. If it is true, the Item will be set to its flipped state.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetFlipX(tru

Parameters

SetFlipY(boolean flip)

This action will set the Item2D to be flipped across the Y-axis according to the boolean. If the boolean value is false, the Item2D will be set to its unflipped state. If it is true, the Item will be set to its flipped state.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetFlipY(tru

Parameters

SetFocusable(boolean focus)

The SetFocusable action sets whether or not this Item should be focusable. If the Item is currently focused and made unfocusable, then it will lose focus, and there will be no focused elemen

Parameters

SetFont(Libraries.Game.Graphics.Font font)

This action sets the Font to be used by this Control. How this Font is used varies between Controls, and in some cases the Control will ignore it entirely (for example, ScrollPanes), but typically this sets the font that's used for the default label on many Controls, such as Buttons. If the Font is undefined, many Controls will omit their default label.

Parameters

SetFontColor(Libraries.Game.Graphics.Color color)

Parameters

SetFontSize(integer size)

This action sets the base Font size to be used by this Control, if the Control uses a Fon

Parameters

SetForce(Libraries.Compute.Vector2 force)

This action sets the total force on this item. The units are kilogram units per second per second. This action should be used to set the total force on this item. If we want to apply a force to this item, we should use the ApplyForce actions instead. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 force

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    force:Set(300, 350)
    item:SetForce(forc

Parameters

SetFriction(number friction)

This action applies a torque to this item. The units are kilogram units squared per second per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:ApplyTorque(35

Parameters

SetHasMoved(boolean flag)

This action returns the swept movement of this item used for time of impact solving for the physics system. This action is used internally and users should not need to call this action.

Parameters

SetHeight(number newHeight)

This action will set the height of the Item2D.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetHeight(7

Parameters

SetHorizontalLayoutMode(integer mode)

The SetHorizontalLayoutMode is used to determine how the width of a Control is calculated. It should be one of the following constants: STANDARD, which will calculate the width as a set number of pixels plus a percentage of the container's width. FILL, which will make the width fill the remaining width of the container. FIT_CONTENTS, which will calculate the width to fit the children contents.

Parameters

SetIcon(Libraries.Game.Graphics.TextureRegion icon)

This action sets the Icon used by this Control. Different Controls use this Icon differently, depending on their purpose.

Parameters

SetIconColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetInputGroup(text group)

This action sets the input group for this Item. When used with the Game libraries, this tag describes what InputTable (if any) can interact with this Item due to input.

Example Code

use Libraries.Interface.Item

        Item item
        item:SetInputGroup("arrowKeys")
        output "My item's input group is : " + item:GetInputGroup

Parameters

SetInterfaceScale(number scale)

Parameters

SetItem(integer index, Libraries.Interface.Item2D newItem)

This action sets a value inside the internal item array of this Item2D.

Example Code

use Libraries.Interface.Item2D

        Item2D parentItem
        Item2D child1
        Item2D child2
        parentItem:Add(child1)
        parentItem:SetItem(0, child

Parameters

SetJointList(Libraries.Game.Physics.Joints.JointEdge2D edge)

This is an action used internally by the physics system to keep track of the joints connected to this item in a linked list structure. This action sets the head of the linked list of collisions to the passed CollisionEdge2D object. This action is used internally and users should not need to use this action.

Parameters

SetLabelText(text labelText)

This action sets the text in this Control's label, if it has one.

Parameters

SetLayer(Libraries.Game.Layer2D parentLayer)

This action is used by the Game libraries to create a reference to the layer that this Item2D exists on. It is automatically called as needed by the Layer2Dclass. Most users will never need to use this action directl

Parameters

SetLayout(Libraries.Interface.Layouts.Layout layout)

Parameters

SetLeftPadding(number padding)

This action is used to load the graphical components of the Control. This is handled automatically by the Game engine as needed, and most users shouldn't need to use this action directl

Parameters

SetLegend(Libraries.Interface.Controls.Charts.Legend legend)

This action sets the Legend object

Parameters

SetLinearDamping(number linearDamping)

Given a point relative to the center of this item, this action computes and returns that point in screen coordinates.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 localPoint

    item:SetWidth(100)
    item:SetHeight(100)
    item:SetPosition(400, 250)
    
    localPoint:Set(0, 0)    // Get the coordinates of the center of the item

    Vector2 worldPoint = item:GetWorldPoint(localPoin

Parameters

SetLinearVelocity(Libraries.Compute.Vector2 linearVelocity)

This action sets the linear velocity of this item in units per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 velocity

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    velocity:Set(100, 0)
    item:SetLinearVelocity(velocit

Parameters

SetLinearVelocityX(number linearVelocityX)

This action sets the x-component of this item's linear velocity in units per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetLinearVelocityX(10

Parameters

SetLinearVelocityY(number linearVelocityY)

This action sets the y-component of this item's linear velocity in units per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetLinearVelocityY(10

Parameters

SetMass(number mass)

This action is used to syncronize the item's position in physics space with its position in the tree used for broadphase collision. This action is used internally and users should not need to use this actio

Parameters

SetMass(Libraries.Game.Physics.Mass2D mass)

This action sets the position of the item in physics space from the previous frame. This action is used internally and users should not need to use this action.

Parameters

SetName(text name)

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Parameters

SetNeedsUpdate(boolean update)

This action tells the system to update all of its graphics because its structure has changed. This might be true if the charts are being used to update a live data source.

Parameters

SetNextFocus(Libraries.Interface.Item next)

This action sets the next focus item. When this Item has the focus and the user requests the focus to advance (e.g. by pressing the tab key), the focus will move to the next focus item, if it is defined.

Parameters

SetNonResponsive()

This action returns all of the broadphase nodes attached to this item in an array. This action is used internally and users should not need to use this action.

SetOffset(number xAmount, number yAmount, number zAmount)

This action will set X, Y, and Z offsets of the item, respectively.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffset(100, 75,

Parameters

SetOffset(number xAmount, number yAmount)

This action will set both the X and Y offsets of the item, respectively.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffset(100, 7

Parameters

SetOffsetX(number xAmount)

This action sets the X offset of the Item. The offset tells the Item where to relate its X position to. In other words, the X offset is where an X coordinate of 0 is for this Item. This is automatically set when using an action to add an Item to another Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffsetX(10

Parameters

SetOffsetY(number yAmount)

This action sets the Y offset of the item. The offset tells the Item where to relate its Y position to. In other words, the Y offset is where a Y coordinate of 0 is for this item. This is automatically set when using an action to add an Item to another Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffsetY(7

Parameters

SetOffsetZ(number zAmount)

This action sets the Z offset of the item. The offset tells the Item where to relate its Z position to. In other words, the Z offset is where a Z coordinate of 0 is for this item. This is automatically set when using an action to add an Item to another Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetOffsetZ(7

Parameters

SetOrigin(number setX, number setY)

This action will set the origin of the Item to be at the given location in the Item. This is used when projecting the Item's vertices onto the screen, i.e. when determining where to draw a picture on the screen.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetOrigin(20, 2

Parameters

SetOriginCenter()

This action will set the origin of the Item to be at the current center of the Item's width and height bounds.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetSize(50, 80)
        myItem:SetOriginCenter

SetParent(Libraries.Interface.Item2D newItem)

This action sets a reference to the parent item. It is called automatically when an Item2D is added as a child to another Item2D. Most users will not need to use this action directl

Parameters

SetPercentageHeight(number height)

This action returns the target x position of the Control in pixels. Note that this may not be used by some layouts (such as FlowLayout).

Parameters

SetPercentageWidth(number width)

This action returns the target y position of the Control in pixels. Note that this may not be used by some layouts (such as FlowLayout).

Parameters

SetPercentageX(number x)

This action sets the x position of the Control relative to the size of its container, if the container's Layout supports it.

Parameters

SetPercentageY(number y)

This action sets the y position of the Control relative to the size of its container, if the container's Layout supports it.

Parameters

SetPhysicsProperties(Libraries.Game.Physics.PhysicsProperties2D properties)

This action is used to get the bounding box of the item. A bounding box is an axis-alligned rectangle containing the shape used for broadphase collision. This action is used internally and users should not need to use this action.

Parameters

SetPixelHeight(number height)

This action returns the x position of the Control relative to the size of its container, if the container's Layout supports it.

Parameters

SetPixelWidth(number width)

This action returns the y position of the Control relative to the size of its container, if the container's Layout supports it.

Parameters

SetPixelX(number x)

This action sets the x position of the Control in pixels, if the container's Layout supports it. If the Control has also been set to use a percentage of the container's width to set the x position, then the two values will be added together.

Parameters

SetPixelY(number y)

This action sets the y position of the Control in pixels, if the container's Layout supports it. If the Control has also been set to use a percentage of the container's height to set the y position, then the two values will be added together.

Parameters

SetPopupMenu(Libraries.Interface.Controls.PopupMenu menu)

The SetPopupMenu action attaches a PopupMenu to this Control, which can be opened by interacting with it (most commonly by right-clicking on the Control

Parameters

SetPosition(number setX, number setY)

This action will set both the X coordinate and the Y coordinate of the Item, in that order.

Example Code

use Libraries.Interface.Item
        Item myItem
        myItem:SetPosition(30, 7

Parameters

SetPosition(number setX, number setY, number setZ)

This action will set both the X and Y coordinates of this Item2D, and will additionally set the Z value of this Item2D.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetPosition(30, 70,

Parameters

SetPreviousFocus(Libraries.Interface.Item previous)

This action sets the previous focus item. When this Item has the focus and the user requests the focus to move backwards (e.g. by pressing shift & tab), the focus will move to the previous focus item, if it is defined.

Parameters

SetProperty(text key, Libraries.Data.Formats.JavaScriptObjectNotation value)

Parameters

SetResponsive()

This action determines whether this item is collidable.

Example Code

use Libraries.Game.Graphics.Drawable
    
    Drawable circle
    circle:LoadFilledCircle(30)
    circle:SetCollidable(true)
    boolean result = circle:IsCollidab

SetResponsiveness(integer type)

This action returns the mass of the item in kilograms. Physics must be enabled on this item before using this action. If the item is non-responsive or unmovable, the mass is zero.

Example Code

use Libraries.Interface.Item2D

    Item2D item
    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetMass(20)
    number mass = item:GetMass

Parameters

SetRestitution(number restitution)

This action applies a force to this item at the passed point. The force is in kilogram units per second per second. The point is the screen coordinates where the point will be applied. If the point is not on the center of the item, then a torque will be introduced causing the item to rotate. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Compute.Vector2
    use Libraries.Interface.Item2D

    Item2D item
    Vector2 force
    Vector2 point

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    
    force:Set(300, 350)
    point:Set(100, 100)    // apply the force to the top right corner of the item
    
    item:ApplyForce(force, poin

Parameters

SetRightPadding(number padding)

This action returns the LayoutProperties that were last used to define the Control, and thus describe its current state. Note that if the Control hasn't been laid out yet, this will return undefined.

Parameters

SetRotation(number degrees)

Sets this Item2D to be rotated to an angle of the given number of degrees. This will also rotate all Items in the children hierarchy of this Item.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetRotation(9

Parameters

SetScale(number scale)

This action sets the scale of this Item2D, causing the vertices of the item to be calculated based on a scaled percentage of the width and height. The default scaling values are 1.0, or 100% of the Item's width and height.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScale(1.2

Parameters

SetScale(number newX, number newY)

This action sets separate scaling values for the x and y planes on this Item2D. This will cause the vertices of this Item to be calculated based on a scaled percentage of the width and height. The default scaling values are 1.0, or 100% of the Item's width and height.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScale(1.5, 0.7

Parameters

SetScaleFromCenter(number scale)

This action sets the scale of this Item2D, causing the vertices of the item to be calculated based on a scaled percentage of the width and height. The default scaling values are 1.0, or 100% of the Item's width and height. This action will increase or decrease the scale of the object from the center, and update the Item's x,y coordinates to reflect the new bottom-left corner of the Item.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScaleFromCenter(1.2

Parameters

SetScaleFromCenter(number newX, number newY)

This action sets separate scaling values for the x and y planes on this Item2D. This will cause the vertices of this Item to be calculated based on a scaled percentage of the width and height. The default scaling values are 1.0, or 100% of the Item's width and height. This action will increase or decrease the scale of the object from the center, and update the Item's x,y coordinates to reflect the new bottom-left corner of the Item.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScaleFromCenter(1.5, 0.7

Parameters

SetScaleX(number scaleX)

This action sets the scaling value of the x plane on this Item2D. This will cause the vertices of this Item to be calculated based on a scaled percentage of the width. The default scaling values are 1.0, or 100% of the Item's width and height.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScaleX(1.

Parameters

SetScaleY(number scaleY)

This action sets the scaling value of the y plane on this Item2D. This will cause the vertices of this Item to be calculated based on a scaled percentage of the height. The default scaling values are 1.0, or 100% of the Item's width and height.

Example Code

use Libraries.Interface.Item2D
        
        Item2D myItem
        myItem:SetSize(100, 200)
        myItem:SetScaleY(0.7

Parameters

SetScreenPositionFromPhysicsPosition()

This item returns the collision shape of this item. The collision shape is the shape the collision system will use to test for collisions with this item. Note that this may be different from the shape drawn on the screen.

Example Code

use Libraries.Game.Drawable
    use Libraries.Game.Collision.Shapes.Circle

    Drawable ball
    ball:Load("ball.png")
    Circle circle
    circle:SetRadius(30)
    ball:SetShape(circle)
    CollisionShape2D shape = ball:GetShape

SetSelectionBorderColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetSelectionColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetSelectionFontColor(Libraries.Game.Graphics.Color color)

Parameters

SetShape(Libraries.Game.Collision.Shapes.CollisionShape2D shape)

This action sets the collision shape of this item. The collision shape is the shape the collision system will use to test for collisions with this item. Note that this may be different from the shape drawn on the screen. A copy of the passed shape is used for the collison shape for this item.

Example Code

use Libraries.Game.Drawable
    use Libraries.Game.Collision.Shapes.Circle

    Drawable ball
    ball:Load("ball.png")
    Circle circle
    circle:SetRadius(30)
    ball:SetShape(circl

Parameters

SetSize(number newWidth, number newHeight)

This action will set the width and height of the Item2D, respectively.

Example Code

use Libraries.Interface.Item2D

        Item2D myItem
        myItem:SetSize(100, 5

Parameters

SetSleepTime(number time)

This action enables physics for this item. Passing true turns on physics for this item while passing false turns off physics for this item.

Example Code

use Libraries.Game.Graphics.Drawable

    Drawable circle
    circle:LoadFilledCircle(30)
    circle:EnablePhysics(tru

Parameters

SetTitle(text name)

Set the Title of the Bar Chart.

Parameters

SetTitleLabel(Libraries.Game.Graphics.Label label)

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Parameters

SetTopPadding(number padding)

This action returns the best suited LayoutProperties stored by the Control for use with the given container width and height. The Control will attempt to find the most restricted LayoutProperties that is still valid, prioritizing width over height in case of equal values.

Parameters

SetTorque(number torque)

This action sets the total torque on this item. The units are kilogram units squared per second per second. This action should be used to set the total torque on this item. If we want to apply a torque to this item, we should use the ApplyTorque actions instead. Physics must be enabled on this action before using this action.

Example Code

use Libraries.Interface.Item2D

    Item2D item

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    item:SetTorque(20

Parameters

SetTransform(Libraries.Compute.Vector2 position, number angle)

This action is used internally by the physics system to set the position of this item in the physics world. This action is used internally and users users should not need to use this action.

Parameters

SetTransform(Libraries.Game.Collision.PhysicsPosition2D transform)

This action sets the position of the item in physical space. This action is used internally and should not be used by users to set the position of this item on the screen.

Parameters

SetTransform0(Libraries.Game.Collision.PhysicsPosition2D transform)

This action sets the position of the item in physics space from the previous frame. This action is used internally and users should not need to use this action.

Parameters

SetUnfocusedSelectionColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetUnmovable()

This action destroys the nodes for this item for the broadphase collision, essentially removing it from the collision detection system. This action is used internally and users should not need to use this action.

SetUpdateTransform(boolean flag)

This item is used to test whether a passed point is on the collision shape of this item.

Example Code

use Libraries.Interface.Drawable
    use Libraries.Compute.Vector2

    Drawable circle
    circle:LoadFilledCircle(30)
    circle:SetPosition(350, 400)
    Vector2 point
    point:Set(365, 410)
    boolean result = circle:TestPoint(poin

Parameters

SetVertex(integer index, number value)

This action sets a value of one of the internal vertices of this Item2D. This action is primarily for internal use, and most users will never need to use this action directl

Parameters

SetVerticalLayoutMode(integer mode)

The GetVerticalLayoutMode is used to determine how the height of a Control is calculated. It should be one of the following constants: STANDARD, which will calculate the height as a set number of pixels plus a percentage of the container's height. FILL, which will make the height fill the remaining height of the container. FIT_CONTENTS, which will calculate the height to fit the children contents. FIT_FONT, which will fit the height of the Control to the line height of the Font set in this LayoutProperties.

Parameters

SetView2D(Libraries.Interface.Views.View2D content)

The IsClipping action returns true if pixel clipping is enabled, or false if it is disabled. If it is enabled, when the Item and its children are drawn as part of the QueueForDrawing action, any pixels that would be drawn outside of the unrotated dimensions of the Item are not rendered. In other words, the Item will only draw inside the exact rectangle formed by its x, y position and its width and height.

Parameters

SetWidth(number newWidth)

This action will set the width of the Item2D.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetWidth(5

Parameters

SetWindowingAction(Libraries.Compute.Statistics.Analysis.UnivariateAction act)

This sets what kind of kernel function to use to calculate the normal distributio

Parameters

SetX(number setX)

This action sets the X coordinate of the Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetX(35.

Parameters

SetXAxis(Libraries.Game.Graphics.Drawable drawable)

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Parameters

SetXAxisFontSizeOffset(number value)

Sets the relative size difference in the x axis label for the chart.

Parameters

SetXAxisLabels(Libraries.Containers.Array<text> label)

This sets how many labels on x-ax

Parameters

SetXAxisTitle(text name)

Set the title for the X-Axis(Categories) of the Bar Char

Parameters

SetXLabel(Libraries.Interface.Controls.ControlLabel label)

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Parameters

SetY(number setY)

This action sets the Y coordinate of the Item.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetY(210.

Parameters

SetYAxis(Libraries.Game.Graphics.Drawable drawable)

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directl

Parameters

SetYAxisFontSizeOffset(number value)

Sets the relative size difference in the y axis label for the chart.

Parameters

SetYAxisTitle(text name)

Set the title for the Y-Axis(Scale) of the Bar Char

Parameters

SetYLabel(Libraries.Interface.Controls.ControlLabel label)

Returns the title for the Y-Axis(Scale) of the Bar Char

Parameters

SetYMax(number num)

This sets the maximal value on y-ax

Parameters

SetYTickCount(integer ticks)

This sets how many ticks on the y-ax

Parameters

SetZ(number setZ)

This action sets the Z value of the Item2D. For Item2D, the z value is used during layer sorting to determine ordering, where lower z values will be placed first.

Example Code

use Libraries.Interface.Item2D
        Item2D myItem
        myItem:SetZ(

Parameters

ShouldCollide(Libraries.Interface.Item2D otherItem)

get the old target global center of the obje

Parameters

Return

boolean:

Show()

This action is used to indicate that an Item and all Items that were added to it should be visible on the screen. Note that the Item class on its own cannot be drawn on the screen, but classes that inherit from it such as Libraries.Game.Graphics.Drawable can be. By default, Items are considered visible.

Example Code

use Libraries.Interface.Item

        Item item
        item:Show

ShowLegend(boolean show)

This action states to turn on the legend.

Parameters

Simulate(boolean flag)

This action sets the linear velocity of this item in units per second. Physics must be enabled on this item before using this action.

Example Code

use Libraries.Interface.Item2D
    use Libraries.Compute.Vector2

    Item2D item
    Vector2 velocity

    item:SetWidth(100)
    item:SetHeight(100)
    item:EnablePhysics(true)
    velocity:Set(100, 0)
    item:SetLinearVelocity(velocit

Parameters

SynchronizeNodes()

This action is used to syncronize the item's position in physics space with its position in the tree used for broadphase collision. This action is used internally and users should not need to use this actio

SynchronizeTransform()

This action is used to update this items position in physics space after physics solving is finished for this item. This action is used internally and users should not need to use this actio

TestPoint(Libraries.Compute.Vector2 point)

This item is used to test whether a passed point is on the collision shape of this item.

Example Code

use Libraries.Interface.Drawable
    use Libraries.Compute.Vector2

    Drawable circle
    circle:LoadFilledCircle(30)
    circle:SetPosition(350, 400)
    Vector2 point
    point:Set(365, 410)
    boolean result = circle:TestPoint(poin

Parameters

Return

boolean: True if the passed point is on the collisoin shape, false otherwise

Update(number seconds)

This action overrides the default Update action. If the tree needs to be updated, the tree is regenerated.

Parameters

UpdateAll(number seconds)

Parameters

UpdateTransformAngle()

This action is used internally by the physics system to set the position of this item in the physics world. This action is used internally and users users should not need to use this action.

UpdateTransformX()

This action sets the position of the item in physical space. This action is used internally and should not be used by users to set the position of this item on the screen.

UpdateTransformY()

This action returns the position of the item in physical space. This acction is used internally and should not be used by users to get the position of this item on the screen.

UseGrayScale(boolean usegray)

This action states to turn on the legend.

Parameters