📄 bicommand.xml
字号:
<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="api.xsl"?><class name="BiCommand" extends="BiEventTarget"> <description> Command objects can be used to make several user interface components execute the command when they are invoked. Components that use the command object will be synchronized with the properties of the command. For example, if a button has a disabled command the button will also be disabled. </description> <arguments/> <staticMethods/> <staticFields/> <methods> <method name="matchesKeyboardEvent"> <description> This method is called by the <link>ownerWindow</link> when a keypress event occurs. If the keys pressed match the <link>shortcut</link> property this returns true. </description> <arguments> <description> The keyboard event object used in the keypress event. </description> <argument name="e"> <type><link class="BiKeyboardEvent">BiKeyboardEvent</link></type> </argument> </arguments> <returns type="Boolean"/> </method> <method name="execute"> <description> Executes the command. This returns <code>false</code> if any event listener, listening to the <link>execute</link> event, prevented the default action by calling <link class="BiEvent">event</link> <link class="BiEvent" field="preventDefault">preventDefault</link>. </description> <arguments/> <returns type="Boolean"/> </method> </methods> <properties> <property name="enabled" type="Boolean" get="true" set="true"> <description> Whether the command is enabled or not </description> </property> <property name="checked" type="Boolean" get="true" set="true"> <description> The checked state of the command. This is usually used to synchronize the checked property of the components using this command (such as <link class="BiRadioButton">BiRadioButton</link>, <link class="BiCheckBox">BiCheckBox</link> and others). </description> </property> <property name="userValue" type="Object" get="true" set="true"> <description> The user value of the command. This is usually used to synchronize the user values of the components using this command (such as <link class="BiRadioGroup">BiRadioGroup</link> and <link class="BiComboBox">BiComboBox</link>). </description> </property> <property name="shortcut" type="String" get="true" set="true"> <description> The keyboard shortcut used to execute the command. The format for the shortcut is:<br/> <br/> Ctrl+Shift+Alt+k<br/> <br/> You can also use the static fields of <link class="BiKeyboardEvent">BiKeyboardEvent</link> for describing the key codes: <br/> <br/> Shift+Del </description> </property> <property name="ownerWindow" get="true"> <description> If the command has an owner window and a <link>shortcut</link> or a <link>keyCode</link> the command will be executed when the user presses the keys needed to execute the command. To set the owner window call <link field="addCommand" class="BiApplicationWindow">addCommand</link> on the window. By the default the owner window is set to the <link class="BiApplicationWindow">application window</link> upon creation. </description> <type><link class="BiApplicationWindow">BiApplicationWindow</link> / <link class="BiWindow">BiWindow</link></type> </property> <property name="keyCode" type="Number" get="true" set="true"> <description> This gives a bit more detail than the <link>shortcut</link> property because there are cases where there is no name for the key. Use <link>shortcut</link> whenever possible and fall back on keyCode when needed. If keyCode is provided only the modifiers from the <link>shortcut</link> is used. </description> </property> </properties> <events> <event name="execute"> <description> This is fired when the command is executed. </description> <type><link class="BiEvent">BiEvent</link></type> </event> <event name="enabledchanged"> <description> This is fired when the <link>enabled</link> property is changed. </description> <type><link class="BiEvent">BiEvent</link></type> </event> <event name="checkedchanged"> <description> This is fired when the <link>checked</link> property is changed. </description> <type><link class="BiEvent">BiEvent</link></type> </event> <event name="uservaluechanged"> <description> This is fired when the <link>userValue</link> property is changed. </description> <type><link class="BiEvent">BiEvent</link></type> </event> <event name="shortcutchanged"> <description> This is fired when the <link>shortcut</link> property is changed. </description> <type><link class="BiEvent">BiEvent</link></type> </event> </events> <remarks> For the shortcut to work inside an <link class="BiWindow">internal window</link> you need to add the command to the window using <link class="BiWindow" field="addCommand">addCommand</link>. </remarks></class>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -