📄 biselectionmodel.xml
字号:
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="api.xsl"?><class name="BiSelectionModel" extends="BiEventTarget"> <description>This class handles provides a basic selection model<br> </br> <br> </br> This treats <link class="BiComponent" field="children">children</link> as selectable items inside a <link class="BiComponent">component</link>. The items can be of any type but if it they are not <link class="BiComponent">BiComponents</link> you will have to override the following methods and properties: <link>first</link>, <link>last</link>, <link>items</link>, <link>getNext</link>, <link>getPrevious</link>, <link>scrollItemIntoView</link>, <link>getItemLeft</link>, <link>getItemTop</link>, <link>getItemWidth</link> and <link>getItemHeight</link>.<br> </br> <br> </br> To update the visuals (to show what is selected) override the following methods: <link>updateItemSelectionState</link>, <link>updateItemAnchorState</link> and <link>updateItemLeadState</link>.</description> <arguments> <argument name="oOwner"> <description>This is the component the selection model is handling</description> <type> <link class="BiComponent">BiComponent</link> </type> </argument> </arguments> <staticMethods> </staticMethods> <staticFields> </staticFields> <methods> <method name="getNext"> <description>Gets the item coming next after the item</description> <arguments> <argument name="oItem"> <description>The item to get the next from</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type> <link class="BiComponent">BiComponent</link>/Object</type> </returns> </method> <method name="getPrevious"> <description>Gets the item coming before after the item</description> <arguments> <argument name="oItem"> <description>The item to get the previous from</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type> <link class="BiComponent">BiComponent</link>/Object</type> </returns> </method> <method name="isBefore"> <description>Returns whether the first item is before the second item in the component.</description> <arguments> <argument name="oItem1"> <description>The item to test if before</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="oItem2"> <description>The item to test if after</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>Boolean</type> </returns> </method> <method name="isEqual"> <description>Compares two items and returns true if they are equal.</description> <arguments> <argument name="oItem1"> <description>Item one to compare</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="oItem2"> <description>Item two to compare</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>Boolean</type> </returns> </method> <method name="getItemSelected"> <description>Returns whether the item is selected or not.</description> <arguments> <argument name="oItem"> <description>The item that we want to check whether it is selected</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>Boolean</type> </returns> </method> <method name="updateItemSelectionState"> <description>This is called when the selection state of the item has changed. Override this to update the visuals to reflect the selected state.</description> <arguments> <argument name="oItem"> <description>The item to update the selected state for</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="bSelected"> <description>Whether the item is selected</description> <type>Boolean</type> </argument> </arguments> <returns> <type>void</type> </returns> </method> <method name="updateItemAnchorState"> <description>This is called when the anchor state of the item has changed. Override this to update the visuals to reflect the anchor state.</description> <arguments> <argument name="oItem"> <description>The item to update the anchor state for</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="bAnchor"> <description>Whether the item is the anchor item</description> <type>Boolean</type> </argument> </arguments> <returns> <type>void</type> </returns> </method> <method name="updateItemLeadState"> <description>This is called when the lead state of the item has changed. Override this to update the visuals to reflect the lead state.</description> <arguments> <argument name="oItem"> <description>The item to update the selected state for</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="bLead"> <description>Whether the item is the lead item</description> <type>Boolean</type> </argument> </arguments> <returns> <type>void</type> </returns> </method> <method name="scrollItemIntoView"> <description>Scrolls the owner so that the item becomes visible.</description> <arguments> <argument name="oItem"> <description>The item to scroll into view</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>void</type> </returns> </method> <method name="getItemLeft"> <description>Returns the left position of the item</description> <arguments> <argument name="oItem"> <description>The item to get the position for</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>Number</type> </returns> </method> <method name="getItemTop"> <description>Returns the top position of the item</description> <arguments> <argument name="oItem"> <description>The item to get the position for</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>Number</type> </returns> </method> <method name="getItemWidth"> <description>Returns the width of the item</description> <arguments> <argument name="oItem"> <description>The item to get the size for</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>Number</type> </returns> </method> <method name="getItemHeight"> <description>Returns the height of the item</description> <arguments> <argument name="oItem"> <description>The item to get the size for</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>Number</type> </returns> </method> <method name="setItemSelected"> <description>Sets the item as selected (or deselected) and also updates the selected items collection.</description> <arguments> <argument name="oItem"> <description>The item to select or deselect</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="bSelected"> <description>Whether to select or deselect</description> <type>Boolean</type> </argument> </arguments> <returns> <type>void</type> </returns> </method> <method name="selectAll"> <description>Selects all items</description> <arguments> </arguments> <returns> <type>void</type> </returns> </method> <method name="deselectAll"> <description>Deselects all items</description> <arguments> </arguments> <returns> <type>void</type> </returns> </method> <method name="selectItemRange"> <description>Selects the items passed as arguments and all the items between them</description> <arguments> <argument name="oItem1"> <description>The first item to select</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="oItem2"> <description>The last item to select</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> </arguments> <returns> <type>void</type> </returns> </method> <method name="handleMouseDown"> <description>This should be called when the user pressed down the mouse button on an item</description> <arguments> <argument name="oItem"> <description>The item that was pressed</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="e"> <description>The mouse event used in the mouse down event</description> <type> <link class="BiMouseEvent">BiMouseEvent</link>/Object</type> </argument> </arguments> <returns> <type>void</type> </returns> </method> <method name="handleMouseUp"> <description>This should be called when the user releases the mouse button on an item</description> <arguments> <argument name="oItem"> <description>The item that the mouse up was triggered on</description> <type> <link class="BiComponent">BiComponent</link>/Object</type> </argument> <argument name="e"> <description>The mouse event used in the mouse up event</description> <type> <link class="BiMouseEvent">BiMouseEvent</link>/Object</type> </argument>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -