API Reference 0.3.24dart_web_toolkit_uiMenuResources

MenuResources class

Default menu resources.

class MenuResources implements MenuResource {

 ImageResource _resource;

 static const String MENU_RESOURCE = "menuBarSubMenuIcon.gif";
 static const String MENU_RESOURCE_RTL = "menuBarSubMenuIcon_rtl.gif";

 MenuResources();

 Source get source {
   return null;
 }

 /**
  * An image indicating a {@link MenuItem} has an associated submenu.
  */
 ImageResource menuBarSubMenuIcon() {
   if (_resource == null) {
     // We must check is left or right based locales we using here.
     _resource = _getMenuImageResourcePrototype(MENU_RESOURCE);
   }
   return _resource;
 }

 ImageResourcePrototype _getMenuImageResourcePrototype(String name) {
   String uri = DWT.getModuleBaseURL() + "resource/images/" + name;
   ImageResourcePrototype imageResource = new ImageResourcePrototype(name, 
       UriUtils.fromTrustedString(uri), 0, 0, 5, 9, false, false);
   return imageResource;
 }
}

Implements

MenuResource

Static Properties

static const String MENU_RESOURCE = "menuBarSubMenuIcon.gif"
static const String MENU_RESOURCE_RTL = "menuBarSubMenuIcon_rtl.gif"

Constructors

new MenuResources() #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
MenuResources();

Properties

final Source source #

Source get source {
 return null;
}

Methods

An image indicating a {@link MenuItem} has an associated submenu.

ImageResource menuBarSubMenuIcon() {
 if (_resource == null) {
   // We must check is left or right based locales we using here.
   _resource = _getMenuImageResourcePrototype(MENU_RESOURCE);
 }
 return _resource;
}