com.tensegrity.gui.inplaceediting
Class InplaceConductor

java.lang.Object
  extended bycom.tensegrity.gui.inplaceediting.InplaceConductor

public class InplaceConductor
extends java.lang.Object

This class 'conducts' the inplace editing within a GraphPanel. Since the Tensegrity API supports different toolkits an InplaceEditorProvider is used to create appropriate editor GUI controls

Version:
$Id: InplaceConductor.java,v 1.7 2005/10/05 13:27:45 ArndHouben Exp $
Author:
AndreasEbbert, MKegel, Arnd Houben

Constructor Summary
InplaceConductor(InplaceEditorProvider editorProvider)
          Creates a new InplaceConductor.
 
Method Summary
 InplaceEditor getInplaceEditor(GraphPanel graphPanel, int x, int y)
          Returns the InplaceEditor instance to use for the element at the specified location within the given GraphPanel.
static int[] getLabelCoordinates(VisualGraphView visualGraphView, BaseComposite baseComposite, double[] labelCoords)
          Static helper method to retrieve position of the label in the coordinates system of the panel.
static int[] getLabelCoordinates(VisualGraphView visualGraphView, BaseComposite baseComposite, Label2D label)
          Static helper method to retrieve position of the label in the coordinates system of the panel.
static int[] getLabelOfTableCoords(VisualGraphView visualGraphView, Composite composite, Label2D label, CompositeTable table)
          Static helper method to retrieve position of a label inside a given table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InplaceConductor

public InplaceConductor(InplaceEditorProvider editorProvider)
Creates a new InplaceConductor.

Parameters:
editorProvider - supplies the gui with suitable instances of InplaceEditor
Method Detail

getInplaceEditor

public InplaceEditor getInplaceEditor(GraphPanel graphPanel,
                                      int x,
                                      int y)
Returns the InplaceEditor instance to use for the element at the specified location within the given GraphPanel.

Parameters:
graphPanel - the GraphPanel containing the editable element
x - x coordinate of the element location
y - y coordniate of the element location
Returns:
an InplaceEditor instance.

getLabelCoordinates

public static final int[] getLabelCoordinates(VisualGraphView visualGraphView,
                                              BaseComposite baseComposite,
                                              Label2D label)
Static helper method to retrieve position of the label in the coordinates system of the panel.

Parameters:
visualGraphView - the top level VisualGraphView object.
baseComposite - the BaseComposite containing the label.
label - the label.
Returns:
the position of the label in screen coordinates.

getLabelCoordinates

public static final int[] getLabelCoordinates(VisualGraphView visualGraphView,
                                              BaseComposite baseComposite,
                                              double[] labelCoords)
Static helper method to retrieve position of the label in the coordinates system of the panel.

Parameters:
visualGraphView - the top level VisualGraphView object.
baseComposite - the BaseComposite containing the label.
labelCoords - the label coordinates.
Returns:
the position of the label in screen coordinates.

getLabelOfTableCoords

public static final int[] getLabelOfTableCoords(VisualGraphView visualGraphView,
                                                Composite composite,
                                                Label2D label,
                                                CompositeTable table)
Static helper method to retrieve position of a label inside a given table

Parameters:
visualGraphView - the top level VisualGraphView object.
composite - the Composite containing the label.
label - the label
table - the table containing the label
Returns:
the position of the label in screen coordinates.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.