SPT RWT Application API

com.sptci.rwt.webui
Class MenuComponent

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by nextapp.echo2.app.button.AbstractButton
          extended by nextapp.echo2.app.Button
              extended by echopointng.ButtonEx
                  extended by echopointng.MenuItem
                      extended by echopointng.Menu
                          extended by echopointng.MenuBar
                              extended by com.sptci.rwt.webui.MenuComponent
All Implemented Interfaces:
AccessKeyable, Attributeable, Borderable, Delegateable, Heightable, Insetable, MouseCursorable, Positionable, Sizeable, ToolTipable, Widthable, Serializable, RenderIdSupport

public class MenuComponent
extends MenuBar

The component that displays the application menu.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: MenuComponent.java 4123 2008-05-25 21:49:01Z rakesh $
Author:
Rakesh Vidyadharan 2007-09-29
See Also:
Serialized Form

Field Summary
private  MainController controller
          The main application controller to use for this component.
private  Menu savedConnections
          The menu used to store saved JDBC connections.
private  Menu savedQueries
          The menu used to store saved SQL statements.
 
Fields inherited from class echopointng.MenuBar
DEFAULT_STYLE
 
Fields inherited from class echopointng.Menu
DEFAULT_SUBMENU_IMAGE, OPEN_ON_CLICK, OPEN_ON_MOUSEOVER, OPEN_ON_SUBMENU_CLICK, PROPERTY_BACKGROUND_IMAGE, PROPERTY_DRAW_OUTER_BORDERS, PROPERTY_HORIZONTAL, PROPERTY_KEEP_ALIVE, PROPERTY_LEFT_OFFSET, PROPERTY_MENU_ALWAYS_ON_TOP, PROPERTY_MENU_BACKGROUND, PROPERTY_MENU_BACKGROUND_IMAGE, PROPERTY_MENU_BORDER, PROPERTY_MENU_FOREGROUND, PROPERTY_MENU_INSETS, PROPERTY_MENU_OUTSETS, PROPERTY_OPEN_OPTION, PROPERTY_PROPERTY_CHILDREN, PROPERTY_STYLE_CHILDREN, PROPERTY_SUBMENU_IMAGE, PROPERTY_SUBMENU_IMAGE_ALIGNMENT, PROPERTY_SUBMENU_IMAGE_BORDERED, PROPERTY_SUBMENU_ROLLOVER_IMAGE, PROPERTY_TOP_OFFSET
 
Fields inherited from class echopointng.ButtonEx
PROPERTY_INTERPRET_NEWLINES
 
Fields inherited from class nextapp.echo2.app.button.AbstractButton
ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_CLICK, PROPERTY_ALIGNMENT, PROPERTY_BORDER, PROPERTY_DISABLED_BACKGROUND, PROPERTY_DISABLED_BACKGROUND_IMAGE, PROPERTY_DISABLED_BORDER, PROPERTY_DISABLED_FONT, PROPERTY_DISABLED_FOREGROUND, PROPERTY_DISABLED_ICON, PROPERTY_HEIGHT, PROPERTY_ICON, PROPERTY_ICON_TEXT_MARGIN, PROPERTY_INSETS, PROPERTY_LINE_WRAP, PROPERTY_MODEL, PROPERTY_PRESSED_BACKGROUND, PROPERTY_PRESSED_BACKGROUND_IMAGE, PROPERTY_PRESSED_BORDER, PROPERTY_PRESSED_ENABLED, PROPERTY_PRESSED_FONT, PROPERTY_PRESSED_FOREGROUND, PROPERTY_PRESSED_ICON, PROPERTY_ROLLOVER_BACKGROUND, PROPERTY_ROLLOVER_BACKGROUND_IMAGE, PROPERTY_ROLLOVER_BORDER, PROPERTY_ROLLOVER_ENABLED, PROPERTY_ROLLOVER_FONT, PROPERTY_ROLLOVER_FOREGROUND, PROPERTY_ROLLOVER_ICON, PROPERTY_TEXT, PROPERTY_TEXT_ALIGNMENT, PROPERTY_TEXT_POSITION, PROPERTY_TOOL_TIP_TEXT, PROPERTY_WIDTH
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopointng.able.Positionable
ABSOLUTE, FIXED, PROPERTY_BOTTOM, PROPERTY_LEFT, PROPERTY_POSITION, PROPERTY_RIGHT, PROPERTY_TOP, PROPERTY_Z_INDEX, RELATIVE, STATIC
 
Fields inherited from interface echopointng.able.Borderable
PROPERTY_BORDER
 
Fields inherited from interface echopointng.able.MouseCursorable
CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI
 
Fields inherited from interface echopointng.able.AccessKeyable
PROPERTY_ACCESS_KEY
 
Fields inherited from interface echopointng.able.Insetable
DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS
 
Fields inherited from interface echopointng.able.Widthable
PROPERTY_WIDTH
 
Fields inherited from interface echopointng.able.Heightable
PROPERTY_HEIGHT
 
Fields inherited from interface echopointng.able.ToolTipable
PROPERTY_TOOL_TIP_TEXT
 
Constructor Summary
MenuComponent(MainController controller)
          Default constructor.
 
Method Summary
private  MenuItem createBatchQueryExecutor()
          Create the menu item that is used to launch the BatchQueryExecutorView component.
private  MenuItem createConnection()
          Create the menu item used to display the connection dialogue.
private  Menu createConnections()
          Create the menu used to display all the saved JDBC Connections for the application user.
private  void createConnectionsMenu()
          Create the menu that displays the connection options.
private  Menu createDataSources()
          Create the menu used to display all available DataSources configured for the application.
private  void createQueries()
          Create the menu that displays query windows and saved queries.
private  MenuItem createQueryExecutor()
          Create the menu item that is used to launch the QueryExecutorView component.
private  Menu createSavedQueries()
          Create the menu used to display all the saved queries for the user and application.
private  Menu createSavedQueries(Category category)
          Create the necessary menu's to display the saved queries under the specified category.
 
Methods inherited from class echopointng.MenuBar
clear, getBottom, getLeft, getPosition, getRight, getTop, getZIndex, isPositioned, setBottom, setLeft, setPosition, setRight, setTop, setZIndex, toString
 
Methods inherited from class echopointng.Menu
add, add, add, getLeftOffset, getMenuAlwaysOnTop, getMenuBackground, getMenuBackgroundImage, getMenuBorder, getMenuForeground, getMenuInsets, getMenuItems, getMenuOutsets, getOpenOption, getSubmenuImage, getSubmenuImageAlignment, getSubmenuRolloverImage, getTopOffset, isClickToOpen, isDrawOuterBorders, isHorizontal, isKeepAlive, isStyleChildren, isSubmenuImageBordered, isValidChild, setClickToOpen, setDrawOuterBorders, setHorizontal, setKeepAlive, setLeftOffset, setMenuAlwaysOnTop, setMenuBackground, setMenuBackgroundImage, setMenuBorder, setMenuForeground, setMenuInsets, setMenuOutsets, setOpenOption, setStyleChildren, setSubmenuImage, setSubmenuImageAlignment, setSubmenuImageBordered, setSubmenuRolloverImage, setTopOffset, styleAllMenuItems, styleAllMenuItems, styleAllMenuItemsByName, styleMenuItem
 
Methods inherited from class echopointng.MenuItem
getRootMenu
 
Methods inherited from class echopointng.ButtonEx
getAccessKey, getAttribute, getAttributeNames, getInsets, getMouseCursor, getMouseCursorUri, getOutsets, getText, isInterpretNewlines, processInput, setAccessKey, setAttribute, setInsets, setInterpretNewlines, setModel, setMouseCursor, setMouseCursorUri, setOutsets, setText
 
Methods inherited from class nextapp.echo2.app.button.AbstractButton
addActionListener, doAction, fireActionPerformed, getActionCommand, getAlignment, getBackgroundImage, getBorder, getDisabledBackground, getDisabledBackgroundImage, getDisabledBorder, getDisabledFont, getDisabledForeground, getDisabledIcon, getHeight, getIcon, getIconTextMargin, getModel, getPressedBackground, getPressedBackgroundImage, getPressedBorder, getPressedFont, getPressedForeground, getPressedIcon, getRolloverBackground, getRolloverBackgroundImage, getRolloverBorder, getRolloverFont, getRolloverForeground, getRolloverIcon, getTextAlignment, getTextPosition, getToolTipText, getWidth, hasActionListeners, isLineWrap, isPressedEnabled, isRolloverEnabled, removeActionListener, setActionCommand, setAlignment, setBackgroundImage, setBorder, setDisabledBackground, setDisabledBackgroundImage, setDisabledBorder, setDisabledFont, setDisabledForeground, setDisabledIcon, setHeight, setIcon, setIconTextMargin, setLineWrap, setPressedBackground, setPressedBackgroundImage, setPressedBorder, setPressedEnabled, setPressedFont, setPressedForeground, setPressedIcon, setRolloverBackground, setRolloverBackgroundImage, setRolloverBorder, setRolloverEnabled, setRolloverFont, setRolloverForeground, setRolloverIcon, setText, setTextAlignment, setTextPosition, setToolTipText, setWidth
 
Methods inherited from class nextapp.echo2.app.Component
add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Borderable
getBorder, setBorder
 
Methods inherited from interface echopointng.able.Widthable
getWidth, setWidth
 
Methods inherited from interface echopointng.able.Heightable
getHeight, setHeight
 
Methods inherited from interface echopointng.able.ToolTipable
getToolTipText, setToolTipText
 

Field Detail

controller

private final MainController controller
The main application controller to use for this component.


savedConnections

private Menu savedConnections
The menu used to store saved JDBC connections.


savedQueries

private Menu savedQueries
The menu used to store saved SQL statements.

Constructor Detail

MenuComponent

public MenuComponent(MainController controller)
Default constructor. Initialises the menu bar.

See Also:
createConnections(), createQueries()
Method Detail

createConnectionsMenu

private void createConnectionsMenu()
Create the menu that displays the connection options.

See Also:
createDataSources(), createConnections(), createConnection()

createDataSources

private Menu createDataSources()
Create the menu used to display all available DataSources configured for the application.

Returns:
The menu with all available datasources as menu items.

createConnections

private Menu createConnections()
Create the menu used to display all the saved JDBC Connections for the application user.

Returns:
The menu with all available saved connections.

createConnection

private MenuItem createConnection()
Create the menu item used to display the connection dialogue.

Returns:
The menu item to launch the connection dialogue.

createQueries

private void createQueries()
Create the menu that displays query windows and saved queries.

See Also:
createQueryExecutor(), createBatchQueryExecutor(), createSavedQueries()

createQueryExecutor

private MenuItem createQueryExecutor()
Create the menu item that is used to launch the QueryExecutorView component.

Returns:
The menu item to launch the query executor component.

createBatchQueryExecutor

private MenuItem createBatchQueryExecutor()
Create the menu item that is used to launch the BatchQueryExecutorView component.

Returns:
The menu item to launch the batch query executor component.

createSavedQueries

private Menu createSavedQueries()
Create the menu used to display all the saved queries for the user and application.

Returns:
The menu used to organise the saved queries.
See Also:
createSavedQueries( Category )

createSavedQueries

private Menu createSavedQueries(Category category)
Create the necessary menu's to display the saved queries under the specified category.

Parameters:
category - The category under which saved queries are stored.

SPT RWT Application API