本文整理汇总了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;
}
});
}
示例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;
}
});
}
示例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;
}
});
}
示例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());
}
});
}
示例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();
}
}
示例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);
}
}
};
}
示例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());
}
示例8: createEditPolicies
import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected void createEditPolicies()
{
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
new NonResizableEditPolicy());
}
示例9: createEditPolicies
import org.eclipse.gef.editpolicies.NonResizableEditPolicy; //导入依赖的package包/类
@Override
protected void createEditPolicies()
{
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new NonResizableEditPolicy());
}