vooga.arcade
Interface IArcadeFrame

All Known Implementing Classes:
ArcadeFrame, ChatTest, MultiplayerLobbyFrame

public interface IArcadeFrame

This interface has the methods that must be implemented by the Arcade/GUI in order to have the code appropriately linked.

Author:
Lindsay Kubasik, Ron Murhammer, Vijay Ram

Method Summary
 int addFlowLayoutTab(java.util.List<javax.swing.JComponent> components, java.lang.String tabTitle, Location location)
          This method is called to add a new tab to the GUI with a flow layout.
 int addFlowLayoutTab(java.util.List<javax.swing.JComponent> components, java.lang.String tabTitle, Location location, boolean isCloseable)
          This method is called to add a new tab to the GUI with a flow layout.
 void addMenu(javax.swing.JMenu menu)
          This method is called to add a menu to the GUI.
 void addTab(javax.swing.JComponent component, java.lang.String tabTitle, Location location)
          This method is called to add a new tab to the GUI.
 void addTab(javax.swing.JComponent component, java.lang.String tabTitle, Location location, boolean isClosable)
          This method is called to add a new tab to the GUI.
 void addToolBarItem(javax.swing.JButton button)
          This method is called to add a button to the existing toolbar.
 javax.swing.JButton addToolBarItem(java.lang.String imagePath, java.lang.String toolTip, java.awt.event.ActionListener action)
          Adds a new tool bar item with the given picture, tool tip, and action listener.
 java.awt.Dimension getDimension(Location location)
          This method is used to return the dimension of a given component.
 java.util.List<javax.swing.JComponent> getFlowLayoutComponents(int tabID)
          This method returns the list of JComponents in the given flow layout tab identified by its ID.
 void removeMenu(javax.swing.JMenu menu)
          This method is called to remove a menu from the GUI.
 void removeTab(java.lang.String tabTitle, Location location)
          This method is called to remove a tab from the GUI.
 void removeToolBarItem(javax.swing.JButton button)
          This method is called to remove a button from the existing toolbar.
 void updateFlowLayoutTab(int tabID, javax.swing.JComponent component)
          Used to update a given flow layout tab identified by the tabID.
 void updateFlowLayoutTab(int tabID, javax.swing.JComponent component, boolean remove)
          Used to update a given flow layout tab identified by the tabID.
 

Method Detail

addMenu

void addMenu(javax.swing.JMenu menu)
This method is called to add a menu to the GUI.


removeMenu

void removeMenu(javax.swing.JMenu menu)
This method is called to remove a menu from the GUI.


addToolBarItem

void addToolBarItem(javax.swing.JButton button)
This method is called to add a button to the existing toolbar. If no action is assigned to the button, clicking the button will do nothing.


addToolBarItem

javax.swing.JButton addToolBarItem(java.lang.String imagePath,
                                   java.lang.String toolTip,
                                   java.awt.event.ActionListener action)
Adds a new tool bar item with the given picture, tool tip, and action listener.

Parameters:
imagePath -
toolTip -
action -

removeToolBarItem

void removeToolBarItem(javax.swing.JButton button)
This method is called to remove a button from the existing toolbar.


addTab

void addTab(javax.swing.JComponent component,
            java.lang.String tabTitle,
            Location location)
This method is called to add a new tab to the GUI. The new tab will house the component and will have the String title written on the tab. The tab will be added at the location specified.


addTab

void addTab(javax.swing.JComponent component,
            java.lang.String tabTitle,
            Location location,
            boolean isClosable)
This method is called to add a new tab to the GUI. The new tab will house the component and will have the String title written on the tab. The tab will be added at the location specified. Allows specification if the tab can be closed.


removeTab

void removeTab(java.lang.String tabTitle,
               Location location)
This method is called to remove a tab from the GUI. The ID is the id of the frame the tab is housed in, and the location is the physical location of the tab on the screen.


addFlowLayoutTab

int addFlowLayoutTab(java.util.List<javax.swing.JComponent> components,
                     java.lang.String tabTitle,
                     Location location)
This method is called to add a new tab to the GUI with a flow layout. The new tab takes a list of components and creates a default tab using flow layout. It returns the tabID so the tab can be modified later. The new tab will house the component and will have the String title written on the tab. The tab will be added at the location specified.


addFlowLayoutTab

int addFlowLayoutTab(java.util.List<javax.swing.JComponent> components,
                     java.lang.String tabTitle,
                     Location location,
                     boolean isCloseable)
This method is called to add a new tab to the GUI with a flow layout. The new tab takes a list of components and creates a default tab using flow layout. It returns the tabID so the tab can be modified later. The new tab will house the component and will have the String title written on the tab. The tab will be added at the location specified.


getFlowLayoutComponents

java.util.List<javax.swing.JComponent> getFlowLayoutComponents(int tabID)
This method returns the list of JComponents in the given flow layout tab identified by its ID. The list can then be editted and updateFlowLayoutTab should then be called.

Parameters:
tabID -
Returns:

updateFlowLayoutTab

void updateFlowLayoutTab(int tabID,
                         javax.swing.JComponent component)
Used to update a given flow layout tab identified by the tabID.

Parameters:
tabID -
components -

updateFlowLayoutTab

void updateFlowLayoutTab(int tabID,
                         javax.swing.JComponent component,
                         boolean remove)
Used to update a given flow layout tab identified by the tabID.

Parameters:
tabID -
components -

getDimension

java.awt.Dimension getDimension(Location location)
This method is used to return the dimension of a given component.

Parameters:
location - is the location of the tabbed panel
Returns:
Dimension of the component