Package org.gvt.action

Source Code of org.gvt.action.ChangeMarginAction

package org.gvt.action;

import org.eclipse.jface.action.Action;
import org.gvt.model.CompoundModel;
import org.gvt.model.CompoundModel;

/**
* This class maintains the action for changing the margins of compound nodes.
*
* @author Cihan Kucukkececi
*
* Copyright: I-Vis Research Group, Bilkent University, 2007
*/
public class ChangeMarginAction extends Action
{
  // Root model of the graph
  CompoundModel root;

  // new value for margin of compound nodes
  int newMargin;

  public ChangeMarginAction(CompoundModel root, int margin)
  {
    this.root = root;
    newMargin = margin;
  }

  public void run()
  {
    // creates a new compound model for setting the margin value
    CompoundModel cm = new CompoundModel();
    cm.setParentModel(root);
    cm.setMarginSize(newMargin);
  }
}
TOP

Related Classes of org.gvt.action.ChangeMarginAction

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.