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


Java PolylineConnection.setSourceAnchor方法代码示例

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


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

示例1: createRoundArrow

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
private void createRoundArrow ( final Figure figure )
{
    final PolylineConnection c = new PolylineConnection ();
    c.setSourceAnchor ( new ChopboxAnchor ( this.sourceRect ) );
    c.setTargetAnchor ( new ChopboxAnchor ( this.targetRect ) );

    final PolygonDecoration dec = new PolygonDecoration ();
    dec.setTemplate ( PolygonDecoration.TRIANGLE_TIP );
    c.setTargetDecoration ( dec );

    final MidpointLocator typeLocator = new MidpointLocator ( c, 0 );
    typeLocator.setRelativePosition ( PositionConstants.NORTH );
    this.typeLabel = new Label ( "" ); //$NON-NLS-1$
    c.add ( this.typeLabel, typeLocator );

    figure.add ( c );
    this.roundConnection = c;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:19,代码来源:RoundDetailsPart.java

示例2: createConnections

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
public void createConnections ( final Layer layer, final SymbolController controller, final EList<Connection> connections )
{
    if ( connections == null )
    {
        return;
    }

    for ( final Connection connection : connections )
    {
        final Controller start = AdapterHelper.adapt ( controller.getElement ( connection.getStart () ), Controller.class );
        final Controller end = AdapterHelper.adapt ( controller.getElement ( connection.getEnd () ), Controller.class );

        if ( start != null && end != null )
        {
            final PolylineConnection c = new PolylineConnection ();
            c.setSourceAnchor ( new ChopboxAnchor ( start.getFigure () ) );
            c.setTargetAnchor ( new ChopboxAnchor ( end.getFigure () ) );
            c.setAntialias ( SWT.ON );
            layer.add ( c );
        }
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:23,代码来源:BasicViewElementFactory.java

示例3: makeConnection

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
private PolylineConnection makeConnection(IFigure contents, IFigure source, NodeFigure target, Color color) {
	PolylineConnection c = new PolylineConnection();
	ConnectionAnchor targetAnchor = new ChopboxAnchor(target);
	c.setTargetAnchor(targetAnchor);
	c.setSourceAnchor(new ChopboxAnchor(source));
	PolygonDecoration decoration = new PolygonDecoration();
	decoration.setTemplate(PolygonDecoration.TRIANGLE_TIP);
	c.setTargetDecoration(decoration);
	c.setForegroundColor(color);
	ConnectionMouseListener listener = new ConnectionMouseListener(c);
	c.addMouseMotionListener(listener);
	c.addMouseListener(listener);
	c.setCursor(Cursors.HAND);
	contents.add(c);
	connections.add(c);
	return c;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:18,代码来源:GraphEditPart.java

示例4: createConnection

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
private PolylineConnection createConnection ( final IFigure source, final IFigure target )
{
    final PolylineConnection c = new PolylineConnection ();
    final ChopboxAnchor sourceAnchor = new ChopboxAnchor ( source );
    final ChopboxAnchor targetAnchor = new ChopboxAnchor ( target );
    c.setSourceAnchor ( sourceAnchor );
    c.setTargetAnchor ( targetAnchor );

    return c;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:ManualOverride.java

示例5: connect

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
private void connect ( final IFigure figure, final IFigure source, final IFigure target )
{
    final PolylineConnection c = new PolylineConnection ();
    c.setSourceAnchor ( new ChopboxAnchor ( source ) );
    c.setTargetAnchor ( new ChopboxAnchor ( target ) );

    final PolygonDecoration dec = new PolygonDecoration ();
    dec.setTemplate ( PolygonDecoration.TRIANGLE_TIP );
    dec.setBackgroundColor ( ColorConstants.black );
    c.setTargetDecoration ( dec );

    figure.add ( c );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:14,代码来源:InputScaleDetails.java

示例6: addPointer

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
private void addPointer(PandionJFigure<?> figure, IReferenceModel ref, IEntityModel target,
		PandionJFigure<?> targetFig) {
	PolylineConnection pointer = new PolylineConnection();
	pointer.setSourceAnchor(new ChopboxAnchor(figure));
	pointer.setTargetAnchor(new PositionAnchor(targetFig, PositionAnchor.Position.LEFT));
	setPointerDecoration(target, pointer);
	addPointerObserver(ref, pointer);
	pane.add(pointer);
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:10,代码来源:FrameViewer.java

示例7: addPointer2D

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
private void addPointer2D(ArrayReferenceFigure figure, IReferenceModel ref, int index, IEntityModel target,
		PandionJFigure<?> targetFig) {
	PolylineConnection pointer = new PolylineConnection();
	pointer.setSourceAnchor(figure.getAnchor(index));
	pointer.setTargetAnchor(new PositionAnchor(targetFig, PositionAnchor.Position.LEFT));
	setPointerDecoration(target, pointer);
	addPointerObserver(ref, pointer);
	pane.add(pointer);
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:10,代码来源:FrameViewer.java

示例8: generateConnection

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
private PolylineConnection generateConnection(Figure source, Figure target) {
	PolylineConnection newconnection = new PolylineConnection();
	newconnection.setSourceAnchor(new ChopboxAnchor(source));
	newconnection.setTargetAnchor(new ChopboxAnchor(target));
	
	return newconnection;
}
 
开发者ID:Joonsoo,项目名称:dexdio,代码行数:8,代码来源:DexClassesViewer.java


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