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


Java PolylineConnection.setLineWidth方法代码示例

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


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

示例1: setConnectionState

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
/**
 * Set graphics attribute according to the connection state
 * 
 * @param connection
 *            the connection to change
 * @param state
 *            the state
 */
protected void setConnectionState ( final PolylineConnection connection, final boolean state )
{
    final PolygonDecoration dec = new PolygonDecoration ();
    dec.setTemplate ( PolygonDecoration.TRIANGLE_TIP );

    connection.setLineStyle ( state ? Graphics.LINE_SOLID : Graphics.LINE_DOT );
    connection.setLineWidth ( state ? 2 : 1 );
    connection.setTargetDecoration ( state ? dec : null );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:ManualOverride.java

示例2: createFigure

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
@Override
protected IFigure createFigure() {
	final PolylineConnection res = (PolylineConnection)super.createFigure();

	res.setLineWidth(1);
	// PolygonDecoration decoration = new PolygonDecoration();
	// decoration.setTemplate(PolygonDecoration.TRIANGLE_TIP);
	// res.setTargetDecoration(decoration);
	res.setLineStyle(SWT.LINE_SOLID);
	res.setBackgroundColor(ColorConstants.listForeground);

	return res;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:14,代码来源:ConnectionEditPart.java

示例3: createFigure

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
/**
 * Creates a Connection and adds appropriate decorations.
 * 
 * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
 */
protected IFigure createFigure() {
    PolylineConnection connection = new PolylineConnection();

    connection.setLineWidth(2);
    connection.setLineStyle(SWT.LINE_DASH);
    connection.setAntialias(GeneralPreferencePage.getAntialiasingPref());
    return connection;
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:14,代码来源:BeliefLinkEditPart.java

示例4: setSelected

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
@Override
public void setSelected(int value) {
	if (!getFigure().isVisible())
		return;
	PolylineConnection figure = (PolylineConnection) getFigure();
	if (value != EditPart.SELECTED_NONE) {
		figure.setLineWidth(2);
		figure.setForegroundColor(Link.HIGHLIGHT_COLOR);
	} else {
		figure.setLineWidth(1);
		figure.setForegroundColor(Link.COLOR);
	}
	super.setSelected(value);
}
 
开发者ID:GreenDelta,项目名称:olca-app,代码行数:15,代码来源:LinkPart.java

示例5: addSelectionHandles

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
protected void addSelectionHandles() {
	super.addSelectionHandles();
	PolylineConnection figure = getConnectionFigure();
	figure.setLineWidth(3);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:6,代码来源:ConnectionEndpointExtEditPolicy.java

示例6: createFigure

import org.eclipse.draw2d.PolylineConnection; //导入方法依赖的package包/类
@Override
protected IFigure createFigure()
{
  final PolylineConnection connection = new PolylineConnection();
  // connection.setAntialias(SWT.ON);
  connection.setLineStyle(SWT.LINE_SOLID);
  // connection.setLineWidthFloat(2.5f);
  connection.setLineWidth(2);
  connection.setTargetDecoration(new PolygonDecoration());
  final IContourMember instance = (IContourMember) getModel();
  // return point reference
  if (instance.schema().modifiers().contains(NodeModifier.NM_RPDL))
  {
    final ContourDiagramEditPart contents = (ContourDiagramEditPart) getRoot().getContents();
    final IJiveDebugTarget target = contents.getModel();
    IMethodContour contour = null;
    final IValue value = instance.value();
    if (value.isMethodContourReference())
    {
      contour = (IMethodContour) ((IContourReference) value).contour();
    }
    else if (value.isOutOfModelMethodReference())
    {
      final IOutOfModelMethodReference targetValue = (IOutOfModelMethodReference) value;
      contour = targetValue.method();
      connection.setLineStyle(SWT.LINE_CUSTOM); // LINE_DOT
      connection.setLineDash(new float[]
      { 5.0f, 2.0f });
      // connection.setLineWidthFloat(2.25f);
      connection.setLineWidth(2);
    }
    final IThreadColorManager manager = JiveUIPlugin.getDefault().getThreadColorManager();
    final Color c = manager.threadColor(target, contour.thread());
    connection.setForegroundColor(c);
  }
  // local variable reference
  else if (instance.schema().kind() != NodeKind.NK_FIELD)
  {
    connection.setLineStyle(SWT.LINE_CUSTOM); // LINE_DOT
    connection.setLineDash(new float[]
    { 5.0f, 2.0f });
    connection.setLineWidth(2);
    // connection.setLineWidthFloat(2.25f);
    connection.setLineStyle(SWT.LINE_DASH);
    connection.setForegroundColor(ColorConstants.gray);
  }
  // field reference
  else
  {
    connection.setLineWidth(1);
    // connection.setLineWidthFloat(1.25f);
    connection.setForegroundColor(ColorConstants.darkGray);
  }
  return connection;
}
 
开发者ID:UBPL,项目名称:jive,代码行数:56,代码来源:ContourConnectionEditPart.java


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