Panel$Typings extension

on

Properties

alignmentFocusName String
For Panels which are elements of Spot Panels: Gets or sets the name of this Panel's element that should be used as the alignment object instead of this Panel.
getter/setter pair
columnCount num
For Panel.Table|Table Panels: This read-only property returns the number of columns. This value is only valid after the Panel has been measured.
getter/setter pair
columnSizing EnumValue
For Panel.Table|Table Panels: Gets or sets how this Panel's columns deal with extra space. Valid values are RowColumnDefinition.ProportionalExtra and RowColumnDefinition.None. The default is RowColumnDefinition.ProportionalExtra.
getter/setter pair
data ↔ dynamic
Gets or sets the optional model data to which this panel is data-bound. The data must be a JavaScript Object if this is a Part. The data can be any JavaScript value if this is a Panel created for an item in an Array that was data-bound by the #itemArray property. The default value is null.
getter/setter pair
defaultAlignment Spot
Gets or sets the default alignment spot of this Panel, used as the alignment for an element when its GraphObject#alignment value is Spot.Default. The default value is Spot.Default, which is interpreted by the Panel in whatever manner seems reasonable, depending on the Panel type.
getter/setter pair
defaultColumnSeparatorDashArray Array<num>?
For Panel.Table|Table Panels: Gets or sets the default dash array for a column's separator. RowColumnDefinition#separatorStrokeWidth can override this default value.
getter/setter pair
defaultColumnSeparatorStroke ↔ dynamic
For Panel.Table|Table Panels: Gets or sets the default stroke (color) for columns provided a given column has a nonzero RowColumnDefinition#separatorStrokeWidth. RowColumnDefinition#separatorDashArray can override this default value. The default value is null -- no line is drawn.
getter/setter pair
defaultColumnSeparatorStrokeWidth num
For Panel.Table|Table Panels: Gets or sets the default stroke width for a column's separator. RowColumnDefinition#separatorStrokeWidth can override this default value. The default value is 1. Any new value must be a real, non-negative number.
getter/setter pair
defaultRowSeparatorDashArray Array<num>?
For Panel.Table|Table Panels: Gets or sets the default dash array for a row's separator. RowColumnDefinition#separatorDashArray can override this default value.
getter/setter pair
defaultRowSeparatorStroke ↔ dynamic
For Panel.Table|Table Panels: Gets or sets the default stroke (color) for rows provided a given row has a nonzero RowColumnDefinition#separatorStrokeWidth. RowColumnDefinition#separatorStroke can override this default value. The default value is null -- no line is drawn.
getter/setter pair
defaultRowSeparatorStrokeWidth num
For Panel.Table|Table Panels: Gets or sets the default stroke width for a row's separator. RowColumnDefinition#separatorStrokeWidth can override this default value. The default value is 1. Any new value must be a real, non-negative number.
getter/setter pair
defaultSeparatorPadding Object
For Panel.Table|Table Panels: Gets or sets the additional padding for rows and columns. Padding is applied both before and after a row or column's contents.
getter/setter pair
defaultStretch EnumValue
Gets or sets the default stretch of this Panel, used as the stretch for an element when its GraphObject#stretch value is GraphObject.Default. The default value is GraphObject.Default, which typically resolves to GraphObject.None.
getter/setter pair
elements Iterator<GraphObject>
This read-only property returns an iterator over the collection of the GraphObjects that this panel manages.
getter/setter pair
graduatedMax num
For Panel.Graduated|Graduated Panels: Gets or sets the maximum value represented. Must be greater than #graduatedMin. The default is 100.
getter/setter pair
graduatedMin num
For Panel.Graduated|Graduated Panels: Gets or sets the minimum value represented. Must be less than #graduatedMax. The default is 0.
getter/setter pair
graduatedRange num
For Panel.Graduated|Graduated Panels: This read-only property returns the range of values represented by the Panel.
getter/setter pair
graduatedTickBase num
For Panel.Graduated|Graduated Panels: Gets or sets the base value which is marked with a tick. The default is 0.
getter/setter pair
graduatedTickUnit num
For Panel.Graduated|Graduated Panels: Gets or sets the difference between two consecutive values marked by ticks. Must be positive. The default is 10.
getter/setter pair
gridCellSize Size
For Panel.Grid|Grid Panels: Gets or sets the distance between lines. The units are in local coordinates. The default is 10x10. Any new width or height must be a positive real number.
getter/setter pair
gridOrigin Point
For Panel.Grid|Grid Panels: Gets or sets an origin point for the grid cells. The units are in local coordinates. The default is (0,0). Any new value must use real numbers.
getter/setter pair
isClipping bool
For Spot Panels: Gets or sets whether this Panel's main element clips instead of fills. The main element will not paint its stroke, if it has any. This assumes that the main element is a Shape.
getter/setter pair
isEnabled bool
Gets or sets whether this Panel or any GraphObject inside the panel actually responds to user click events. It may be used as a Binding target. See how this property is used in Buttons.js.
getter/setter pair
isOpposite bool
For Panel.Horizontal|Horizontal and Panel.Vertical|Vertical Panels: gets or sets whether this Panel arranges its contents from the typical side (left and top, respectively), or the opposite side (right and bottom, respectively).
getter/setter pair
itemArray Array?
Gets or sets a JavaScript Array of values or objects, each of which will be represented by a Panel as elements in this Panel. Replacing this array results all of this panel's child objects being replaced with a copy of the Panel found in #itemTemplateMap for each particular item in the Array.
getter/setter pair
itemCategoryProperty Object
Gets or sets the name of the item data property that returns a string describing that data's category, or a function that takes an item data object and returns that string; the default value is the name 'category'. This is used to distinguish between different kinds of items in the #itemArray.
getter/setter pair
itemIndex num
Gets the index of this Panel's data if it was created to represent an item in its containing Panel's Panel#itemArray. The default value is NaN.
getter/setter pair
itemTemplate Panel
Gets or sets the default Panel template used as the archetype for item data that are in #itemArray.
getter/setter pair
itemTemplateMap Map<String, Panel>?
Gets or sets a Map mapping template names to Panels. One of these Panels is copied for each item data that is in the #itemArray. Replacing this map will automatically rebuild all of the elements in this Panel.
getter/setter pair
leftIndex num
For Panel.Table|Table Panels: Gets or sets the first column that this Panel displays. The default value is 0.
getter/setter pair
padding Object
Gets or sets the space between this Panel's border and its content. Unlike GraphObject#margin, padding expands the area inside of the Panel's border. If this Panel's size is unconstrained, this will increase the size of the panel. If this Panel's size is constrained, this will decrease the total area for the Panel elements to arrange themselves.
getter/setter pair
panelLayoutState ↔ dynamic
Undocumented state for PanelLayouts
getter/setter pair
rowCount num
For Panel.Table|Table Panels: This read-only property returns the number of rows. This value is only valid after the Panel has been measured.
getter/setter pair
rowSizing EnumValue
For Panel.Table|Table Panels: Gets or sets how this Panel's rows deal with extra space. Valid values are RowColumnDefinition.ProportionalExtra and RowColumnDefinition.None. The default is RowColumnDefinition.ProportionalExtra.
getter/setter pair
topIndex num
For Panel.Table|Table Panels: Gets or sets the first row that this Panel displays. The default value is 0.
getter/setter pair
type PanelLayout
Gets or sets the type of the Panel, which controls how the Panel's elements are measured and arranged. The value must be an instance of PanelLayout. The only predefined values are listed as constant properties of Panel, including:
getter/setter pair
viewboxStretch EnumValue
For Panel.Viewbox|Viewbox Panels: Gets or sets how the panel will resize its content.
getter/setter pair

Methods

add([Iterable? elements]) Panel
Adds a number of GraphObjects to the end of this Panel's list of elements, visually in front of all of the other elements.
addColumnDefinition(num colIndex, dynamic options) Panel
For Panel.Table|Table Panels: Sets the column RowColumnDefinition given by the index. If the column definition does not exist on the Panel, this will create it. If it already exists on the Panel, this will copy the properties of the given RowColumnDefinition options onto that definition.
addRowColumnDefinition(RowColumnDefinition rowOrColumnDef) Panel
For Panel.Table|Table Panels: Sets the given RowColumnDefinition. If the row or column definition does not exist on the Panel, this will create it. If it already exists on the Panel, this will copy the properties of the given RowColumnDefinition onto that RowColumnDefinition. @since 2.3 @param {RowColumnDefinition} rowOrColumnDef the non-negative zero-based integer column index. @return {Panel} this Panel @see #addRowDefinition @see #addColumnDefinition
addRowDefinition(num rowIndex, dynamic options) Panel
For Panel.Table|Table Panels: Sets the row RowColumnDefinition given by the index. If the row definition does not exist on the Panel, this will create it. If it already exists on the Panel, this will copy the properties of the given RowColumnDefinition options onto that definition.
copy() Panel
Creates a deep copy of this Panel and returns it. @return {Panel}
copyTemplate([bool? freeze]) Panel
Make a deep copy of this Panel and allow it to be used as a template. This makes copies of Bindings, unlike the regular copy() method. Pass true as the argument in order to freeze the Bindings, allowing it to operate efficiently as a template. A false value (which is the default) allows further additions/modifications of the bindings in the copied Panel. @since 2.2 @param {boolean=} freeze whether to freeze the Bindings in the copy; default is false @return {Panel}
elt(num idx) GraphObject
Returns the GraphObject in this Panel's list of elements at the specified index. @param {number} idx @return {GraphObject}
findColumnForLocalX(num x) num
For Panel.Table|Table Panels: Returns the cell at a given x-coordinate in local coordinates, or -1 if there are no RowColumnDefinitions for this Table Panel or if the argument is negative. Call GraphObject#getLocalPoint to convert a Point in document coordinates into a Point in local coordinates.
findItemPanelForData(Object data) Panel?
Return the Panel that was made for a particular data object in this panel's #itemArray. If this returns a Panel, its #data property will be the argument data object, and its containing GraphObject#panel will be this panel. @param {Object} data must be an Object, not a string or a number or a boolean or a function @return {Panel} or null if not found @since 1.6
findMainElement() GraphObject?
Return an immediate child element whose GraphObject#isPanelMain is true, or else just return the first child element. @return {GraphObject} this may return null if there are no child elements @since 1.5
findObject(String name) GraphObject?
Search the visual tree starting at this Panel for a GraphObject whose GraphObject#name is the given name.
findRowForLocalY(num y) num
For Panel.Table|Table Panels: Returns the row at a given y-coordinate in local coordinates, or -1 if there are no RowColumnDefinitions for this Table Panel or if the argument is negative. Call GraphObject#getLocalPoint to convert a Point in document coordinates into a Point in local coordinates.
getColumnDefinition(num idx) RowColumnDefinition
For Panel.Table|Table Panels: Gets the RowColumnDefinition for a particular column. If you ask for the definition of a column at or beyond the #columnCount, it will automatically create one and return it.
getRowDefinition(num idx) RowColumnDefinition
For Panel.Table|Table Panels: Gets the RowColumnDefinition for a particular row. If you ask for the definition of a row at or beyond the #rowCount, it will automatically create one and return it.
graduatedPointForValue(num val, [Point? result]) Point
For Panel.Graduated|Graduated Panels: Returns the point that corresponds with a value, in the panel's coordinates.
graduatedValueForPoint(Point pt) num
For Panel.Graduated|Graduated Panels: Returns the value that corresponds with the given Point. The Point must be in the panel's coordinates. The value returned will be in the Graduated Panel's range.
insertAt(num index, GraphObject element) → void
Adds a GraphObject to the Panel's list of elements at the specified index.
rebuildItemElements() → void
Create and add new GraphObjects corresponding to and bound to the data in the #itemArray, after removing all existing elements from this Panel. This method is automatically called when replacing the #itemArray value, or when changing the value of #itemTemplate or #itemTemplateMap.
remove(GraphObject element) → void
Removes a GraphObject from this Panel's list of elements. @param {GraphObject} element A GraphObject.
removeAt(num idx) → void
Removes an GraphObject from this Panel's list of elements at the specified index. @param {number} idx
removeColumnDefinition(num idx) → void
For Panel.Table|Table Panels: Removes the RowColumnDefinition for a particular row.
removeRowDefinition(num idx) → void
For Panel.Table|Table Panels: Removes the RowColumnDefinition for a particular row.
updateTargetBindings([String? srcprop]) → void
Re-evaluate all data bindings on this panel, in order to assign new property values to the GraphObjects in this visual tree based on this object's #data property values.