import org.eclipse.zest.core.widgets.ZestStyles;
import org.eclipse.zest.layouts.LayoutAlgorithm;
import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.CompositeLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.HorizontalShift;
import org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
@Override
public void controlResized(ControlEvent e) {
- applyLayout();
+ // applyLayout();
}
@Override
public void refresh() {
graphViewer.refresh();
- graphViewer.applyLayout();
+ // graphViewer.applyLayout();
}
@Override
private LayoutAlgorithm getLayoutAlgoritm() {
if (layoutAlgoritm == null) {
- layoutAlgoritm = new TreeLayoutAlgorithm(
- LayoutStyles.NO_LAYOUT_NODE_RESIZING);
- layoutAlgoritm.setEntityAspectRatio(2.5);
+ layoutAlgoritm = new CompositeLayoutAlgorithm(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING,
+ new LayoutAlgorithm[] {
+ new TreeLayoutAlgorithm(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING),
+ new HorizontalShift(
+ LayoutStyles.NO_LAYOUT_NODE_RESIZING) });
+
+ // layoutAlgoritm = new TreeLayoutAlgorithm(
+ // LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ // layoutAlgoritm.setEntityAspectRatio(2.5);
}
return layoutAlgoritm;
}