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


Java LayoutManager类代码示例

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


LayoutManager类属于org.eclipse.draw2d包,在下文中一共展示了LayoutManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: createFigure

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
/**
 * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
 */
@Override
protected IFigure createFigure() {
    Figure fiugre = new FreeformLayer();
    fiugre.setBorder(new MarginBorder(10));
    fiugre.setLayoutManager(new FreeformLayout());
    fiugre.setOpaque(false);

    LayoutManager layout = new ActivityDiagramLayout();
    fiugre.setLayoutManager(layout);

    return fiugre;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:16,代码来源:ActivityDiagramEditPart.java

示例4: refreshFeedbackInDisplayThread

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
private void refreshFeedbackInDisplayThread() {
	GEFUtils.runLaterInDisplayThread(getHost(), new Runnable() {
		@Override
		public void run() {
			IFigure f = getHostFigure();
			LayoutManager layout = f.getParent().getLayoutManager();
			layout.invalidate();
			f.getParent().repaint();
			textOverlayFigure.revalidate();
			textOverlayFigure.repaint();
		}
	});
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:14,代码来源:TemporalNodeDecoratorTextEditPolicy.java

示例5: 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

示例6: calculatePreferredSize

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
protected Dimension calculatePreferredSize( IFigure container, int wHint,
		int hHint )
{		
	Rectangle rect = container.getParent( ).getClientArea( ).getCopy( );
	List list = container.getChildren( );
	if (list.size( ) == 0)
	{
		return Dimension.SINGLETON;
	}
	
	Figure child = (Figure)list.get( 0 );
	
	wHint = Math.max( -1, wHint - container.getInsets( ).getWidth( ) );
	hHint = Math.max( -1, hHint - container.getInsets( ).getHeight( ) );
	
	wHint = Math.max( wHint,rect.width - container.getInsets( ).getWidth( ) );
	hHint = Math.max( hHint, rect.height - container.getInsets( ).getHeight( ) );
	
	if (child instanceof TableFigure && needlayout)
	{
		IFigure tablePane = ( (LayeredPane) ( (LayeredPane) ( (TableFigure) child ).getContents( ) ).getLayer( LayerConstants.PRINTABLE_LAYERS ) ).getLayer( LayerConstants.PRIMARY_LAYER );
		LayoutManager layoutManager = tablePane.getLayoutManager( );
		
		( (TableLayout) layoutManager ).markDirty( );
		container.getBounds( ).width = wHint;
		container.getBounds( ).height = hHint;
		//child.invalidateTree( );
		child.validate( );
		
		//dim = getPreferredSize( container, wHint, hHint ).expand( container.getInsets( ).getWidth( ), container.getInsets( ).getHeight( ) );;
		needlayout = false;
	}
	
	Dimension dim = child.getPreferredSize(wHint, hHint ).expand( container.getInsets( ).getWidth( ), container.getInsets( ).getHeight( ) );

	return dim;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:38,代码来源:MultipleLayout.java

示例7: getLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
protected LayoutManager getLayoutManager() {
	return new StackLayout();
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:4,代码来源:FixedSizeShapeNodeEditPart.java

示例8: setLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
/**
 * Not intended to be called
 */
@Override
public void setLayoutManager(LayoutManager manager)
{
  throw new UnsupportedOperationException("Layout manager is read-only");
}
 
开发者ID:debrief,项目名称:limpet,代码行数:9,代码来源:DirectionalShape.java

示例9: createLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
@Override
protected LayoutManager createLayoutManager() {
  return new SequenceLayout();
}
 
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:5,代码来源:RailroadTrack.java

示例10: createLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
@Override
protected LayoutManager createLayoutManager() {
  return new ParallelLayout(ILayoutConstants.connectionRadius());
}
 
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:5,代码来源:LoopSegment.java

示例11: createLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
@Override
protected LayoutManager createLayoutManager() {
  ToolbarLayout layout = new ToolbarLayout();
  layout.setSpacing(ILayoutConstants.vSpaceBetweenTracks());
  return layout;
}
 
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:7,代码来源:RailroadDiagram.java

示例12: createLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
@Override
protected LayoutManager createLayoutManager() {
  return new ParallelLayout();
}
 
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:5,代码来源:ParallelSegment.java

示例13: createLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
@Override
protected LayoutManager createLayoutManager() {
  return new CompartmentLayout();
}
 
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:5,代码来源:CompartmentSegment.java

示例14: getLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
@Override
public LayoutManager getLayoutManager() {
    return delegate.getLayoutManager();
}
 
开发者ID:Polyglotter,项目名称:chrysalix,代码行数:5,代码来源:FocusTreeCanvas.java

示例15: setLayoutManager

import org.eclipse.draw2d.LayoutManager; //导入依赖的package包/类
@Override
public void setLayoutManager( final LayoutManager manager ) {
    delegate.setLayoutManager( manager );
}
 
开发者ID:Polyglotter,项目名称:chrysalix,代码行数:5,代码来源:FocusTreeCanvas.java


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