Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.jboogie.ui

Class DiagramPanel

com.gentleware.services.swingx.XTab
    inheritcom.gentleware.jboogie.ui.DiagramPanel

public class DiagramPanel


A JPanel that shows a toolbar and a Diagram (i.e. org.omg.uml2.diagraminterchange.Diagram).

Authors:
Stephen Kelvin


 Inner Classifier Summary
public   DiagramPanel.VisibilityChangeListener
Interface to implement for notifications of visibility changes. 
public   DiagramPanel.ZoomListener
Interface to implement for notifications of zoom scale changes. 
private static   DiagramPanel.DumpKeyEventListener
 
private   DiagramPanel.DiagramListener
<--End  
private   DiagramPanel.ToolbarDiagram
 
arrow_up
 

 Attribute Summary
static Class[]  DIAGRAM_ACTION_PARAMETERS
 
private static boolean  _isZooming
 
public static long  _keyPressedTimeInRealObjectsEditor
 
private static int  _paintQualityResetZoomDelay
Whenever the diagram's scale is set the rendering quality is lowered and the new scale is not transfered to the MDR Diagram object until this delay is passed. 
private double  _scale
 
private Set  _zoomListener
 
private Timer  _zoomTimer
This timer is restarted whenever the diagram's scale is changed. 
arrow_up
 

 Association Summary
private PCanvas  _canvas
 
private DiagramImpl  _diagram
 
private DiagramListener  _diagramListener
 
private DumpKeyEventListener  _keyListener
 
private DiagramPanel  _lastPanel
 
private Project  _project
 
private PScrollPane  _scrollPane
 
private QSelectionEventHandler  _selectionHandler
 
private ToolBar  _toolBar
 
private PToolTipHandler  _toolTipHandler
 
private VisibilityChangeListener  _visibilityChangeListener
 
public DiagramAction  diagramAction
 
public DiagramPanel  diagramPanel
 
arrow_up
 

 Constructor Summary
public   DiagramPanel(Project project, DiagramImpl diagram, QSelectionEventHandler dragHandler, PToolTipHandler toolTipHandler)
 
arrow_up
 

 Method Summary
private static void   __initializer()
 
public void   addZoomListener(DiagramPanel.ZoomListener zoomListener)
 
private ToolBar   createToolbar()
 
public void   dispose()
 
private void   doStuff(Collection diElements)
 
private void   fireScaleChanged()
 
public PCanvas   getCanvas()
 
public DiagramImpl   getDiagram()
 
private PBounds   getGlobalBounds(GraphElementImpl graphElement)
 
public Project   getProject()
 
public double   getScale()
 
public JScrollPane   getScrollPane()
If you want to change the viewport of the diagram. 
public QSelectionEventHandler   getSelectionHandler()
 
private void   handleZoomEnded()
 
private void   handleZoomStarted()
 
public boolean   isToolbarselectionSticky()
 
public void   removeZoomListener(DiagramPanel.ZoomListener zoomListener)
 
public void   resetToolBarButton(XAbstractAction action)
called whenever an action has executed  
private void   scrollToShow(GraphElementImpl graphElement)
 
public void   scrollToShowFigs(List highlightables)
 
public void   setScale(double scale)
 
public void   setScaleAboutPoint(double scale, Point2D scaleAboutPoint)
 
public void   setSelection(Collection diElements, RefObject focusedElement)
The given diElements are selected in this diagram using the selectionEventHandler. 
public void   setToolbarComponentClasses(Class[] toolBarComponentClasses)
 
public void   setVisibilityChangeListener(DiagramPanel.VisibilityChangeListener listener)
 
private void   updateCameraZoom(double scale)
 
private void   updateCameraZoom(double scale, Point2D scaleAboutPoint)
 
protected void   visibilityChanged(boolean visible)
 
arrow_up
 

Tagged Values
static false
 

 Inner Classifier Detail

DiagramPanel.VisibilityChangeListener

public  DiagramPanel.VisibilityChangeListener

Interface to implement for notifications of visibility changes.  
arrow_up


DiagramPanel.ZoomListener

public  DiagramPanel.ZoomListener

Interface to implement for notifications of zoom scale changes. (This could be handled by using an MDR listener on the diagram, but that is way too slow.)  
arrow_up


DiagramPanel.DumpKeyEventListener

private static  DiagramPanel.DumpKeyEventListener

arrow_up


DiagramPanel.DiagramListener

private  DiagramPanel.DiagramListener

<--End  
arrow_up


DiagramPanel.ToolbarDiagram

private  DiagramPanel.ToolbarDiagram

arrow_up
 Attribute Detail

DIAGRAM_ACTION_PARAMETERS

static Class[] DIAGRAM_ACTION_PARAMETERS

arrow_up


_isZooming

private static boolean _isZooming

arrow_up


_keyPressedTimeInRealObjectsEditor

public static long _keyPressedTimeInRealObjectsEditor

arrow_up


_paintQualityResetZoomDelay

private static int _paintQualityResetZoomDelay

Whenever the diagram's scale is set the rendering quality is lowered and the new scale is not transfered to the MDR Diagram object until this delay is passed. Both is to make continous zooming faster.  
arrow_up


_scale

private double _scale

arrow_up


_zoomListener

private Set _zoomListener

arrow_up


_zoomTimer

private Timer _zoomTimer

This timer is restarted whenever the diagram's scale is changed. When it fires the rendering quality is reset to best and the current diagram scale is transferred to DI.  
arrow_up
 Association Detail

_canvas

private PCanvas _canvas

arrow_up


_diagram

private DiagramImpl _diagram

arrow_up


_diagramListener

private DiagramListener _diagramListener

arrow_up


_keyListener

private DumpKeyEventListener _keyListener

arrow_up


_lastPanel

private DiagramPanel _lastPanel

arrow_up


_project

private Project _project

arrow_up


_scrollPane

private PScrollPane _scrollPane

arrow_up


_selectionHandler

private QSelectionEventHandler _selectionHandler

arrow_up


_toolBar

private ToolBar _toolBar

arrow_up


_toolTipHandler

private PToolTipHandler _toolTipHandler

arrow_up


_visibilityChangeListener

private VisibilityChangeListener _visibilityChangeListener

arrow_up


diagramAction

public DiagramAction diagramAction

arrow_up


diagramPanel

public DiagramPanel diagramPanel

arrow_up
 Constructor Detail

DiagramPanel

public DiagramPanel DiagramPanel(Project project, DiagramImpl diagram, QSelectionEventHandler dragHandler, PToolTipHandler toolTipHandler)

Parameters:
project -
diagram -
dragHandler -
toolTipHandler -
Returns:
arrow_up
 Method Detail

__initializer

private static void __initializer()

arrow_up


addZoomListener

public void addZoomListener(DiagramPanel.ZoomListener zoomListener)

Parameters:
zoomListener -
arrow_up


createToolbar

private ToolBar createToolbar()

Returns:
arrow_up


dispose

public void dispose()

arrow_up


doStuff

private void doStuff(Collection diElements)

Parameters:
diElements -
arrow_up


fireScaleChanged

private void fireScaleChanged()

arrow_up


getCanvas

public PCanvas getCanvas()

Returns:
arrow_up


getDiagram

public DiagramImpl getDiagram()

Returns:
arrow_up


getGlobalBounds

private PBounds getGlobalBounds(GraphElementImpl graphElement)

Parameters:
graphElement -
Returns:
arrow_up


getProject

public Project getProject()

Returns:
arrow_up


getScale

public double getScale()

Returns:
arrow_up


getScrollPane

public JScrollPane getScrollPane()


If you want to change the viewport of the diagram.  
Returns:
arrow_up


getSelectionHandler

public QSelectionEventHandler getSelectionHandler()

Returns:
arrow_up


handleZoomEnded

private void handleZoomEnded()

arrow_up


handleZoomStarted

private void handleZoomStarted()

arrow_up


isToolbarselectionSticky

public boolean isToolbarselectionSticky()

Returns:
arrow_up


removeZoomListener

public void removeZoomListener(DiagramPanel.ZoomListener zoomListener)

Parameters:
zoomListener -
arrow_up


resetToolBarButton

public void resetToolBarButton(XAbstractAction action)


called whenever an action has executed  
Parameters:
action -
arrow_up


scrollToShow

private void scrollToShow(GraphElementImpl graphElement)

Parameters:
graphElement -
arrow_up


scrollToShowFigs

public void scrollToShowFigs(List highlightables)

Parameters:
highlightables -
arrow_up


setScale

public void setScale(double scale)

Parameters:
scale -
arrow_up


setScaleAboutPoint

public void setScaleAboutPoint(double scale, Point2D scaleAboutPoint)

Parameters:
scale -
scaleAboutPoint -
arrow_up


setSelection

public void setSelection(Collection diElements, RefObject focusedElement)


The given diElements are selected in this diagram using the selectionEventHandler.  
Parameters:
diElements - A bunch of RefObjects that are probably GraphElements (but need not be).
focusedElement -
arrow_up


setToolbarComponentClasses

public void setToolbarComponentClasses(Class[] toolBarComponentClasses)

Parameters:
toolBarComponentClasses -
arrow_up


setVisibilityChangeListener

public void setVisibilityChangeListener(DiagramPanel.VisibilityChangeListener listener)

Parameters:
listener -
arrow_up


updateCameraZoom

private void updateCameraZoom(double scale)

Parameters:
scale -
arrow_up


updateCameraZoom

private void updateCameraZoom(double scale, Point2D scaleAboutPoint)

Parameters:
scale -
scaleAboutPoint -
arrow_up


visibilityChanged

protected void visibilityChanged(boolean visible)

Parameters:
visible -
arrow_up
Created  2004 - 10 - 21

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.