UI constants

UIMenuConstants 

UIMenuConstant class set contants to be used in OpenKM extensions, for example to set new menu options on some existing OpenKM menu.

When menu location is not set by default is used value NEW_MENU. That means it'll be created as new menu into main menu desktop view.

Sample

Add new submenu in tools menu:

public class SubMenuMessage {
	private MenuItemExtension messageMenu;
	private MenuBarExtension subMenuMessage;
	private MenuItemExtension sendNewMessage;
 
	/**
	 * SubMenuMessage
	 */
	public SubMenuMessage() {
		// All menu items
		sendNewMessage = new MenuItemExtension("img/icon/actions/new_message.png", "New message", sendMessage);
 
		// Principal submenu
		subMenuMessage = new MenuBarExtension();
		subMenuMessage.addItem(sendNewMessage);
		messageMenu = new MenuItemExtension("img/icon/actions/message.png", "Message", subMenuMessage);
		messageMenu.setMenuLocation(UIMenuConstants.MAIN_MENU_TOOLS);
	}
 
         /**
	 * @return
	 */
	public MenuItemExtension getMenu() {
		return messageMenu;
	}
 
	/**
	 * option1Action
	 */
	Command sendMessage = new Command() {
		public void execute() {
			Window.alert("some action");
		}
	};
}

UIDesktopConstants 

Set contants to be used in OpenKM extensions to identify some desktop widgets.

Sample

if (NavigatorComunicator.getStackIndex()==UIDesktopConstants.NAVIGATOR_TAXONOMY) {
    Window.alert("Taxonomy selected");
} else {
    Window.alert("Other navigator panel selected");
}

UIDockPanelConstants 

Set contants to be used in OpenKM extensions to identify some dock panel widgets ( main widgets ).

Sample

WorkspaceComunicator.changeSelectedTab(UIDockPanelConstants.SEARCH);

UISearchConstants 

Set contants to be used in OpenKM extensions to identify some widgets on search view.

UIFileUploadConstants

Set contants to be used in OpenKM extensions to identify some operation on fileupload.