blob: 6ed3a94ad8111650a277dd86ad345428bdf41e11 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Zoltan Ujhelyi - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.visualisation.layouts.algorithms;
import org.eclipse.viatra2.visualisation.layouts.AbstractViatraLayoutAlgorithm;
import org.eclipse.zest.layouts.LayoutAlgorithm;
import org.eclipse.zest.layouts.algorithms.CompositeLayoutAlgorithm;
import org.eclipse.zest.layouts.algorithms.DirectedGraphLayoutAlgorithm;
import org.eclipse.zest.layouts.algorithms.HorizontalShift;
/**
* An algorithm for visualizing hierarchies in a tree.
* @author Zoltan Ujhelyi
*
*/
public class HierarchyAlgorithm extends AbstractViatraLayoutAlgorithm{
public LayoutAlgorithm getAlgorithm() {
CompositeLayoutAlgorithm compositeAlgorithm = new CompositeLayoutAlgorithm(
layoutStyle, new LayoutAlgorithm[] {
new DirectedGraphLayoutAlgorithm(layoutStyle),
new HorizontalShift(layoutStyle) });
return compositeAlgorithm;
}
}