On this page you will find solutions to problems related to the graph framework. There is also a FAQ section which answers the most common questions.
Frequently asked questions to Doc Graph:
Read the most common questions and their answers in this section:
Q) What happens after the 12 month subscription period ?
A) There is no necessity for a subscription beyond. You have the possibility for a further subscritpion if you want to participate on the Graph Framework updates and the regular support.
Q) When do I need the premium support?
A) Premium support means fast reliable, high quality response to your questions. This is generaly required within top class projects for new challenging applications or superior customers.
Q) Can I add my own controls to the Graph Framework GUI?
A) Depending on the GUI type (classic or docking style) you can add a limited or unlimited number of components as so called "Custom Containers" to the GUI. Simple buttons or menu items can be added easily to the toolbars or menus of the application using the corresponding "Launch Tasks".
Q) How do I define the elements that can be used in the graph documents?
A) The elements of the repository are defined using XML files containing the geometries, styles, rules and element information. They are human readable and provide an easy way of defining different sets of element types for an application. As an example showing the flexibility, the GraphDesigner Sample allows importing new elements during runtime.
Q) Is it possible to add my own information to a graph element?
A) You can do so by using the "Custom Attribute..." menu item in the "Insert" menu or the context menu on a node. In the dialog that comes up you can add a list of attributes defining the name and the type of each. Supported types in the Graph Designer are: String, Integer, Double, Boolean, Web link, Enumeration, PaintFormat, StrokeFormat, FontFormat and nested AttributeSets to create hierarchical structures.
Another way of adding information to a graph element is setting a NodeInfo or EdgeInfo to the graph element. This can be defined freely by the application code and only has to implement a small interface, so it automatically gets copied along with the node on copy/paste operations.
Q) How do I layout a simple graph?
A) The following example shows how to use a LayoutController to apply layouts on a graph. For this purpose we use the GraphLayoutController class located in the Layout package.
// Step 1: Initializing
// create an instance of the GraphLayoutController:
GraphLayoutController layoutController = new GraphLayoutController();
// say to your VisualGraphView which LayoutController you want to use:
myVisualgraph.setLayoutController(layoutController);
// Step 2: Applying layout
// get the reference of the associated LayoutController
LayoutController layoutCntr = myVisualgraph.getLayoutController();
// set the layout context that should be used:
layoutCntr.setNodeLayoutContext(GraphLayoutController.Energy);
// apply the layout
if (!layoutCntr.apply())
{
System.err.println("Error: " + layoutCntr.getErrorMessage());
} |
Q) Which layout algorithms are provided?
A) The Tensegrity Graph Framework provides a hierarchical layout algorithm, a tree, an organization chart, a circular and an energy layout algorithm for lay outing nodes and edges of graphs. Furthermore, it provides an edge layout algorithm, which may be used to refine the layout of the edges after they are routed by other layout algorithms.
It maintains the current edge routes but improves their layout using additional layout features like building bridges at the crossing points or dispersing overlapped edges etc.
Furthermore, it can be used to route edges during the user interaction.
Q) How do I configure a layout module?
A) The Layout Controller provides the necessary methods to configure registered layout algorithms. The following methods are defined for this purpose:
setLayoutAttribute(String layoutContext, String key, Object value)
setLayoutAttributeSet(String layoutContext, AttributeSet attributeSet)
Object getLayoutAttribute(String layoutContext, String key)
AttributeSet getLayoutAttributeSet(String layoutContext) |
Q) What is the purpose of "Layout Controller"?
A) The Layout Controller is the main class for managing available layout algorithms and applying them on graphs in the Framework. Each class that implements a layout algorithm should be registered in Layout Controller before it can be used in the Tensegrity Graph Framework.
The Layout Controller makes it possible to consider different layout algorithms as black boxes and treat them in the same way.
The Layout Controller provides a set of important methods for import /export, animation and configuration of the layout algorithm. It also provides some useful call back methods for implementation of application specified codes.
Q) How do I lay out graphs permanently?
A) The Layout Controller defines the methods
enableDynamicNodeLayout(boolean layoutPermanent)
enableDynamicEdgeLayout(boolean layoutPermanent)
|
for this purpose.
The method enableDynamicNodeLayout() may be used to determine whether the LayoutController should apply a layout on the whole graph automatically after each relevant modification.
The method enableDynamicEdgeLayout() may be used to determine whether the LayoutController should perform an edge layout automatically after modifications. The method enableDynamicEdgeLayout() should be used if user interactions are permitted. The LayoutController will apply an edge layout whenever it is necessary.