org.jdesktop.wonderland.client.jme
Interface MainFrame

All Known Implementing Classes:
MainFrameImpl

public interface MainFrame

An interface for interacting with the main JME frame

Author:
jkaplan

Nested Class Summary
static class MainFrame.PlacemarkType
          Three types of Placemarks are expected: - Managements placemarks affect management (add, manage) and also include the Starting Location - System placemarks are attached to objects through the placemark capability - User placemarks are personal and created by the user through the management tools The reason to declare them here and not in the Placemark API project is that the differences only matter at the time of displaying them in the Placemark menu.
static interface MainFrame.ServerURLListener
          A listener that will be notified when the server URL changes
 
Method Summary
 void addServerURLListener(MainFrame.ServerURLListener listener)
          Add a listener that will be notified when the server URL changes (i.e.
 void addToCameraChoices(javax.swing.JRadioButtonMenuItem cameraMenuItem, int index)
          Add a camera menu item to the View menu at the specified index, where -1 adds to the end of the menu
 void addToEditMenu(javax.swing.JMenuItem menuItem)
          Add the specified menu item to the end of the Edit menu
 void addToEditMenu(javax.swing.JMenuItem menuItem, int index)
          Add a menu item to the Edit menu at the specified index, where -1 adds the menu item to the end of the menu
 void addToFileMenu(javax.swing.JMenuItem menuItem)
          Add the specified menu item to the end of the File menu
 void addToFileMenu(javax.swing.JMenuItem menuItem, int index)
          Add the specified menu item to the edit menu.
 void addToHelpMenu(javax.swing.JMenuItem menuItem)
          Add the specified menu item to the end of the Help menu
 void addToHelpMenu(javax.swing.JMenuItem menuItem, int index)
          Add a menu item to the Help menu at the specified index, where -1 adds the menu item to the end of the menu
 void addToInsertMenu(javax.swing.JMenuItem menuItem)
          Add the specified menu item to the end of the Insert menu
 void addToInsertMenu(javax.swing.JMenuItem menuItem, int index)
          Add a menu item to the Insert menu at the specified index, where -1 adds the menu item to the end of the menu
 void addToMenu(javax.swing.JMenu menu, javax.swing.JMenuItem menuItem, int index)
          Add a menu item to a menu at the specified index, where -1 adds the menu item to the end of the menu
 void addToPlacemarksMenu(javax.swing.JMenuItem menuItem)
          Add the specified menu item to the end of the Placemarks menu
 void addToPlacemarksMenu(javax.swing.JMenuItem menuItem, int index, MainFrame.PlacemarkType placemarktype)
          Add a menu item to the Placemarks menu at the specified index, where -1 adds the menu item to the end of the menu.
 void addToToolsMenu(javax.swing.JMenuItem menuItem)
          Add the specified menu item to the end of the Tools menu
 void addToToolsMenu(javax.swing.JMenuItem menuItem, int index)
          Add a menu item to the Tools menu at the specified index, where -1 adds the menu item to the end of the menu
 void addToViewMenu(javax.swing.JMenuItem menuItem)
          Add the specified menu item to the end of the View menu
 void addToViewMenu(javax.swing.JMenuItem menuItem, int index)
          Add a menu item to the View menu at the specified index, where -1 adds the menu item to the end of the menu
 void addToWindowMenu(javax.swing.JMenuItem menuItem)
          Add the specified menu item to the end of the Window menu
 void addToWindowMenu(javax.swing.JMenuItem menuItem, int index)
          Add a menu item to the Window menu at the specified index, where -1 adds the menu item to the end of the menu
 void connected(boolean connected)
          Notify when a connection is established or disconnected
 java.awt.Canvas getCanvas()
          Returns the canvas of the frame.
 javax.swing.JPanel getCanvas3DPanel()
          Returns the panel of the frame in which the 3D canvas resides.
 javax.swing.JFrame getFrame()
          Get the underlying Swing frame object
 void removeFromCameraChoices(javax.swing.JRadioButtonMenuItem menuItem)
          Removes the specified camera choice
 void removeFromEditMenu(javax.swing.JMenuItem menuItem)
          Remove the specified menu item from the Edit menu.
 void removeFromFileMenu(javax.swing.JMenuItem menuItem)
          Remove the specified menu item from the File menu.
 void removeFromHelpMenu(javax.swing.JMenuItem menuItem)
          Remove the specified menu item from the Help menu.
 void removeFromInsertMenu(javax.swing.JMenuItem menuItem)
          Remove the specified menu item from the Insert menu.
 void removeFromPlacemarksMenu(javax.swing.JMenuItem menuItem)
          Remove the specified menu item from the Placemarks menu.
 void removeFromToolsMenu(javax.swing.JMenuItem menuItem)
          Remove the specified menu item from the Tools menu.
 void removeFromViewMenu(javax.swing.JMenuItem menuItem)
          Remove the specified menu item from the View menu.
 void removeFromWindowMenu(javax.swing.JMenuItem menuItem)
          Remove the specified menu item from the Window menu.
 void setDesiredFrameRate(int desiredFrameRate)
          Set the desired frame rate
 void setServerURL(java.lang.String serverURL)
          Set the server URL in the location field
 

Method Detail

getFrame

javax.swing.JFrame getFrame()
Get the underlying Swing frame object

Returns:
the Swing frame

getCanvas

java.awt.Canvas getCanvas()
Returns the canvas of the frame.


getCanvas3DPanel

javax.swing.JPanel getCanvas3DPanel()
Returns the panel of the frame in which the 3D canvas resides.


addToMenu

void addToMenu(javax.swing.JMenu menu,
               javax.swing.JMenuItem menuItem,
               int index)
Add a menu item to a menu at the specified index, where -1 adds the menu item to the end of the menu

Parameters:
menu - the menu to add the item to
menuItem - the item to add
index - the position in the menu

addToFileMenu

void addToFileMenu(javax.swing.JMenuItem menuItem)
Add the specified menu item to the end of the File menu

Parameters:
menuItem -

addToFileMenu

void addToFileMenu(javax.swing.JMenuItem menuItem,
                   int index)
Add the specified menu item to the edit menu. Add a menu item to the File menu at the specified index, where -1 adds the menu item to the end of the menu

Parameters:
menuItem -
index - the position in the menu

removeFromFileMenu

void removeFromFileMenu(javax.swing.JMenuItem menuItem)
Remove the specified menu item from the File menu.

Parameters:
menuItem -

addToEditMenu

void addToEditMenu(javax.swing.JMenuItem menuItem)
Add the specified menu item to the end of the Edit menu

Parameters:
menuItem -

addToEditMenu

void addToEditMenu(javax.swing.JMenuItem menuItem,
                   int index)
Add a menu item to the Edit menu at the specified index, where -1 adds the menu item to the end of the menu

Parameters:
menuItem -
index - the position in the menu

removeFromEditMenu

void removeFromEditMenu(javax.swing.JMenuItem menuItem)
Remove the specified menu item from the Edit menu.

Parameters:
menuItem -

addToViewMenu

void addToViewMenu(javax.swing.JMenuItem menuItem)
Add the specified menu item to the end of the View menu

Parameters:
menuItem -

addToViewMenu

void addToViewMenu(javax.swing.JMenuItem menuItem,
                   int index)
Add a menu item to the View menu at the specified index, where -1 adds the menu item to the end of the menu

Parameters:
menuItem -

removeFromViewMenu

void removeFromViewMenu(javax.swing.JMenuItem menuItem)
Remove the specified menu item from the View menu.

Parameters:
menuItem -

addToInsertMenu

void addToInsertMenu(javax.swing.JMenuItem menuItem)
Add the specified menu item to the end of the Insert menu

Parameters:
menuItem -

addToInsertMenu

void addToInsertMenu(javax.swing.JMenuItem menuItem,
                     int index)
Add a menu item to the Insert menu at the specified index, where -1 adds the menu item to the end of the menu

Parameters:
menuItem -

removeFromInsertMenu

void removeFromInsertMenu(javax.swing.JMenuItem menuItem)
Remove the specified menu item from the Insert menu.

Parameters:
menuItem -

addToToolsMenu

void addToToolsMenu(javax.swing.JMenuItem menuItem)
Add the specified menu item to the end of the Tools menu

Parameters:
menuItem -

addToToolsMenu

void addToToolsMenu(javax.swing.JMenuItem menuItem,
                    int index)
Add a menu item to the Tools menu at the specified index, where -1 adds the menu item to the end of the menu

Parameters:
menuItem -

removeFromToolsMenu

void removeFromToolsMenu(javax.swing.JMenuItem menuItem)
Remove the specified menu item from the Tools menu.

Parameters:
menuItem -

addToPlacemarksMenu

void addToPlacemarksMenu(javax.swing.JMenuItem menuItem)
Add the specified menu item to the end of the Placemarks menu

Parameters:
menuItem -

addToPlacemarksMenu

void addToPlacemarksMenu(javax.swing.JMenuItem menuItem,
                         int index,
                         MainFrame.PlacemarkType placemarktype)
Add a menu item to the Placemarks menu at the specified index, where -1 adds the menu item to the end of the menu. Weights are not being used (anymore) for alphabetising placemarks as it was impossible to use JSeparators(JComponents) in the Menu.

Parameters:
menuItem -
index - the position in the menu
placemarkType - The type of the placemark (Management, User or System) used for displaying purposes when organising the menu

removeFromPlacemarksMenu

void removeFromPlacemarksMenu(javax.swing.JMenuItem menuItem)
Remove the specified menu item from the Placemarks menu.

Parameters:
menuItem -

addToWindowMenu

void addToWindowMenu(javax.swing.JMenuItem menuItem)
Add the specified menu item to the end of the Window menu

Parameters:
menuItem -

addToWindowMenu

void addToWindowMenu(javax.swing.JMenuItem menuItem,
                     int index)
Add a menu item to the Window menu at the specified index, where -1 adds the menu item to the end of the menu

Parameters:
menuItem -
index - the position in the menu

removeFromWindowMenu

void removeFromWindowMenu(javax.swing.JMenuItem menuItem)
Remove the specified menu item from the Window menu.

Parameters:
menuItem -

addToHelpMenu

void addToHelpMenu(javax.swing.JMenuItem menuItem)
Add the specified menu item to the end of the Help menu

Parameters:
menuItem -

addToHelpMenu

void addToHelpMenu(javax.swing.JMenuItem menuItem,
                   int index)
Add a menu item to the Help menu at the specified index, where -1 adds the menu item to the end of the menu

Parameters:
menuItem -
index - the position in the menu

removeFromHelpMenu

void removeFromHelpMenu(javax.swing.JMenuItem menuItem)
Remove the specified menu item from the Help menu.

Parameters:
menuItem -

setServerURL

void setServerURL(java.lang.String serverURL)
Set the server URL in the location field

Parameters:
serverURL - the server URL to set

addServerURLListener

void addServerURLListener(MainFrame.ServerURLListener listener)
Add a listener that will be notified when the server URL changes (i.e. when the user types a new location in the location bar)

Parameters:
listener - the listener to add

connected

void connected(boolean connected)
Notify when a connection is established or disconnected

Parameters:
connected - true if a connection has been established, false otherwise

setDesiredFrameRate

void setDesiredFrameRate(int desiredFrameRate)
Set the desired frame rate

Parameters:
desiredFrameRate - the desired frame rate in frames per second

addToCameraChoices

void addToCameraChoices(javax.swing.JRadioButtonMenuItem cameraMenuItem,
                        int index)
Add a camera menu item to the View menu at the specified index, where -1 adds to the end of the menu

Parameters:
cameraMenuItem - the menu item to activate this camera. The menu item should have a listener that activates the given camera on selection.

removeFromCameraChoices

void removeFromCameraChoices(javax.swing.JRadioButtonMenuItem menuItem)
Removes the specified camera choice

Parameters:
menuItem - the previously-added camera choice


Open Wonderland - http://openwonderland.org