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


Java LayoutManager.getConstraint方法代码示例

本文整理汇总了Java中org.eclipse.draw2d.LayoutManager.getConstraint方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutManager.getConstraint方法的具体用法?Java LayoutManager.getConstraint怎么用?Java LayoutManager.getConstraint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.draw2d.LayoutManager的用法示例。


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

示例1: reorderChild

import org.eclipse.draw2d.LayoutManager; //导入方法依赖的package包/类
/**
 * Had to be overridden to take into account the fact that components are at the end of the children list of editpart. Since this function is called with a
 * different index for normal child and components, we had to change this.
 * 
 * @see #addChild(EditPart child, int index)
 * @see org.eclipse.gef.editparts.AbstractEditPart#reorderChild(org.eclipse.gef.EditPart, int)
 */
protected void reorderChild(EditPart child, int index) {
    editPartInProcess = child;
    int i = index;
    if (child.getModel() instanceof IURNContainerRef)
        i += getSpecificationNodeEditParts().size();

    // Save the constraint of the child so that it does not
    // get lost during the remove and re-add.
    IFigure childFigure = ((GraphicalEditPart) child).getFigure();
    LayoutManager layout = getContentPane().getLayoutManager();
    Object constraint = null;
    if (layout != null)
        constraint = layout.getConstraint(childFigure);

    removeChildVisual(child);
    List children = getChildren();
    children.remove(child);
    children.add(i, child);
    addChildVisual(child, index);

    setLayoutConstraint(child, childFigure, constraint);

    editPartInProcess = null;
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:32,代码来源:URNDiagramEditPart.java

示例2: reorderChild

import org.eclipse.draw2d.LayoutManager; //导入方法依赖的package包/类
@Override
protected void reorderChild(EditPart child, int index) {
	IFigure childFigure = ((GraphicalEditPart) child).getFigure();
	LayoutManager layout = getContainer().getLayoutManager();
	Object constraint = null;
	if (layout != null)
		constraint = layout.getConstraint(childFigure);

	super.reorderChild(child, index);
	setLayoutConstraint(child, childFigure, constraint);
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:12,代码来源:ScrollViewEditPart.java

示例3: reorderChild

import org.eclipse.draw2d.LayoutManager; //导入方法依赖的package包/类
/**
 * This method is extended to preserve a LayoutManager constraint if one
 * exists.
 * 
 * @see org.eclipse.gef.editparts.AbstractEditPart#reorderChild(EditPart,
 *      int)
 */
protected void reorderChild(EditPart child, int index) {
	// Save the constraint of the child so that it does not
	// get lost during the remove and re-add.
	IFigure childFigure = ((GraphicalEditPart) child).getFigure();
	LayoutManager layout = getContentPane().getLayoutManager();
	Object constraint = null;
	if (layout != null)
		constraint = layout.getConstraint(childFigure);

	super.reorderChild(child, index);
	setLayoutConstraint(child, childFigure, constraint);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:20,代码来源:AbstractGraphicalEditPart.java


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