com.tecnick.jddm
Class Jddm

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by com.tecnick.jddm.Jddm
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class Jddm
extends java.applet.Applet

Title: JDDM (Drop Down Menu)
Description: Applet to display pop-up menus

Copyright (c) 2002-2006 Tecnick.com S.r.l (www.tecnick.com) Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
Project homepage: http://jxhtmledit.sourceforge.net
License: http://www.gnu.org/copyleft/gpl.html GPL 2

Version:
2.1.003
Author:
Nicola Asuni [www.tecnick.com].
See Also:
Serialized Form

Nested Class Summary
(package private)  class Jddm.BuildMenu
          Build a submenu tree.
 class Jddm.MenuLoader
          MenuLoader Class.
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  java.applet.Applet a
          this applet.
private  ImageButton[] ab
          array to contain menu item elements (buttons)
private  java.awt.Font abfont
          button font
private  int button_max_height
          max button (menu item) height in pixels
private  int button_max_width
          max button (menu item) width in pixels
private static java.lang.String JDDM_VERSION
          Software version
(package private)  java.awt.event.ActionListener jumpToUrl
           
private  Jddm.MenuLoader[] loader
          array of popup menus (root menus)
private  java.awt.PopupMenu[] m
          array to contain submenus
private  int num_buttons
          number of buttons
private  java.lang.String[] p_arrow_img_off
          arrow image for mouse-off state
private  java.lang.String[] p_arrow_img_on
          arrow image for mouse-on state
private  java.lang.String[] p_arrow_img_over
          arrow image for mouse-over state
private  int p_arrow_position
          arrow position (LEFT or RIGHT)
private  java.awt.Color p_background_col
          applet background color
private  java.lang.String[] p_bck_img_off
          button image for mouse-off status
private  java.lang.String[] p_bck_img_on
          button image for mouse-click status
private  java.lang.String[] p_bck_img_over
          button image for mouse-over status
private  int[] p_border_width
          button bevel width (0 = no bevel)
private  boolean[] p_center_block
          if true center the block (image+label) on the button
private  java.awt.Color[] p_colbck_off
          button off background color
private  java.awt.Color[] p_colbck_on
          button on background color
private  java.awt.Color[] p_colbck_over
          button over background color
private  java.awt.Color[] p_colsdw_off
          button off text shadow color
private  java.awt.Color[] p_colsdw_on
          button on text shadow color
private  java.awt.Color[] p_colsdw_over
          button over text shadow color
private  java.awt.Color[] p_coltxt_off
          button off text color
private  java.awt.Color[] p_coltxt_on
          button on text color
private  java.awt.Color[] p_coltxt_over
          button over text color
private  java.lang.String p_data_file
          url of text file containing menu data (alternative to parameters)
private  java.lang.String p_default_arrow_img_off
          image for arrow indicating submenu
private  java.lang.String p_default_arrow_img_on
          image for arrow indicating submenu
private  java.lang.String p_default_arrow_img_over
          image for arrow indicating submenu
private  java.lang.String p_default_bck_img_off
          button image for off status
private  java.lang.String p_default_bck_img_on
          button image for mouse-click status
private  java.lang.String p_default_bck_img_over
          button image for mouse-over status
private  int p_default_border_width
          button bevel width (0 = no bevel)
private  boolean p_default_center_block
          if true center the block (image+label) on the button
private  java.awt.Color p_default_colbck_off
          button off background color
private  java.awt.Color p_default_colbck_on
          button on background color
private  java.awt.Color p_default_colbck_over
          button over background color
private  java.awt.Color p_default_colsdw_off
          button off text shadow color
private  java.awt.Color p_default_colsdw_on
          button on text shadow color
private  java.awt.Color p_default_colsdw_over
          button over text shadow color
private  java.awt.Color p_default_coltxt_off
          button off text color
private  java.awt.Color p_default_coltxt_on
          button on text color
private  java.awt.Color p_default_coltxt_over
          button over text color
private  java.lang.String p_default_encoding
          charset encoding
private  int p_default_gap
          distance between button objects (image, label and arrow)
private  int p_default_hmargin
          default horizontal margin between buttons
private  java.lang.String p_default_icon_off
          button image icon off status
private  java.lang.String p_default_icon_on
          button image icon on status
private  java.lang.String p_default_icon_over
          button image icon over status
private  int p_default_label_position
          label position respect the image (LEFT, RIGHT, TOP, BOTTOM)
private  java.lang.String p_default_main_font
          button font name
private  int p_default_main_font_size
          font size
private  int p_default_main_font_style
          button style (PLAIN, BOLD, ITALIC, BOLD+ITALIC)
private  int[] p_default_padding
          array of button paddings (Left, Right, Top, Bottom) pixels between button border and first element (image or label)
private  boolean p_default_pushed
          if true enable button pushed status
private  int p_default_shadow_x
          text shadow relative horizontal position
private  int p_default_shadow_y
          text shadow relative vertical position
private  java.lang.String p_default_sound_click
          mouse click button sound
private  java.lang.String p_default_sound_over
          mouse over button sound
private  java.lang.String p_default_submenu_font
          sub menu item font name
private  int p_default_submenu_font_size
          font size
private  int p_default_submenu_font_style
          sub menu item font style (PLAIN, BOLD, ITALIC, BOLD+ITALIC)
private  java.lang.String p_default_target
          default frame target
private  int p_default_vmargin
          default vertical margin between buttons
private  java.lang.String[] p_description
          menu item description
private  java.lang.String p_disabled_msg
          default disabled message
private  boolean[] p_enabled
          true if menu item is enabled
private  java.lang.String[] p_encoding
          menu item charset encoding
private  java.lang.String[] p_font
          button font name
private  int[] p_font_size
          font size in pixels
private  int[] p_font_style
          button style (PLAIN, BOLD, ITALIC, BOLD+ITALIC)
private  int[] p_gap
          distance in pixels between button objects (image, label and arrow)
private  boolean p_horizontal
          true if menu is horizontal
private  java.lang.String[] p_icon_off
          button image icon off status
private  java.lang.String[] p_icon_on
          button image icon on status
private  java.lang.String[] p_icon_over
          button image icon over status
private  int[] p_id
           
private  int[] p_label_position
          label position respect the image (LEFT, RIGHT, TOP, BOTTOM)
private  java.lang.String[] p_link
          menu link
private  java.lang.String[] p_name
          menu item name
private  boolean[] p_node
          true if menu item is a node
private  int[][] p_padding
          array of button paddings (Left, Right, Top, Bottom) pixels between left button border and first element (image or label)
private  java.lang.String p_page_encoding
          html page encoding
private  int p_popup_position
          popup menu position (respect the button) (LEFT, RIGHT, TOP, BOTTOM)
private  boolean[] p_pushed
          if true enable button pushed status
private  int[] p_shadow_x
          text shadow relative horizontal position
private  int[] p_shadow_y
          text shadow relative vertical position
private  java.lang.String[] p_shortcut
          keyboard shortcut to activate button (e.g: SHIFT+A)
private  java.lang.String[] p_sound_click
          mouse click button sound
private  java.lang.String[] p_sound_over
          mouse over button sound
private  int[] p_subid
          menu parent id (id of node)
private  java.lang.String[] p_target
          name of the frame target
private static long serialVersionUID
          serialVersionUID
private  java.awt.Font subfont
          submenu font
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Jddm()
          Applet constructor (void)
 
Method Summary
private  int countButtons()
          Count the number of buttons
 void destroy()
          Destroy the applet
private  void displayPopup(int id)
          display the button submenu popup
private  void drawButton(int id)
          Draw the item button.
 java.lang.String getAppletInfo()
          Get Applet information.
private  java.lang.String getDefaultValue(java.lang.String str, java.lang.String def)
          Return "def" if "str" is null or empty.
private  java.lang.String getEncodedString(java.lang.String original, java.lang.String encoding_in, java.lang.String encoding_out)
          Convert string to specified encoding.
private  int getFontStyleCode(java.lang.String stylename)
          return the int associated to font style
private  java.lang.String getParameter(java.lang.String key, java.lang.String def)
          Get applet parameter value, return default if void.
private  void getParameters()
          Get the applet parameters from HTML page.
private  int getPositionCode(java.lang.String posname)
          Return the int associated to string position name.
 void init()
          Initialize the applet
private  void insertButton(int id, int realid)
          Add specified button to menu.
private  void jbInit()
          Component initialization
private  java.awt.Image loadImage(java.applet.Applet a, java.net.URL file)
          Load an image.
private  void readMenuDataFile(java.lang.String filename)
          Read menu items data from external text file.
private  void setMenuItemSize(int i)
          Set arrays sizes
private  java.net.URL setURL(java.lang.String link)
          Computes full, canonical URL from a relative specification.
private  java.lang.String[] splitData(java.lang.String input_string, char sep_ch, int size)
          Split a string in array of predefined size.
 void start()
          Start the applet
 void stop()
          Stop the applet
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
serialVersionUID

See Also:
Constant Field Values

JDDM_VERSION

private static final java.lang.String JDDM_VERSION
Software version

See Also:
Constant Field Values

ab

private ImageButton[] ab
array to contain menu item elements (buttons)


m

private java.awt.PopupMenu[] m
array to contain submenus


loader

private Jddm.MenuLoader[] loader
array of popup menus (root menus)


a

private final java.applet.Applet a
this applet. (only final variables can be used in inner anonymous classes)


num_buttons

private int num_buttons
number of buttons


button_max_width

private int button_max_width
max button (menu item) width in pixels


button_max_height

private int button_max_height
max button (menu item) height in pixels


abfont

private java.awt.Font abfont
button font


subfont

private java.awt.Font subfont
submenu font


p_horizontal

private boolean p_horizontal
true if menu is horizontal


p_arrow_position

private int p_arrow_position
arrow position (LEFT or RIGHT)


p_popup_position

private int p_popup_position
popup menu position (respect the button) (LEFT, RIGHT, TOP, BOTTOM)


p_default_padding

private int[] p_default_padding
array of button paddings (Left, Right, Top, Bottom) pixels between button border and first element (image or label)


p_default_vmargin

private int p_default_vmargin
default vertical margin between buttons

Since:
2.1.000

p_default_hmargin

private int p_default_hmargin
default horizontal margin between buttons

Since:
2.1.000

p_default_gap

private int p_default_gap
distance between button objects (image, label and arrow)


p_default_pushed

private boolean p_default_pushed
if true enable button pushed status


p_default_label_position

private int p_default_label_position
label position respect the image (LEFT, RIGHT, TOP, BOTTOM)


p_default_center_block

private boolean p_default_center_block
if true center the block (image+label) on the button


p_default_border_width

private int p_default_border_width
button bevel width (0 = no bevel)


p_default_target

private java.lang.String p_default_target
default frame target


p_disabled_msg

private java.lang.String p_disabled_msg
default disabled message


p_background_col

private java.awt.Color p_background_col
applet background color


p_default_colbck_off

private java.awt.Color p_default_colbck_off
button off background color


p_default_colbck_over

private java.awt.Color p_default_colbck_over
button over background color


p_default_colbck_on

private java.awt.Color p_default_colbck_on
button on background color


p_default_coltxt_off

private java.awt.Color p_default_coltxt_off
button off text color


p_default_coltxt_over

private java.awt.Color p_default_coltxt_over
button over text color


p_default_coltxt_on

private java.awt.Color p_default_coltxt_on
button on text color


p_default_colsdw_off

private java.awt.Color p_default_colsdw_off
button off text shadow color


p_default_colsdw_over

private java.awt.Color p_default_colsdw_over
button over text shadow color


p_default_colsdw_on

private java.awt.Color p_default_colsdw_on
button on text shadow color


p_default_shadow_x

private int p_default_shadow_x
text shadow relative horizontal position


p_default_shadow_y

private int p_default_shadow_y
text shadow relative vertical position


p_default_arrow_img_off

private java.lang.String p_default_arrow_img_off
image for arrow indicating submenu


p_default_arrow_img_over

private java.lang.String p_default_arrow_img_over
image for arrow indicating submenu


p_default_arrow_img_on

private java.lang.String p_default_arrow_img_on
image for arrow indicating submenu


p_default_bck_img_off

private java.lang.String p_default_bck_img_off
button image for off status


p_default_bck_img_over

private java.lang.String p_default_bck_img_over
button image for mouse-over status


p_default_bck_img_on

private java.lang.String p_default_bck_img_on
button image for mouse-click status


p_default_icon_off

private java.lang.String p_default_icon_off
button image icon off status


p_default_icon_over

private java.lang.String p_default_icon_over
button image icon over status


p_default_icon_on

private java.lang.String p_default_icon_on
button image icon on status


p_default_main_font

private java.lang.String p_default_main_font
button font name


p_default_main_font_style

private int p_default_main_font_style
button style (PLAIN, BOLD, ITALIC, BOLD+ITALIC)


p_default_main_font_size

private int p_default_main_font_size
font size


p_default_submenu_font

private java.lang.String p_default_submenu_font
sub menu item font name


p_default_submenu_font_style

private int p_default_submenu_font_style
sub menu item font style (PLAIN, BOLD, ITALIC, BOLD+ITALIC)


p_default_submenu_font_size

private int p_default_submenu_font_size
font size


p_default_encoding

private java.lang.String p_default_encoding
charset encoding


p_page_encoding

private java.lang.String p_page_encoding
html page encoding


p_default_sound_over

private java.lang.String p_default_sound_over
mouse over button sound


p_default_sound_click

private java.lang.String p_default_sound_click
mouse click button sound


p_data_file

private java.lang.String p_data_file
url of text file containing menu data (alternative to parameters)


p_id

private int[] p_id

p_subid

private int[] p_subid
menu parent id (id of node)


p_node

private boolean[] p_node
true if menu item is a node


p_enabled

private boolean[] p_enabled
true if menu item is enabled


p_link

private java.lang.String[] p_link
menu link


p_target

private java.lang.String[] p_target
name of the frame target


p_encoding

private java.lang.String[] p_encoding
menu item charset encoding


p_name

private java.lang.String[] p_name
menu item name


p_description

private java.lang.String[] p_description
menu item description


p_icon_off

private java.lang.String[] p_icon_off
button image icon off status


p_icon_over

private java.lang.String[] p_icon_over
button image icon over status


p_icon_on

private java.lang.String[] p_icon_on
button image icon on status


p_colbck_off

private java.awt.Color[] p_colbck_off
button off background color


p_colbck_over

private java.awt.Color[] p_colbck_over
button over background color


p_colbck_on

private java.awt.Color[] p_colbck_on
button on background color


p_coltxt_off

private java.awt.Color[] p_coltxt_off
button off text color


p_coltxt_over

private java.awt.Color[] p_coltxt_over
button over text color


p_coltxt_on

private java.awt.Color[] p_coltxt_on
button on text color


p_colsdw_off

private java.awt.Color[] p_colsdw_off
button off text shadow color


p_colsdw_over

private java.awt.Color[] p_colsdw_over
button over text shadow color


p_colsdw_on

private java.awt.Color[] p_colsdw_on
button on text shadow color


p_shadow_x

private int[] p_shadow_x
text shadow relative horizontal position


p_shadow_y

private int[] p_shadow_y
text shadow relative vertical position


p_bck_img_off

private java.lang.String[] p_bck_img_off
button image for mouse-off status


p_bck_img_over

private java.lang.String[] p_bck_img_over
button image for mouse-over status


p_bck_img_on

private java.lang.String[] p_bck_img_on
button image for mouse-click status


p_sound_over

private java.lang.String[] p_sound_over
mouse over button sound


p_sound_click

private java.lang.String[] p_sound_click
mouse click button sound


p_arrow_img_off

private java.lang.String[] p_arrow_img_off
arrow image for mouse-off state


p_arrow_img_over

private java.lang.String[] p_arrow_img_over
arrow image for mouse-over state


p_arrow_img_on

private java.lang.String[] p_arrow_img_on
arrow image for mouse-on state


p_pushed

private boolean[] p_pushed
if true enable button pushed status


p_padding

private int[][] p_padding
array of button paddings (Left, Right, Top, Bottom) pixels between left button border and first element (image or label)


p_gap

private int[] p_gap
distance in pixels between button objects (image, label and arrow)


p_label_position

private int[] p_label_position
label position respect the image (LEFT, RIGHT, TOP, BOTTOM)


p_center_block

private boolean[] p_center_block
if true center the block (image+label) on the button


p_border_width

private int[] p_border_width
button bevel width (0 = no bevel)


p_font

private java.lang.String[] p_font
button font name


p_font_style

private int[] p_font_style
button style (PLAIN, BOLD, ITALIC, BOLD+ITALIC)


p_font_size

private int[] p_font_size
font size in pixels


p_shortcut

private java.lang.String[] p_shortcut
keyboard shortcut to activate button (e.g: SHIFT+A)


jumpToUrl

java.awt.event.ActionListener jumpToUrl
Constructor Detail

Jddm

public Jddm()
Applet constructor (void)

Method Detail

setURL

private java.net.URL setURL(java.lang.String link)
Computes full, canonical URL from a relative specification.

Parameters:
link - string containing URL
Returns:
canonical URL

getEncodedString

private java.lang.String getEncodedString(java.lang.String original,
                                          java.lang.String encoding_in,
                                          java.lang.String encoding_out)
Convert string to specified encoding.

Parameters:
original - original string
encoding_in - input encoding table
encoding_out - output encoding table
Returns:
encoded string

getPositionCode

private int getPositionCode(java.lang.String posname)
Return the int associated to string position name.

Parameters:
posname - name of position. Possible values are (LEFT, RIGHT, TOP, BOTTOM, CENTER);
Returns:
position int code

getFontStyleCode

private int getFontStyleCode(java.lang.String stylename)
return the int associated to font style

Parameters:
stylename - name of style. Possible values are (PLAIN, BOLD, ITALIC);
Returns:
style int code

loadImage

private java.awt.Image loadImage(java.applet.Applet a,
                                 java.net.URL file)
Load an image.

Parameters:
a - applet
file - image file URL
Returns:
loadImage

getParameter

private java.lang.String getParameter(java.lang.String key,
                                      java.lang.String def)
Get applet parameter value, return default if void.

Parameters:
key - name of parameter to read
def - default value
Returns:
parameter value or default

countButtons

private int countButtons()
Count the number of buttons

Returns:
int number of specified buttons

getDefaultValue

private java.lang.String getDefaultValue(java.lang.String str,
                                         java.lang.String def)
Return "def" if "str" is null or empty.

Parameters:
str - value to return if not null
def - default value to return
Returns:
def or str by case

getParameters

private void getParameters()
Get the applet parameters from HTML page.


setMenuItemSize

private void setMenuItemSize(int i)
Set arrays sizes

Parameters:
i - size of array

readMenuDataFile

private void readMenuDataFile(java.lang.String filename)
Read menu items data from external text file. "\n" separate items. "\t" separate values.

Parameters:
filename - Filename of the text file containing menu data.

splitData

private java.lang.String[] splitData(java.lang.String input_string,
                                     char sep_ch,
                                     int size)
Split a string in array of predefined size.

Parameters:
input_string - string to split
sep_ch - separator character
size - max elements to retrieve, remaining elements will be filled with empty string
Returns:
splitted_array of strings

init

public void init()
Initialize the applet

Overrides:
init in class java.applet.Applet

insertButton

private void insertButton(int id,
                          int realid)
Add specified button to menu.

Parameters:
id - virtual ID
realid - real ID

drawButton

private void drawButton(int id)
Draw the item button.

Parameters:
id - button ID

displayPopup

private void displayPopup(int id)
display the button submenu popup

Parameters:
id - the button ID

jbInit

private void jbInit()
             throws java.lang.Exception
Component initialization

Throws:
java.lang.Exception

start

public void start()
Start the applet

Overrides:
start in class java.applet.Applet

stop

public void stop()
Stop the applet

Overrides:
stop in class java.applet.Applet

destroy

public void destroy()
Destroy the applet

Overrides:
destroy in class java.applet.Applet

getAppletInfo

public java.lang.String getAppletInfo()
Get Applet information.

Overrides:
getAppletInfo in class java.applet.Applet
Returns:
applet info