String TMENU_IMAGES_PATH | path to arrow images |
boolean MENU_HOVER_MODE | pretty self explanitory |
int ITEM_BORDER_SIZE | indavidual MenuItems border size |
int ITEM_MARGIN_SIZE | indavidual MenuItems margin size |
int DEFAULT_ICON_SIZE | default icon size for each MenuItem |
int DEFAULT_MENU_WIDTH | every menu that's generated will have use this unless otherwise specified |
int MENU_HIDE_TIMEOUT | time (in seconds) before menus time out after inactivity. |
image _arrowD | image that points to the down arrow |
image _arrowR | image that points to the right arrow |
Constructor Summary |
MenuBar() creates the base object to build upon with MenuButtons and Menus |
Method Summary | |
void add(MenuButton button) | Adds MenuButton on this MenuBar |
void add(Menu button) | Adds what looks like another MenuButton onto this MenuBar but links off to a Menu |
void setArrowImagesPath(String path) | since v1.1: Sets the location of where to find the menus arrows (d_arrow.gif and arrow.gif) |
void loadArrowImages() | since v1.1: Should be called after setArrowImagesPath method, loads the arrow images preferred for this MenuBar |
String toString() | Returns the XHTML of this MenuBar |
Properties | |
boolean isAbsolute | whether this MenuBar is absolute positioned or placed where ever it's written |
int x | the left position of this MenuBar in the browser (only used if isAbsolute is true) |
int y | the top position of this MenuBar in the browser (only used if isAbsolute is true) |
Object[] obj | An array of Menus and MenuButtons |
String id | Since v1.1: id of this object |
img_path | since v1.1: Path to arrow images, TMENU_IMAGES_PATH is left in for version compatibility |
img_loaded | since v1.1: Loaded the preferred arrows for this object |
Constructor Summary |
MenuButton(String label, String href) creates a new MenuButton with the specified label and location to goto (href) |
MenuButton(String label, String href, String tooltip) creates a new MenuButton with the specified label, a location to goto (href) and a tooltip |
MenuButton(image imageButton, String href) creates a new MenuButton with the specified label and location to goto (href) |
MenuButton(image imageButton, String href, String tooltip) creates a new MenuButton with the specified image object, a location to goto (href) and a tooltip |
Method Summary | |
No methods |
Properties | |
Menu t | A Menu object which is used by tmenu.js |
Constructor Summary |
Menu() Constructs a new menu with an empty label. |
Menu(String buttonLabel) Constructs a new menu with the specified label. |
Menu(image buttonImage) Constructs a new menu with the specified image object |
Menu(String buttonLabel, String tooltip) Constructs a new menu with the specified label and tooltip. |
Menu(image buttonImage, String tooltip) Constructs a new menu with the specified image object and tooltip. |
Method Summary | |
void add(MenuItem item) | Add a MenuItem onto this menu |
void addSeparator() | Add a seperator onto this menu |
String getSubMenuCode() | Should only really be used from within tmenu.js |
String toString() | Returns the XHTML of this Menu |
Properties | |
int width | The width of this menu in pixels |
String tooltip | This menus tooltip, only be shown if this Menu is on the MenuBar |
Object[] items | An array of MenuItems and separators |
MenuItem[] submenus | An array of this menus submenus |
String id | The id of this menu, will only exist after the toString() method has been called |
Object image | If there's no image this property will be false, otherwise the image object itself |
Object label | If there's no label this property will be false, otherwise a String |
boolean isMenu | Whether this is a menu or not |
boolean href | Only applicable if this is a classed as a MenuButton |
image _arrowD | the image object to the down arrow |
image _arrowR | the image object to the right arrow |
Constructor Summary |
MenuItem(String label, String href) Constructs a new Menu Item with a label and a location to goto. |
MenuItem(String label, String href, String tooltip) Constructs a new Menu Item with a location to goto and a tooltip. |
MenuItem(String label, Menu submenu) Constructs a new Menu Item, which points to another Menu object (a submenu). |
MenuItem(String label, Menu submenu, String tooltip) Constructs a new Menu Item with a tooltip, which points to another Menu object (a submenu). |
Method Summary | |
void setIconImage(image icon) | Give's this Menu Item an icon |
Properties | |
String label | MenuItems label |
String tooltip | MenuItems tooltip, if it doesn't have one then this field is false |
Object action | Used by tmenu.js, will either be a Menu or a location to goto |
boolean isSub | to see if this MenuItem points to a anoter Menu |
image iconImage | this MenuItems icon, if it doesn't have one this field will be false |
boolean isSeparator | whether or not this object is a separator |
Constructor Summary |
image(String location) Creates a new image object with the mouseover and mouseclick the same as the original |
image(String location,int width,int height) Same as before except you specify the images width and height |
Method Summary | |
void setImage(String location) | sets this image object's normal image |
void setOverImage(String location) | sets this image object's image when the mouse is over it |
void setClickedImage(String location) | sets this image object's image when the mouse is down over it |
Properties | |
int w | if given at the constructor; the images width otherwise the value is false |
int h | if given at the constructor; the images height otherwise the value is false |
Image object | this image objects normal image |
Image over_object | this image objects over image |
Image clicked_object | this image objects clicked image |
boolean isImage | whether this object is an image or not |