unbbayes.gui
Class UnBBayesFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by unbbayes.gui.UnBBayesFrame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class UnBBayesFrame
extends JFrame

This class extends JFrame and it is responsible for the UnBBayes main panel.

Author:
Rommel Novaes Carvalho (rommel.carvalho@gmail.com), Michael S. Onishi (mso@gmail.com), Laecio Lima dos Santos (laecio@gmail.com), Shou Matsumoto (cardialfly@yahoo.com)
See Also:
JFrame, Serialized Form

Nested Class Summary
protected  class UnBBayesFrame.ActionListenerSupportingConstructorParam
          Inner class for action listener, supporting constructor's param.
 class UnBBayesFrame.ListenerCloserFrame
           
 class UnBBayesFrame.OpenFileUsingModulesActionListener
          A listener for opening an existing file using plugins/modules.
protected  class UnBBayesFrame.SplitButtonMenuActionListener
          This is just an action listener for menu items inserted within the getPluginSplitButton() or getToolsSplitButton().
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  IconController iconController
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
UnBBayesFrame(MainController _controller)
          Build the main program frame, adjusting the layouts and building the buttons, labels, and others elements of the interface.
 
Method Summary
 void addWindow(JInternalFrame newWindow)
          Adds a new window.
 void addWindow(UnBBayesModule newModule)
          Adds a new window/module.
 void assignActionListeners()
          Method responsible for assigning ActionListeners to all buttons available.
protected  Map<String,List<JComponent>> buildModuleCategoryToComponentsMap()
          This method is called inside the constructor in order to initialize the map, which is to be stored at getModuleCategoryToComponentsMap().
 void createActionListeners()
          Method responsible for creating all ActionListeners needed.
 void createButtons()
          Create the needed buttons and add their respectinve tool tip.
 void createMenu()
          Method responsible for creating the menu used in this class, JFrame.
protected  void createPluginMenu()
          This method is used whithin loadPlugins() in order to create the "Plugin" menu.
protected  void createPluginToolBars()
          This method is used whithin loadPlugins() in order to instantiate the "Plugin" tool bars.
 void createToolBars()
          Call the method for creating the needed buttons and then create the tool bars and add the buttons to them and finally to the topPanel.
protected  Map<String,Class> fillCorePluginMenuAndButtons(org.java.plugin.PluginManager pluginManager, org.java.plugin.registry.ExtensionPoint point)
          Fills up the menu and tool tip buttons using #getPluginManager().
 String[] getAllSupportedFileExtensions(Collection<Class> plugins)
          Obtains all file extensions (with no dots) that a list of plugins can handle.
 MainController getController()
           
 Map<String,Class> getCoreUnBBayesModulesClasses()
          Obtains the classes of modules' builders (UnBBayesModuleBuilder) which are part of core implementation of unbbayes.
 MDIDesktopPane getDesktop()
           
static UnBBayesFrame getIUnBBayes()
           
 JToolBar getJtbFile()
           
 JToolBar getJtbNew()
           
 JToolBar getJtbTools()
           
 Map<JComponent,JComponent> getMapOfComponentsToBeRemovedAtPluginReload()
          It stores all modules' components which was not added into the default plugin split button.
 JMenuBar getMenu()
           
 Map<String,List<JComponent>> getModuleCategoryToComponentsMap()
          It maps a module category into a menu
 JMenu getNewMenu()
          This is a sub menu where functionalities like "new BN" or "new MSBN" resides.
 Map<String,Class> getPluginMap()
          Connected, loaded and activated extensions.
 JMenu getPluginMenu()
           
 JPopupMenu.Separator getPluginMenuSeparator()
          This separator separates the "reload plugin" option from other plugins
 String getPluginModuleExtensionPoint()
          The main extension point of the core plugin (Module).
 SplitToggleButton getPluginSplitButton()
          This is the split button containing buttons to start plugin-based modules.
 JToolBar getPluginToolBar()
           
 JMenuItem getReloadPluginsItem()
           
 JMenu getSamplingMenu()
          This is a sub menu where sampling modules resides.
 JInternalFrame getSelectedWindow()
          Returns the selected window.
 JMenu getToolsMenu()
          This is a menu where tools (e.g.
 SplitToggleButton getToolsSplitButton()
           
 UnBBayesModule getUnBBayesModuleByPluginClass(Class clazz)
          Use the parameter "clazz" in order to instantiate a new UnBBayesModule (in this case, "clazz" must provide a default constructor) or as a UnBBayesModuleBuilder (which by UnBBayesModuleBuilder.buildUnBBayesModule() we get the proper UnBBayesModule).
protected  String getUnBBayesModuleNameByPluginClass(Class pluginOrBuilderCls)
          Extracts the module's name from its class (the class can be a builder or the module itself).
 Map<String,UnBBayesModule> getUnBBayesModulesByFile(File file, Map<String,Class> plugins)
          Obtains all modules that can treat a specific file (it looks mainly at file extension) at loading time.
 UnBBayesPluginContextHolder getUnbbayesPluginContextHolder()
           
 void loadPlugins()
          Creates the plugin manager, loads UnBBayes' core plugins using JPF, fills the menu items and tool bar's buttons and their listeners.
protected  void reloadPlugins()
          This method is called when we press the "reload plugin" menu.
protected  void removePluginButtonsFromOtherComponents(Map<JComponent,JComponent> map)
          This method will use map in order to remove all keys from its mapped object.
 void setController(MainController controller)
           
 void setDesktop(MDIDesktopPane desktop)
           
 void setJtbNew(JToolBar jtbNew)
           
 void setJtbTools(JToolBar jtbTools)
           
 void setMapOfComponentsToBeRemovedAtPluginReload(Map<JComponent,JComponent> listOfBNModulesAtFileJTB)
          It stores all modules' components which was not added into the default plugin split button.
 void setMenu(JMenuBar menu)
           
 void setModuleCategoryToComponentsMap(Map<String,List<JComponent>> moduleCategoryToComponentsMap)
          It maps a module category into a menu
 void setPluginList(Map<String,Class> pluginMap)
          Connected, loaded and activated extensions.
 void setPluginMenu(JMenu pluginMenu)
           
 void setPluginMenuSeparator(JPopupMenu.Separator pluginMenuSeparator)
          This separator separates the "reload plugin" option from other plugins
 void setPluginModuleExtensionPoint(String pluginModuleExtensionPoint)
          The main extension point of the core plugin (Module).
 void setPluginSplitButton(SplitToggleButton pluginSplitButton)
          This is the split button containing buttons to start plugin-based modules.
 void setPluginToolBar(JToolBar pluginToolBar)
           
 void setReloadPluginsItem(JMenuItem reloadPluginsItem)
           
 void setToolsSplitButton(SplitToggleButton toolsSplitButton)
           
 void setUnbbayesPluginContextHolder(UnBBayesPluginContextHolder unbbayesPluginContextHolder)
           
 void showPluginDependencyError()
          This method displays a dialog if a plugin with dependency error is detected.
protected  void updatePluginMenuVisibility()
          Hide plugin menu or tool bar if it is empty
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

iconController

protected IconController iconController
Constructor Detail

UnBBayesFrame

public UnBBayesFrame(MainController _controller)
Build the main program frame, adjusting the layouts and building the buttons, labels, and others elements of the interface. Create too the listeners.

See Also:
ActionListener, MouseListener, KeyListener
Method Detail

updatePluginMenuVisibility

protected void updatePluginMenuVisibility()
Hide plugin menu or tool bar if it is empty


getSelectedWindow

public JInternalFrame getSelectedWindow()
Returns the selected window.

Returns:
the selected window.

addWindow

public void addWindow(JInternalFrame newWindow)
Adds a new window.

Parameters:
newWindow - nova janela.

addWindow

public void addWindow(UnBBayesModule newModule)
Adds a new window/module.

Parameters:
newWindow - new module to add.

createActionListeners

public void createActionListeners()
Method responsible for creating all ActionListeners needed.


createMenu

public void createMenu()
Method responsible for creating the menu used in this class, JFrame.


buildModuleCategoryToComponentsMap

protected Map<String,List<JComponent>> buildModuleCategoryToComponentsMap()
This method is called inside the constructor in order to initialize the map, which is to be stored at getModuleCategoryToComponentsMap(). It uses the default menus ("new", "sampling", "tool" and "plugins")

Returns:
the builded map. The caller must use this map to set setModuleCategoryToComponentsMap(Map)
See Also:
getModuleCategoryToComponentsMap(), setModuleCategoryToComponentsMap(Map).

createPluginToolBars

protected void createPluginToolBars()
This method is used whithin loadPlugins() in order to instantiate the "Plugin" tool bars. It does not actually fill the tool bar, since the plugins must be loaded after the creation of the toolbar. It is only a initializer. The contents are created at fillCorePluginMenuAndButtons(PluginManager, ExtensionPoint)


createPluginMenu

protected void createPluginMenu()
This method is used whithin loadPlugins() in order to create the "Plugin" menu. It does not actually fill the menu with plugins, since the plugins must be loaded after the creation of the menu. It is only a initializer. The contents are created at fillCorePluginMenuAndButtons(PluginManager, ExtensionPoint)


reloadPlugins

protected void reloadPlugins()
This method is called when we press the "reload plugin" menu. By overwriting this method, you can customize the plugin's reload action. This method basically resets the components obtained from getMapOfComponentsToBeRemovedAtPluginReload(), resets the menu bar, refills the getModuleCategoryToComponentsMap(), reloads plugins, updates the menu's visibility (if no plugin is present, some menus and toolbars are hidden), and finally notifies reload action to UnBBayesPluginContextHolder.notifyReload(Object) using this UnBBayesFrame as parameter.


getCoreUnBBayesModulesClasses

public Map<String,Class> getCoreUnBBayesModulesClasses()
Obtains the classes of modules' builders (UnBBayesModuleBuilder) which are part of core implementation of unbbayes. Core implementation modules are instances of UnBBayesModule that was not loaded by plugin mechanism.

Returns:
a map of basic modules' classes' builders (or the classes itself): e.g. PN. The keys are the main ID of the plugin/module

showPluginDependencyError

public void showPluginDependencyError()
This method displays a dialog if a plugin with dependency error is detected.


loadPlugins

public void loadPlugins()
Creates the plugin manager, loads UnBBayes' core plugins using JPF, fills the menu items and tool bar's buttons and their listeners.


fillCorePluginMenuAndButtons

protected Map<String,Class> fillCorePluginMenuAndButtons(org.java.plugin.PluginManager pluginManager,
                                                         org.java.plugin.registry.ExtensionPoint point)
Fills up the menu and tool tip buttons using #getPluginManager().

Parameters:
pluginManager - : manager to use
point: - extension point to be read in order to fill menu and buttons.
Returns:
a map of connected and activated extensions. The keys are the module's IDs.

getUnBBayesModuleNameByPluginClass

protected String getUnBBayesModuleNameByPluginClass(Class pluginOrBuilderCls)
Extracts the module's name from its class (the class can be a builder or the module itself). Usually, we use UnBBayesModule.getModuleName() or UnBBayesModuleBuilder.getName() to do so.

Parameters:
pluginOrBuilderCls - a class of UnBBayesModule or UnBBayesModuleBuilder
Returns:
name or null if not found

getUnBBayesModuleByPluginClass

public UnBBayesModule getUnBBayesModuleByPluginClass(Class clazz)
                                              throws InstantiationException,
                                                     IllegalAccessException
Use the parameter "clazz" in order to instantiate a new UnBBayesModule (in this case, "clazz" must provide a default constructor) or as a UnBBayesModuleBuilder (which by UnBBayesModuleBuilder.buildUnBBayesModule() we get the proper UnBBayesModule).

Parameters:
clazz - : class extending UnBBayesModule or implementing UnBBayesModuleBuilder
Throws:
IllegalAccessException
InstantiationException
See Also:
addWindow(JInternalFrame)

createToolBars

public void createToolBars()
Call the method for creating the needed buttons and then create the tool bars and add the buttons to them and finally to the topPanel. TODO fix the help toolbar


removePluginButtonsFromOtherComponents

protected void removePluginButtonsFromOtherComponents(Map<JComponent,JComponent> map)
This method will use map in order to remove all keys from its mapped object. In other words, if a button was once added into a jcomponent within map, the button will be removed from the component and the map.

Parameters:
map -

createButtons

public void createButtons()
Create the needed buttons and add their respectinve tool tip.


assignActionListeners

public void assignActionListeners()
Method responsible for assigning ActionListeners to all buttons available.


getIUnBBayes

public static UnBBayesFrame getIUnBBayes()

getPluginToolBar

public JToolBar getPluginToolBar()
Returns:
the pluginToolBar

setPluginToolBar

public void setPluginToolBar(JToolBar pluginToolBar)
Parameters:
pluginToolBar - the pluginToolBar to set

getPluginMenu

public JMenu getPluginMenu()
Returns:
the pluginMenu

setPluginMenu

public void setPluginMenu(JMenu pluginMenu)
Parameters:
pluginMenu - the pluginMenu to set

getPluginModuleExtensionPoint

public String getPluginModuleExtensionPoint()
The main extension point of the core plugin (Module).

Returns:
the pluginModuleExtensionPoint

setPluginModuleExtensionPoint

public void setPluginModuleExtensionPoint(String pluginModuleExtensionPoint)
The main extension point of the core plugin (Module).

Parameters:
pluginModuleExtensionPoint - the module's extension ID to set

getPluginMap

public Map<String,Class> getPluginMap()
Connected, loaded and activated extensions. This map associates an ID to a UnBBayesModule or UnBBayesModuleBuilder

Returns:
the pluginMap

setPluginList

public void setPluginList(Map<String,Class> pluginMap)
Connected, loaded and activated extensions. This map associates an ID to a UnBBayesModule or UnBBayesModuleBuilder

Parameters:
pluginMap - the pluginMap to set

getMenu

public JMenuBar getMenu()
Returns:
the menu

setMenu

public void setMenu(JMenuBar menu)
Parameters:
menu - the menu to set

getReloadPluginsItem

public JMenuItem getReloadPluginsItem()
Returns:
the reloadPluginsMenuItem

setReloadPluginsItem

public void setReloadPluginsItem(JMenuItem reloadPluginsItem)
Parameters:
reloadPluginsMenuItem - the reloadPluginsMenuItem to set

getUnBBayesModulesByFile

public Map<String,UnBBayesModule> getUnBBayesModulesByFile(File file,
                                                           Map<String,Class> plugins)
Obtains all modules that can treat a specific file (it looks mainly at file extension) at loading time. We do not need this method at saving time since IPersistenceAwareWindow.getIO() can do the job by using BaseIO.save(File, unbbayes.prs.Graph).

Parameters:
file - : file to be loaded.
plugins - : a map of classes extending UnBBayesModule. The keys are the plugin/module IDs.
Returns:
a map of instantiated UnBBayesModule, with setVisible(false). The keys are the plugin/module IDs.

getAllSupportedFileExtensions

public String[] getAllSupportedFileExtensions(Collection<Class> plugins)
Obtains all file extensions (with no dots) that a list of plugins can handle.

Parameters:
plugins - : a list of classes extending UnBBayesModule or its builder (UnBBayesModuleBuilder)
Returns:
array of string containing all file extensions supported currently by the modules.
See Also:
BaseIO.getSupportedFileExtensions(boolean)

getUnbbayesPluginContextHolder

public UnBBayesPluginContextHolder getUnbbayesPluginContextHolder()
Returns:
the unbbayesPluginContextHolder

setUnbbayesPluginContextHolder

public void setUnbbayesPluginContextHolder(UnBBayesPluginContextHolder unbbayesPluginContextHolder)
Parameters:
unbbayesPluginContextHolder - the unbbayesPluginContextHolder to set

getPluginSplitButton

public SplitToggleButton getPluginSplitButton()
This is the split button containing buttons to start plugin-based modules. This is usually inserted inside getPluginToolBar()

Returns:
the pluginSplitButton

setPluginSplitButton

public void setPluginSplitButton(SplitToggleButton pluginSplitButton)
This is the split button containing buttons to start plugin-based modules. This is usually inserted inside getPluginToolBar()

Parameters:
pluginSplitButton - the pluginSplitButton to set

getNewMenu

public JMenu getNewMenu()
This is a sub menu where functionalities like "new BN" or "new MSBN" resides.

Returns:
newMenu

getToolsMenu

public JMenu getToolsMenu()
This is a menu where tools (e.g. learning modules) resides.

Returns:
toolsMenu

getSamplingMenu

public JMenu getSamplingMenu()
This is a sub menu where sampling modules resides.

Returns:
samplingMenu

getJtbFile

public JToolBar getJtbFile()
Returns:
the jtbFile

getModuleCategoryToComponentsMap

public Map<String,List<JComponent>> getModuleCategoryToComponentsMap()
It maps a module category into a menu

Returns:
the moduleCategoryToComponentsMap

setModuleCategoryToComponentsMap

public void setModuleCategoryToComponentsMap(Map<String,List<JComponent>> moduleCategoryToComponentsMap)
It maps a module category into a menu

Parameters:
moduleCategoryToComponentsMap - the moduleCategoryToJMenuMap to set

getPluginMenuSeparator

public JPopupMenu.Separator getPluginMenuSeparator()
This separator separates the "reload plugin" option from other plugins

Returns:
the pluginMenuSeparator

setPluginMenuSeparator

public void setPluginMenuSeparator(JPopupMenu.Separator pluginMenuSeparator)
This separator separates the "reload plugin" option from other plugins

Parameters:
pluginMenuSeparator - the pluginMenuSeparator to set

getMapOfComponentsToBeRemovedAtPluginReload

public Map<JComponent,JComponent> getMapOfComponentsToBeRemovedAtPluginReload()
It stores all modules' components which was not added into the default plugin split button. They need special attention, since they are usually situated at other JTB, and must be removed at plugin reload. The buttons are mapped to the component where they were added.

Returns:
the mapOfComponentsToBeRemovedAtPluginReload

setMapOfComponentsToBeRemovedAtPluginReload

public void setMapOfComponentsToBeRemovedAtPluginReload(Map<JComponent,JComponent> listOfBNModulesAtFileJTB)
It stores all modules' components which was not added into the default plugin split button. They need special attention, since they are usually situated at other JTB, and must be removed at plugin reload. The buttons are mapped to the component where they were added.

Parameters:
mapOfComponentsToBeRemovedAtPluginReload - the mapOfComponentsToBeRemovedAtPluginReload to set
See Also:
getJtbFile()

getJtbNew

public JToolBar getJtbNew()
Returns:
the jtbNew

setJtbNew

public void setJtbNew(JToolBar jtbNew)
Parameters:
jtbNew - the jtbNew to set

getController

public MainController getController()
Returns:
the controller

setController

public void setController(MainController controller)
Parameters:
controller - the controller to set

getDesktop

public MDIDesktopPane getDesktop()
Returns:
the desktop

setDesktop

public void setDesktop(MDIDesktopPane desktop)
Parameters:
desktop - the desktop to set

getJtbTools

public JToolBar getJtbTools()
Returns:
the jtbTools

setJtbTools

public void setJtbTools(JToolBar jtbTools)
Parameters:
jtbTools - the jtbTools to set

getToolsSplitButton

public SplitToggleButton getToolsSplitButton()
Returns:
the toolsSplitButton

setToolsSplitButton

public void setToolsSplitButton(SplitToggleButton toolsSplitButton)
Parameters:
toolsSplitButton - the toolsSplitButton to set


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.