org.jhotdraw.contrib
Class DesktopEventService

java.lang.Object
  extended byorg.jhotdraw.contrib.DesktopEventService

public class DesktopEventService
extends java.lang.Object

Version:
<$CURRENT_VERSION$>

Constructor Summary
DesktopEventService(Desktop newDesktop, java.awt.Container newContainer)
           
 
Method Summary
 void addComponent(java.awt.Component newComponent)
           
 void addDesktopListener(DesktopListener dpl)
           
protected  java.awt.event.ContainerListener createComponentListener()
           
protected  DesktopEvent createDesktopEvent(DrawingView oldView, DrawingView newView)
           
protected  void fireDrawingViewAddedEvent(DrawingView dv)
           
protected  void fireDrawingViewRemovedEvent(DrawingView dv)
           
protected  void fireDrawingViewSelectedEvent(DrawingView oldView, DrawingView newView)
          This method is only called if the selected drawingView has actually changed
 DrawingView getActiveDrawingView()
           
protected  java.awt.Container getContainer()
           
protected  Desktop getDesktop()
           
 DrawingView[] getDrawingViews(java.awt.Component[] comps)
           
 void removeAllComponents()
           
 void removeComponent(DrawingView dv)
           
 void removeDesktopListener(DesktopListener dpl)
           
protected  void setActiveDrawingView(DrawingView newActiveDrawingView)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesktopEventService

public DesktopEventService(Desktop newDesktop,
                           java.awt.Container newContainer)
Method Detail

getDesktop

protected Desktop getDesktop()

getContainer

protected java.awt.Container getContainer()

addComponent

public void addComponent(java.awt.Component newComponent)

removeComponent

public void removeComponent(DrawingView dv)

removeAllComponents

public void removeAllComponents()

addDesktopListener

public void addDesktopListener(DesktopListener dpl)

removeDesktopListener

public void removeDesktopListener(DesktopListener dpl)

fireDrawingViewAddedEvent

protected void fireDrawingViewAddedEvent(DrawingView dv)

fireDrawingViewRemovedEvent

protected void fireDrawingViewRemovedEvent(DrawingView dv)

fireDrawingViewSelectedEvent

protected void fireDrawingViewSelectedEvent(DrawingView oldView,
                                            DrawingView newView)
This method is only called if the selected drawingView has actually changed


createDesktopEvent

protected DesktopEvent createDesktopEvent(DrawingView oldView,
                                          DrawingView newView)
Parameters:
oldView - previous active drawing view (may be null because not all events require this information)

getDrawingViews

public DrawingView[] getDrawingViews(java.awt.Component[] comps)

getActiveDrawingView

public DrawingView getActiveDrawingView()

setActiveDrawingView

protected void setActiveDrawingView(DrawingView newActiveDrawingView)

createComponentListener

protected java.awt.event.ContainerListener createComponentListener()