unbbayes.gui
Class GlobalOptionsDialog

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

public class GlobalOptionsDialog
extends JDialog

Class responsible for general configurations, like node color, size, algorithm to use for compilation, etc.

Author:
Rommel N. Carvalho (rommel.carvalho@gmail.com), Michael S. Onishi
See Also:
JDialog, Serialized Form

Nested Class Summary
protected  class GlobalOptionsDialog.PluginRadioButtonListener
          A component aware listener for Plugin's radio buttons.
 
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
 
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
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
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, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GlobalOptionsDialog(GraphPane gra, NetworkController con)
          Constroi a estrutura da janela que mostra as opcoes globais
 
Method Summary
 String getAlgorithmExtensionPoint()
          This is the extension point id for InferenceAlgorithm.
 JComponent getAlgorithmOptionPane()
           
 JPanel getAlgorithmRadioPanel()
           
 Map<JRadioButtonMenuItem,InferenceAlgorithmOptionPanel> getAlgorithmToOptionMap()
           
 Color getArcColor()
          Retorna a cor do arco do botao corArco
 Color getBackgroundColor()
          Retorna a cor de fundo do botao corFundo
 Color getDecisionNodeColor()
          Retorna a cor do no de decisao do botao corNo
protected  Map<JRadioButtonMenuItem,InferenceAlgorithmOptionPanel> getDefaultAlgorithms()
          Returns a map (radio button -> respective InferenceAlgorithmOptionPanel) for those "default" algorithms, Those algorithms are treated like plugins, but they are not actually inside plugins directory.
 String getPluginCoreID()
          The ID of the core plugin.
 String getPluginDirectory()
          The directory where this class will search for plugins.
 org.java.plugin.PluginManager getPluginManager()
           
 Color getPropabilisticDescriptionNodeColor()
          Retorna a cor do no de probabilidade do botao corNo
 Color getPropabilisticExplanationNodeColor()
          Retorna a cor do no de probabilidade do botao corNo
 int getRadius()
          Retorna o valor do raio no sliderRaio.
 Color getSelectionColor()
          Retorna a cor de selecao do botao corSelecao
 UnBBayesPluginContextHolder getUnBBayesPluginContextHolder()
           
 Color getUtilityNodeColor()
          Retorna a cor do no de utilidade do botao corNo
protected  Map<JRadioButtonMenuItem,InferenceAlgorithmOptionPanel> loadAlgorithmsAsPlugins()
          Use the plugin framework to load algorithms and fill radio button and its option panel
protected  void reloadPlugins()
          Reloads plugin algorithms
 void setAlgorithmExtensionPoint(String algorithmExtensionPoint)
          This is the extension point id for InferenceAlgorithm.
 void setAlgorithmOptionPane(JComponent algorithmOptionPane)
           
 void setAlgorithmRadioPanel(JPanel algorithmRadioPanel)
           
 void setAlgorithmToOptionMap(Map<JRadioButtonMenuItem,InferenceAlgorithmOptionPanel> algorithmToOptionMap)
           
protected  void setCurrentAlgorithmOptionPanel(Component currentOptionPanel)
          Changes the getAlgorithmOptionPane()'s content to currentOptionPanel.
 void setPluginCoreID(String pluginCoreID)
          The ID of the core plugin.
 void setPluginDirectory(String pluginDirectory)
          The directory where this class will search for plugins.
 void setUnBBayesPluginContextHolder(UnBBayesPluginContextHolder unbbayesPluginContextHolder)
           
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
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, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, remove, 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
 

Constructor Detail

GlobalOptionsDialog

public GlobalOptionsDialog(GraphPane gra,
                           NetworkController con)
Constroi a estrutura da janela que mostra as opcoes globais

Parameters:
a - rede a ser configurada (TDesenhaRede)
Method Detail

reloadPlugins

protected void reloadPlugins()
Reloads plugin algorithms


setCurrentAlgorithmOptionPanel

protected void setCurrentAlgorithmOptionPanel(Component currentOptionPanel)
Changes the getAlgorithmOptionPane()'s content to currentOptionPanel.

Parameters:
currentOptionPanel -

loadAlgorithmsAsPlugins

protected Map<JRadioButtonMenuItem,InferenceAlgorithmOptionPanel> loadAlgorithmsAsPlugins()
Use the plugin framework to load algorithms and fill radio button and its option panel

Returns:

getDefaultAlgorithms

protected Map<JRadioButtonMenuItem,InferenceAlgorithmOptionPanel> getDefaultAlgorithms()
Returns a map (radio button -> respective InferenceAlgorithmOptionPanel) for those "default" algorithms, Those algorithms are treated like plugins, but they are not actually inside plugins directory. Contents: {Junction Tree, Likelihood, gibbs, gaussian mixture}.

Returns:
map of default plugins (usually, the default plugins are core classes).

getRadius

public int getRadius()
Retorna o valor do raio no sliderRaio.

Returns:
o valor do raio em inteiro

getPropabilisticDescriptionNodeColor

public Color getPropabilisticDescriptionNodeColor()
Retorna a cor do no de probabilidade do botao corNo

Returns:
a cor do no de probabilidade (Color)
See Also:
Color

getPropabilisticExplanationNodeColor

public Color getPropabilisticExplanationNodeColor()
Retorna a cor do no de probabilidade do botao corNo

Returns:
a cor do no de probabilidade (Color)
See Also:
Color

getDecisionNodeColor

public Color getDecisionNodeColor()
Retorna a cor do no de decisao do botao corNo

Returns:
a cor do no de decisao (Color)
See Also:
Color

getUtilityNodeColor

public Color getUtilityNodeColor()
Retorna a cor do no de utilidade do botao corNo

Returns:
a cor do no de utilidade (Color)
See Also:
Color

getArcColor

public Color getArcColor()
Retorna a cor do arco do botao corArco

Returns:
a cor do arco (Color)
See Also:
Color

getSelectionColor

public Color getSelectionColor()
Retorna a cor de selecao do botao corSelecao

Returns:
a cor de selecao (Color)
See Also:
Color

getBackgroundColor

public Color getBackgroundColor()
Retorna a cor de fundo do botao corFundo

Returns:
a cor de fundo (Color)
See Also:
Color

getAlgorithmRadioPanel

public JPanel getAlgorithmRadioPanel()
Returns:
the algorithmRadioPanel

setAlgorithmRadioPanel

public void setAlgorithmRadioPanel(JPanel algorithmRadioPanel)
Parameters:
algorithmRadioPanel - the algorithmRadioPanel to set

getAlgorithmToOptionMap

public Map<JRadioButtonMenuItem,InferenceAlgorithmOptionPanel> getAlgorithmToOptionMap()
Returns:
the algorithmToOptionMap

setAlgorithmToOptionMap

public void setAlgorithmToOptionMap(Map<JRadioButtonMenuItem,InferenceAlgorithmOptionPanel> algorithmToOptionMap)
Parameters:
algorithmToOptionMap - the algorithmToOptionMap to set

getAlgorithmOptionPane

public JComponent getAlgorithmOptionPane()
Returns:
the algorithmOptionPane

setAlgorithmOptionPane

public void setAlgorithmOptionPane(JComponent algorithmOptionPane)
Parameters:
algorithmOptionPane - the algorithmOptionPane to set

getPluginDirectory

public String getPluginDirectory()
The directory where this class will search for plugins.

Returns:
the pluginDirectory

setPluginDirectory

public void setPluginDirectory(String pluginDirectory)
The directory where this class will search for plugins.

Parameters:
pluginDirectory - the pluginDirectory to set

getPluginManager

public org.java.plugin.PluginManager getPluginManager()
Returns:
the pluginManager

getPluginCoreID

public String getPluginCoreID()
The ID of the core plugin.

Returns:
the pluginCoreID

setPluginCoreID

public void setPluginCoreID(String pluginCoreID)
The ID of the core plugin.

Parameters:
pluginCoreID - the pluginCoreID to set

getAlgorithmExtensionPoint

public String getAlgorithmExtensionPoint()
This is the extension point id for InferenceAlgorithm.

Returns:
the algorithmExtensionPoint

setAlgorithmExtensionPoint

public void setAlgorithmExtensionPoint(String algorithmExtensionPoint)
This is the extension point id for InferenceAlgorithm.

Parameters:
algorithmExtensionPoint - the algorithmExtensionPoint to set

getUnBBayesPluginContextHolder

public UnBBayesPluginContextHolder getUnBBayesPluginContextHolder()
Returns:
the unbbayesPluginContextHolder

setUnBBayesPluginContextHolder

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


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