Package org.eclipse.sapphire.ui.swt.gef.actions

Source Code of org.eclipse.sapphire.ui.swt.gef.actions.VerticalGraphLayoutActionHandler

/******************************************************************************
* Copyright (c) 2014 Oracle
* 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:
*    Ling Hao - initial implementation and ongoing maintenance
******************************************************************************/

package org.eclipse.sapphire.ui.swt.gef.actions;

import org.eclipse.sapphire.ui.Presentation;
import org.eclipse.sapphire.ui.SapphireActionHandler;
import org.eclipse.sapphire.ui.swt.gef.SapphireDiagramEditor;
import org.eclipse.sapphire.ui.swt.gef.layout.VerticalGraphLayout;
import org.eclipse.sapphire.ui.swt.gef.presentation.DiagramPresentation;

/**
* @author <a href="mailto:ling.hao@oracle.com">Ling Hao</a>
*/

public class VerticalGraphLayoutActionHandler extends SapphireActionHandler
{
  @Override
  protected Object run( final Presentation context )
  {
    DiagramPresentation diagramPresentation = (DiagramPresentation)context;
    SapphireDiagramEditor diagramEditor = diagramPresentation.getConfigurationManager().getDiagramEditor();
    new VerticalGraphLayout().layout(diagramEditor);
   
    return null;
  }

}
TOP

Related Classes of org.eclipse.sapphire.ui.swt.gef.actions.VerticalGraphLayoutActionHandler

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.