08WAB Getting Started-API reference

Source: Internet
Author: User

Css framework--jimu.js/css/jimu-theme.cssMain class
Class name Describe
Jimu-main-background Define the app's main color and apply it to the app's main UI
Jimu-main-font Apply to body tag, if you do not want to overwrite the default font, ignore it
Jimu-title Defines the font size and color to be applied to the element that displays the app title
Jimu-subtitle Defines the font size and color to apply to elements that show the app subtitle
Jimu-footer Defines the font size and color, applied to the element that shows the app footer
Jimu-link Define font size and color, apply to elements that show app links
Jimu-widget-onscreen-icon Defines the background color and border, applied to the icon element of the on-screen widget
Jimu-widget-placeholder Defines the background color and border, applied to the on-screen placeholder space
Jimu-overlay Apply to Matte Element
Widgets and Panel classes
Class name
Describe
Jumu-widget Define font size and color, apply to external containers of widgets
Jimu-widget-title Defines the font size and color that are applied to the element that displays the widget title
Jimu-widget-note Define font size and color, apply to display widget text elements
Jimu-panel Define the background and borders that apply to the outer container of the panel
Jimu-panel-title Defines the font size and color applied to the element that displays the panel title
State Class
Class name Describe
Jimu-state-hover Mouse floating Style
Jimu-state-focus Focus Get Style
Jimu-state-active Element activation style
Jimu-state-disabled element Disable Style
Jimu-state-error Element display error message style
The icon class image sprite file Jimu.js/css/sprite.png is used as follows:
Jimu-icon is a basic class of pictures, which can be appended with various picture classes
Featureactionmanager Class Usage: constructor: No constructors, use Featureactionmanager.getinstance () to get instance methods:
Method name Parameters return value Describe
Getsupportedactions (FeatureSet) FeatureSet Deferred object that handles a series of actions Get FeatureSet Support Feature collection
Getallactions No Feature Action Array Get all registered feature actions
Getactionsbywidgetid (Widgetid) Widgetid Feature Action Array Get feature actions that are included in the corresponding widget
Getactionsbyactionname (ActionName) ActionName Feature Action Array Gets multiple instances created by the system's feature action class
The Panelmanager class is used to manage a panel, such as loading a panel, changing the state of a panel, destroying the panel constructor: No constructors, and using panelmanager.getinstance () to get an instance method:
Method name Parameters return value Describe
GetInstance () No No Returns a singleton instance of a class
Showpanel (Widgetjson/groupjson) A widget or group object defined in the app's Config.json Returns a deferred object that is processed after a successful load Loading and opening a panel
Openpanel (panelid/panelinstance) The ID of the Panel or the instance object of the panel No Open a loaded panel, change panel status to open
and call the OnOpen method. If the panel is not loaded, no processing is done
Closepanel (panelid/panelinstance) The ID of the Panel or the instance object of the panel
No
Hanging wall A loaded panel, changing panel status to Closed
and call the OnClose method. If the panel is not loaded, no processing is done
Minimizepanel (panelid/panelinstance)
The ID of the Panel or the instance object of the panel
No
Minimizes a loaded panel, changing panel status to minimized
and call the Onminimize method. If the panel is not loaded, no processing is done
Maximizepanel (panelid/panelinstance)
The ID of the Panel or the instance object of the panel
No
Maximize a loaded Panel, change panel status to maximized
and call the Onmaximize method. If the panel is not loaded, no processing is done
Normalizepanel (panelid/panelinstance)
The ID of the Panel or the instance object of the panel
No Ditto Normal and Onnormalize
Getpanelbyid (Panelid) The panel's ID Panel Object Returns the Panel object of the corresponding ID, if the panel is not loaded, returns undefined
Destroypanel (Panelid/Panel)
The ID of the Panel or the instance object of the panel
No Destroys the specified panel
Destroyallpanel () No No Destroy all the panel
The Widgetmanager class is used to manage widgets, such as loading widgets, creating widgets, and destroying widget constructors: using the getinstance () method when instantiating:
Method name Parameters return value Describe
Loadwidget (Widgetjson) JSON object for widgets defined in the app's Config.json Returns a deferred object when the widget is loaded successfully resoved (widget instance) Loading and creating widgets
Getwidgetbyid (Widgetid) Widgetid Widget Instance Object Returns the Widget object indicated by the Widiget ID, if not loaded returns undefined
Getwidgetsbyname (Widgetname) Widget Name Widget array Returns the widget by name if no empty data is returned
Getwidgetmarginbox (widget) Widget Id or widget instance Widget Margin Box Object Returning the widget's margin box is useful when placing a off-panel widget in a suitable location. This method calls the SetPosition method, opens a widget, then gets the outer box of Domnode, and then closes the widget
Getwidgetbylabel (Widgetlabel) Widgetlabel Widget Instance Object Returns the widget labeled by the widget label
Getallwidgets No Widget array Returns all Widget objects
Destroyallwidgets No No Destroy all widgets.
Openwidget (widget) Widget Id or widget instance No Open a loaded widget, change the Widgte state to open and call the OnOpen method
Maxmizewidget (widget) Widget ID or widget
Instance
No
Maximize a loaded widget, change the Widgte state to maximized and call the Onmaximize method
Minimizewidget (widget) Widget ID or widget
Instance
No
Minimize a loaded widget, change the Widgte state to minimized and call the Onminimize method
Normalizewidget (widget) Widget ID or widget
Instance
No
Change the Widgte state to normal and call the Onnormalize method
Closewidget (widget) Widget ID or widget
Instance
No
Close a loaded widget, change the Widgte state to closed, and call the OnClose method
Destroywidget (widget) Widget ID or widget
Instance
No
Destroying a Widget
Tryloadwidgetconfig (Widgetjson) JSON object for widgets defined in the app's Config.json
Returns a deferred object when the widget is loaded successfully resoved (widget instance)

Loadwidgetsettingpage (Widgetjson) JSON object for widgets defined in the app's Config.json
Returns a deferred object when the widget is loaded successfully resoved (widget instance)
Load Widget's Settings page
Utils class This class contains helper methods that do not need to be instantiated using the
Method name Parameters return value Describe
Loadstylelink (Id,href,beforeid) Id:link/style's TagID
HREF: URL of the file
Beforeid: The ID of the element to insert before it, if not passed in, insert in head
Deffered object when the CSS is loaded successfully resolved Dynamically Loading CSS Files
IsEqual (O1,O2) objects or arrays that need to be compared Boolean Compares two objects or arrays for equality
Merge (Target,source) Target: Destination object or array
Source: Origin object or array
Merged object or array Merging two objects or arrays
File.readfile (FILEEVT,FILTER,MAXSIZE,CD) FILEEVT: Event Object
Filter: File type filtering, such as: image/* or image/png
MaxSize: Maximum size of file
CB: When the file is finished reading callback, there are three parameters Err,filename,filedata
No Read the file using the HTML5 API. If the HTML5 API is not supported, try to use Flash to read the file


From for notes (Wiz)

08WAB Getting Started-API reference

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.