|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.swt.graph.GraphPanelUtility
This class intends to gather utility methods that could be used by both the
SwingGraphPanel and the SwtGraphPanel.
Definitely are good candidates: #initLayoutService(VisualGraphView)getDeepestVisualNodeAt(VisualGraphView, int, int)initRendererConfigurationLowDetail()#computeViewfactorX(VisualGraphView)#computeViewfactorY(VisualGraphView)
| Constructor Summary | |
protected |
GraphPanelUtility()
This class is not intended to be instanciated. |
| Method Summary | |
protected static int[] |
clientToView(VisualGraphView vgv,
int x,
int y,
int viewportwidth,
int viewportheight)
Returns the values of x and y in vgv's
coordinate system.
|
static boolean |
confirmImageSize(UIManager uiManager)
NOT IMPLEMENTED - Returns simply true for the moment Display a confirmation dialog that prompts the user whether the computed image size for raster export is accepted or not. |
static VisualNode |
getDeepestVisualNodeAt(VisualGraphView visualgraphview,
int x,
int y)
Returns the deepest VisualNode at the coordinate given by
x and y that can be found in the
hierarchy. |
static VisualNode |
getDeepestVisualNodeAt(VisualGraphView visualgraphview,
int x,
int y,
boolean traverseFoldedGroups)
Returns the deepest VisualNode at the coordinate given
x,y that can be found in the hierarchy.
|
static org.eclipse.swt.graphics.Image |
getVisualGraphImage(VisualGraphView visualgraphview)
Renders a picture for the VisualGraph.
|
static int |
getVisualGraphImageRequiredSize(VisualGraphView visualgraphview)
Returns the number of pixels that are required for a full unscaled export of the current VisualGraphView. |
static int |
getVisualGraphImageThreshold()
Returns the number of pixels that represent the maximum number of pixels for a full unscaled export of the current VisualGraphView. |
protected static AttributeSet |
initRendererConfigurationLowDetail()
Returns the attributeset that determines the rendering-settings during user-interaction. |
protected static void |
positionCompositeLine(CompositeLine compositeline,
int x,
int y)
Internal helper method, positions the start point of a line at the coordiantes (x,y). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected GraphPanelUtility()
This class is not intended to be instanciated.
| Method Detail |
protected static final int[] clientToView(VisualGraphView vgv,
int x,
int y,
int viewportwidth,
int viewportheight)
Returns the values of x and y in vgv's
coordinate system.
vgv - the VisualGraphViewx - represents a position on the X-axisy - represents a position on the X-axisviewportwidth - the view ports width of vgvviewportheight - the view ports height of vgv
x and
y in the vgv coordinate system.
protected static final void positionCompositeLine(CompositeLine compositeline,
int x,
int y)
compositeline - the compositeline to positionx - the x coordinate of the line's starting point.y - the y coordinate of the line's starting point.
public static final VisualNode getDeepestVisualNodeAt(VisualGraphView visualgraphview,
int x,
int y)
VisualNode at the coordinate given by
x and y that can be found in the
hierarchy. If no VisualNode is found at the coordinate
null is returned. By default VisualNode
s contained inside folded groups are ignored. Please use #getDeepestVisualNodeAt(int, int, boolean)
with the last parameter set to true in order to traverse
folded groups during the search.
visualgraphview - the VisualGraphView to search on.x - the x component of the coordinate to check fory - the y component of the coordinate to check for
VisualNode found or null
public static final VisualNode getDeepestVisualNodeAt(VisualGraphView visualgraphview,
int x,
int y,
boolean traverseFoldedGroups)
VisualNode at the coordinate given
x,y that can be found in the hierarchy.
If no VisualNode is found at the coordinate null
is returned. traverseFoldedGroups
is set to false, the first folded CompositeGroup found at
the given coordinate is considered as the deepest VisualNode
for this coordinate and is therefore returned by this method. Notice
that the coordinate is given in device coordinates.
visualgraphview - the VisualGraphView to search on.x - the x component of the coordinate to check fory - the y component of the coordinate to check fortraverseFoldedGroups - set to false if VisualNode s inside a folded
CompositeGroup should be ignored.
VisualNode found or nullprotected static final AttributeSet initRendererConfigurationLowDetail()
public static int getVisualGraphImageRequiredSize(VisualGraphView visualgraphview)
VisualGraphView.
visualgraphview - the VisualGraphView
public static final org.eclipse.swt.graphics.Image getVisualGraphImage(VisualGraphView visualgraphview)
VisualGraph.
The current display contents are rendered into a standard RGB image
(true-color) of the specified 1:1 zoomed width and height and returned
as an image.
visualgraphview - the current VisualGraphView
VisualGraphViewor null which is returned
if no VisualGraphViewis currently active.public static int getVisualGraphImageThreshold()
VisualGraphView.
public static final boolean confirmImageSize(UIManager uiManager)
uiManager - the UIManager to use for the displayed texts.
true if and only if the user confirmed.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||