All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Panel | +----MSBTree.RMenu
Warning: This documentation is only for java programmers. If you are just using the Applet in a HTML page, please read Class MSBTree.RMenuApplet.
The RMenu is a subclass of Panel. Therefore you can add it to any container in your java application. In order to create a menu you must follow these steps:
public Image backImage
background image of the menu.
public static final int EXPAND_ON_CLICK
expand nodes when the user clicks on them.
public static final int EXPAND_ON_ENTER
expand nodes when the mouse enters them.
public int expandOn
specifies how the nodes are going to be expanded. Valid values are EXPAND_ON_CLICK or EXPAND_ON_ENTER.
public int tipDelay
specifies the number of milliseconds the tree will wait before showing a tip for the current node.
public Font loadingFont
font of the text displayed to the user while definition files or applet parameters are read.
public Image loadingImage
Image to be displayed while definition files or applet parameters are read.
public String loadingText
this text will be shown to the user while definition files or applet parameters are read.
public int menuInternalMargin
space between the border of the menu and the items. The default value is 1 pixel.
public int menuType
Type of menu: MENU_VERTICAL, MENU_HORIZONTAL (see menuAligment ) and MENU_DEFINED (see userDefinedX and userDefinedY). In MENU_DEFINED the user must specify the location of the items in the applet.
public int menuAlignment
how items are going to be aligned on a horizontal menu. (ALIGN_LEFT, ALIGN_RIGHT or ALIGN_CENTER).
public String openingURLText
Text to be displyed while openning an URL.
public Color backColor
background color of the menu.
public int iconsWidth
Width of the icons. The default value is 16.
public int submenuBorder
default type of border of the nodes' submenu. Valid values are SBORDER_NO, SBORDER_LINE and SBORDER_RAISED.
public Color submenuBorderColor
default color of the border of the nodes' submenu.
public Color submenuColor
Default color of the background of the nodes' submenu.
public boolean submenuInverted
are the nodes' submenu to be inverted. An inverted submenu is display from bottom to top.
public Image submenuImage
default background image of the nodes' submenu.
public boolean showTip
If false, no tips will be displayed.
public Font tipFont
Font used to display tips.
public Color tipColor
color of the font.
public Color tipBorder
color of the border of the box used to displayed tips.
public Color tipBack
background of the box used to displayed tips.
public RNode Root
root of the menu. Menus always have a root but it is hidden.
public int leftMargin
left margin of the menu.
public int topMargin
top margin of the menu.
public Applet parentApplet
Applet (if any) in which the menu is placed. This is used to read the applet's parameters.
public Image hSeparator
separator of items in a horizontal menu.
public String defaultTarget
Target frame where URL should be openned after double-clicking a node. Valid values are:
"_self" | show in the current frame |
"_parent" | show in the parent frame |
"_top" | show in the topmost frame |
"_blank" | show in a new unnamed top-level window |
name | show in a new top-level window named name |
public int itemHeight
Height of the items in the menu. The default is 20.
public int itemWidth
Width of the items in the menu. The default is 100.
public int[] userDefinedX
x coordinates of the items for a menu of type DEFINED.
public int[] userDefinedY
y coordinates of the items for a menu of type DEFINED.
public RMenu()
public void addFirstLevelNode(RNode n)
adds the node to the root.
public void clear(RNode n)
deletes the children of the node.
public Color convertColor(String c)
converts a color parameter (as string) to a color class.
public Font convertFont(String f)
converts a font parameter (as string) to a Font class.
public void createTreeFromFile(RNode startNode, String sFile)
processes the file sfile. The nodes will be added as children of startNode.
public void createTreeFromParameters(Applet pApplet)
create the menu using the parameters of the applet.
public void expandNode(String Name, boolean expand)
Expands or collapses a node.
public RNode findNode(RNode n, String Name)
find a node by name.
public void paint(Graphics g)
public void processParameter(RNode currentNode, String ParamName, String ParamValue)
process a parameter. This method ís used to provide access to paramters from javascript.
public void refresh()
repaints the menu.
public void run()
starts the menu.
All Packages Class Hierarchy This Package Previous Next Index