se.entitymanager.presentation.swing
Class SwingPresentationFacade

java.lang.Object
  extended by se.entitymanager.presentation.PresentationFacade
      extended by se.entitymanager.presentation.swing.SwingPresentationFacade

public class SwingPresentationFacade
extends PresentationFacade

A Swing presentation facade.

This class offers gui functionalities for a logic facade. It is based on the Swing framework.


Field Summary
private  SwingPresentationLogic presentationLogic
          The presentation logic to use.
 
Fields inherited from class se.entitymanager.presentation.PresentationFacade
iconFactory, logicFacade
 
Constructor Summary
SwingPresentationFacade(LogicFacade logicFacade, IconFactoryInterface iconFactory)
          Constructs a SwingPresentationFacade to a logicFactory.
 
Method Summary
 Icon createIcon(javax.swing.Icon icon)
          Creates a new se.entitymanager.presentation.Icon from a javax.swing.Icon.
 java.awt.Component getDualTreeComponent()
          Returns a dual tree display component for the entities of the logic facade.
 javax.swing.JMenuBar getMenuBar()
          Returns a menu bar for the entities of the logic facade.
 javax.swing.JPopupMenu getPopupMenu()
          Returns a popup menu for the entities of the logic facade.
 javax.swing.JToolBar getToolBar()
          Returns a tool bar for the entities of the logic facade.
 void showError(java.lang.String errorMessage)
          Returns a error message, if error occured.
 
Methods inherited from class se.entitymanager.presentation.PresentationFacade
getIconFactory, getLogicFacade
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

presentationLogic

private SwingPresentationLogic presentationLogic
The presentation logic to use.

Constructor Detail

SwingPresentationFacade

public SwingPresentationFacade(LogicFacade logicFacade,
                               IconFactoryInterface iconFactory)
Constructs a SwingPresentationFacade to a logicFactory. Icons will be created using iconFactory.

Parameters:
logicFacade - the logic facade
iconFactory - the icon factory
Method Detail

createIcon

public Icon createIcon(javax.swing.Icon icon)
Creates a new se.entitymanager.presentation.Icon from a javax.swing.Icon. The given icon will be encapsulated an can be accessed by se.entitymanager.presentation.Icon.getIconObject().

Parameters:
icon - the icon
Returns:
a icon that encapsulates the given icon

getDualTreeComponent

public java.awt.Component getDualTreeComponent()
Returns a dual tree display component for the entities of the logic facade.

Specified by:
getDualTreeComponent in class PresentationFacade
Returns:
dual tree display component.

getMenuBar

public javax.swing.JMenuBar getMenuBar()
Returns a menu bar for the entities of the logic facade.

Specified by:
getMenuBar in class PresentationFacade
Returns:
menu bar .

getToolBar

public javax.swing.JToolBar getToolBar()
Returns a tool bar for the entities of the logic facade.

Specified by:
getToolBar in class PresentationFacade
Returns:
button bar.

getPopupMenu

public javax.swing.JPopupMenu getPopupMenu()
Returns a popup menu for the entities of the logic facade.

Specified by:
getPopupMenu in class PresentationFacade
Returns:
popup menu.

showError

public void showError(java.lang.String errorMessage)
Returns a error message, if error occured.