Package org.gvt.editpolicy

Source Code of org.gvt.editpolicy.ChsDirectEditPolicy

package org.gvt.editpolicy;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.DirectEditPolicy;
import org.eclipse.gef.requests.DirectEditRequest;
import org.gvt.command.DirectEditCommand;

/**
* @author Cihan Kucukkececi
*
* Copyright: I-Vis Research Group, Bilkent University, 2007
*/
public class ChsDirectEditPolicy extends DirectEditPolicy
{
  protected Command getDirectEditCommand(DirectEditRequest request)
  {
    DirectEditCommand command = new DirectEditCommand();
    command.setModel(getHost().getModel());
    command.setText((String) request.getCellEditor().getValue());
    return command;
  }

  /* (�� Javadoc)
   * @see org.eclipse.gef.editpolicies.DirectEditPolicy#showCurrentEditValue(org.eclipse.gef.requests.DirectEditRequest)
   */
  protected void showCurrentEditValue(DirectEditRequest request)
  {
  }
}
TOP

Related Classes of org.gvt.editpolicy.ChsDirectEditPolicy

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.