当前位置: 首页>>代码示例>>Java>>正文


Java NonResizableEditPolicy类代码示例

本文整理汇总了Java中org.eclipse.gef.editpolicies.NonResizableEditPolicy的典型用法代码示例。如果您正苦于以下问题:Java NonResizableEditPolicy类的具体用法?Java NonResizableEditPolicy怎么用?Java NonResizableEditPolicy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


NonResizableEditPolicy类属于org.eclipse.gef.editpolicies包,在下文中一共展示了NonResizableEditPolicy类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createEditPolicies

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected void createEditPolicies()
{
  installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
      new NonResizableEditPolicy());

  installEditPolicy(EditPolicy.CONTAINER_ROLE, new AxisContainerEditPolicy());

  installEditPolicy(EditPolicy.COMPONENT_ROLE, new ComponentEditPolicy()
  {
    protected Command createDeleteCommand(GroupRequest deleteRequest)
    {
      DependentAxis dataset = (DependentAxis) getHost().getModel();
      Chart parent = (Chart) dataset.eContainer();
      DeleteAxisFromChartCommand cmd =
          new DeleteAxisFromChartCommand(parent, dataset);
      return cmd;
    }
  });
}
 
开发者ID:debrief,项目名称:limpet,代码行数:21,代码来源:AxisEditPart.java

示例2: createEditPolicies

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected void createEditPolicies()
{
  installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
      new NonResizableEditPolicy());
  installEditPolicy(EditPolicy.COMPONENT_ROLE, new ComponentEditPolicy()
  {
    protected Command createDeleteCommand(GroupRequest deleteRequest)
    {
      Dataset dataset = (Dataset) getHost().getModel();
      DependentAxis parent = (DependentAxis) getHost().getParent().getModel();
      DeleteDatasetsFromAxisCommand cmd =
          new DeleteDatasetsFromAxisCommand(parent, dataset);
      return cmd;
    }
  });
}
 
开发者ID:debrief,项目名称:limpet,代码行数:18,代码来源:DatasetEditPart.java

示例3: createEditPolicies

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected void createEditPolicies()
{
  installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
      new NonResizableEditPolicy());
  installEditPolicy(EditPolicy.CONTAINER_ROLE, new ChartContainerEditPolicy());

  installEditPolicy(EditPolicy.COMPONENT_ROLE, new ComponentEditPolicy()
  {
    protected Command createDeleteCommand(GroupRequest deleteRequest)
    {
      Chart chart = getModel();
      ChartSet parent = chart.getParent();
      DeleteChartCommand deleteChartCommand =
          new DeleteChartCommand(parent, chart);
      return deleteChartCommand;
    }
  });
}
 
开发者ID:debrief,项目名称:limpet,代码行数:20,代码来源:ChartEditPart.java

示例4: createEditPolicies

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected void createEditPolicies()
{
  installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
      new NonResizableEditPolicy());

  installEditPolicy(EditPolicy.COMPONENT_ROLE, new ComponentEditPolicy()
  {
    protected Command createDeleteCommand(GroupRequest deleteRequest)
    {
      // TODO: implement
      // 1. do not use this scatter set in the current chart
      // 2. if scatter set used only here, then delete scatter set from shared axis
      return new DeleteScatterSetCommand(getModel(), getChart());
    }
  });
}
 
开发者ID:debrief,项目名称:limpet,代码行数:18,代码来源:ScatterSetEditPart.java

示例5: createChildEditPolicy

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
	if(child instanceof NodeElementEditPart){
		return new ResizableEditPolicy();
	}else{
		return new NonResizableEditPolicy();			
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:9,代码来源:NodeXYLayoutEditPolicy.java

示例6: createSizeableEditPolicy

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
/**
 * createSizeableEditPolicy
 * 
 * @return EditPolicy
 */
private EditPolicy createSizeableEditPolicy() {
    return new NonResizableEditPolicy() {
        @Override
        protected void setSelectedState(int type) {
            if (getHost().getParent().getParent().getSelected() == EditPart.SELECTED
                || getHost().getParent().getParent().getSelected() == EditPart.SELECTED_PRIMARY) {
                super.setSelectedState(EditPart.SELECTED_NONE);
            } else {
                super.setSelectedState(type);
            }
        }
    };
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:19,代码来源:AbstractChildCompartmentEditPart.java

示例7: createEditPolicies

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
/**
 * @see nexcore.tool.uml.ui.core.diagram.edit.part.AbstractNotationNodeEditPart#createEditPolicies()
 */
@Override
protected void createEditPolicies() {
    super.createEditPolicies();
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy());
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:9,代码来源:DestructionEventEditPart.java

示例8: createEditPolicies

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected void createEditPolicies()
{
  installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
      new NonResizableEditPolicy());
}
 
开发者ID:debrief,项目名称:limpet,代码行数:7,代码来源:SharedAxisEditPart.java

示例9: createEditPolicies

import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected void createEditPolicies()
{
  installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new NonResizableEditPolicy());
}
 
开发者ID:UBPL,项目名称:jive,代码行数:6,代码来源:ExecutionOccurrenceEditPart.java


注:本文中的org.eclipse.gef.editpolicies.NonResizableEditPolicy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。