se.entitymanager.presentation.swing
Class SwingPresentationLogic

java.lang.Object
  extended by se.entitymanager.presentation.swing.SwingPresentationLogic

public class SwingPresentationLogic
extends java.lang.Object

A class that offers basic functionality for displaying entities with a swing gui.


Field Summary
private  SwingDualTreePanel displayPanel
          The dual tree display panel that will be provided for applications.
private  IconFactoryInterface iconFactory
          The icon factory to use.
private  LogicFacade logicFacade
          The logic facade that is used for calling methods on entities.
private  SwingMenuBar menuBar
          The menu bar panel that will be provided for applications.
private  SwingPopupMenu popupMenu
          The popup menu that will be provided for applications.
private  SwingPresentationFacade presentationFacade
          The presentation facade object, this object belongs to.
private  SwingToolBar toolBar
          The display panel that will be provided for applications.
 
Constructor Summary
protected SwingPresentationLogic(SwingPresentationFacade presentationFacade, LogicFacade logicFacade, IconFactoryInterface iconFactory)
          Constructs a SwingPresentationLogic for a presentationFacade, that uses logicFacade to call methods on entities and iconFactory to create icons for the displayPanel.
 
Method Summary
 java.awt.Component getDualTreeComponent()
          Returns a dual tree component for entities.
 IconFactoryInterface getIconFactory()
          Returns the icon factory that is used by the display panel to create icons for entities.
 LogicFacade getLogicFacade()
          Returns the logic facade that is used for calling methods on entities.
 javax.swing.JMenuBar getMenuBar()
          Returns a menu bar.
 javax.swing.JPopupMenu getPopupMenu()
          Returns a popup menu.
 javax.swing.JToolBar getToolBar()
          Returns a tool bar.
protected  void showError(java.lang.String errorMessage)
          Shows an error message in an option pane as modal dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

presentationFacade

private SwingPresentationFacade presentationFacade
The presentation facade object, this object belongs to.


logicFacade

private LogicFacade logicFacade
The logic facade that is used for calling methods on entities.


iconFactory

private IconFactoryInterface iconFactory
The icon factory to use.


displayPanel

private SwingDualTreePanel displayPanel
The dual tree display panel that will be provided for applications.


menuBar

private SwingMenuBar menuBar
The menu bar panel that will be provided for applications.


toolBar

private SwingToolBar toolBar
The display panel that will be provided for applications.


popupMenu

private SwingPopupMenu popupMenu
The popup menu that will be provided for applications.

Constructor Detail

SwingPresentationLogic

protected SwingPresentationLogic(SwingPresentationFacade presentationFacade,
                                 LogicFacade logicFacade,
                                 IconFactoryInterface iconFactory)
Constructs a SwingPresentationLogic for a presentationFacade, that uses logicFacade to call methods on entities and iconFactory to create icons for the displayPanel.

Method Detail

getLogicFacade

public LogicFacade getLogicFacade()
Returns the logic facade that is used for calling methods on entities.

Returns:
the logic facade

getIconFactory

public IconFactoryInterface getIconFactory()
Returns the icon factory that is used by the display panel to create icons for entities.

Returns:
the icon factory

getDualTreeComponent

public java.awt.Component getDualTreeComponent()
Returns a dual tree component for entities.

This class always returns an instance of SwingPresentationPanel.

See Also:
SwingDualTreePanel

getMenuBar

public javax.swing.JMenuBar getMenuBar()
Returns a menu bar.

See Also:
SwingMenuBar

getToolBar

public javax.swing.JToolBar getToolBar()
Returns a tool bar.

See Also:
SwingToolBar

getPopupMenu

public javax.swing.JPopupMenu getPopupMenu()
Returns a popup menu.

See Also:
SwingToolBar

showError

protected void showError(java.lang.String errorMessage)
Shows an error message in an option pane as modal dialog.

Parameters:
errorMessage - the error message