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


Java Polyline类代码示例

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


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

示例1: refreshVisuals

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
/**
 * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
 */
@Override
protected void refreshVisuals() {
    try {
        super.refreshVisuals();
        
        NotationNode notationNode = (NotationNode) getModel();
        Polyline line = (Polyline) this.getFigure();
        line.removeAllPoints();
        line.addPoint(new Point(notationNode.getX(), notationNode.getY()));
        line.addPoint(new Point(notationNode.getX(), notationNode.getY() + notationNode.getHeight()));

        Rectangle bounds = new Rectangle(notationNode.getX(),
            notationNode.getY(),
            notationNode.getWidth(),
            notationNode.getHeight());
        ((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), bounds);
    } catch (Exception e) {
        Log.error(UMLMessage.MESSAGE_INTERACTION_USE_EDIT_PART_REFRESH_VISUALS_ERROR + e);
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:24,代码来源:InteractionUseEditPart.java

示例2: createFigure

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
/**
 * Creates a filled circle containing an L like segment to simulate a clock.
 * 
 * @see seg.jUCMNav.figures.PathNodeFigure#createFigure()
 */
protected void createFigure() {
    ellipse = new Ellipse();
    // we're making it larger than the empty point.
    ellipse.setBounds(new Rectangle(preferredSize.width / 8, preferredSize.height / 8, DEFAULT_WIDTH * 3 / 4, DEFAULT_HEIGHT * 3 / 4));
    ellipse.setAntialias(GeneralPreferencePage.getAntialiasingPref());
    poly = new Polyline();
    poly.addPoint(new Point(DEFAULT_WIDTH / 2, preferredSize.height / 8));
    poly.addPoint(new Point(DEFAULT_WIDTH / 2, DEFAULT_HEIGHT / 2));
    poly.addPoint(new Point(preferredSize.width * 7 / 8, DEFAULT_HEIGHT / 2));
    poly.setAntialias(GeneralPreferencePage.getAntialiasingPref());
    ellipse.add(poly);
    ellipse.setLineWidth(2);
    ellipse.setAntialias(GeneralPreferencePage.getAntialiasingPref());
    poly.setLineWidth(2);

    add(ellipse);

}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:24,代码来源:TimerFigure.java

示例3: addVerticalSeparator

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void addVerticalSeparator(final IFigure figure, final Rectangle rect) {
    final Polyline separator = new Polyline();
    separator.setLineWidth(separatorWidth);
    separator.addPoint(new Point(rect.x, rect.y));
    separator.addPoint(new Point(rect.x, rect.y + rect.height));

    figure.getChildren().add(separator);
    separator.setParent(figure);

    separators.add(separator);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:13,代码来源:TableLayout.java

示例4: addHorizontalSeparator

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void addHorizontalSeparator(final IFigure figure, final Rectangle rect) {
    final Polyline separator = new Polyline();
    separator.setLineWidth(separatorWidth);
    separator.addPoint(new Point(rect.x, rect.y));
    separator.addPoint(new Point(rect.x + rect.width, rect.y));
    figure.getChildren().add(separator);
    separator.setParent(figure);

    separators.add(separator);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:12,代码来源:TableLayout.java

示例5: addVerticalSeparator

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void addVerticalSeparator(IFigure figure, Rectangle rect) {
	Polyline separator = new Polyline();
	separator.setLineWidth(separatorWidth);
	separator.addPoint(new Point(rect.x, rect.y));
	separator.addPoint(new Point(rect.x, rect.y + rect.height));

	figure.getChildren().add(separator);
	separator.setParent(figure);

	this.separators.add(separator);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:13,代码来源:TableLayout.java

示例6: addHorizontalSeparator

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void addHorizontalSeparator(IFigure figure, Rectangle rect) {
	Polyline separator = new Polyline();
	separator.setLineWidth(separatorWidth);
	separator.addPoint(new Point(rect.x, rect.y));
	separator.addPoint(new Point(rect.x + rect.width, rect.y));
	figure.getChildren().add(separator);
	separator.setParent(figure);

	this.separators.add(separator);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:12,代码来源:TableLayout.java

示例7: createFigure

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
/**
 * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
 */
@Override
protected IFigure createFigure() {
    NotationNode notationNode = (NotationNode) getModel();
    Polyline line = new Polyline();
    line.setOpaque(false);
    line.addPoint(new Point(notationNode.getX(), notationNode.getY()));
    line.addPoint(new Point(notationNode.getX(), notationNode.getY() + 100));
    line.setLineWidth(2);
    line.setForegroundColor(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.DimGray));
    line.setLineStyle(Graphics.LINE_DASH);
    return line;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:16,代码来源:InteractionUseEditPart.java

示例8: createContents

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
/**
 * createContents
 *   void
 */
private void createContents() {

    setLayoutManager(new InteractionOperandLayout());
            
    operandUnderBoundary = new Polyline();
    operandUnderBoundary.setFill(true);
    operandUnderBoundary.setOpaque(true);
    operandUnderBoundary.setLineWidth(1);
    operandUnderBoundary.setLineStyle(Graphics.LINE_DASH);
    operandUnderBoundary.setForegroundColor(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.DimGray));
    this.add(operandUnderBoundary);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:17,代码来源:InteractionOperandFigure.java

示例9: getChildren

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
private List<IFigure> getChildren(IFigure parent) {
    final List<IFigure> children = new ArrayList<>();

    for (@SuppressWarnings("unchecked")
    final Iterator<Polyline> iter = parent.getChildren().iterator(); iter.hasNext();) {
        final IFigure child = iter.next();

        if (!separators.contains(child)) {
            children.add(child);
        }
    }

    return children;
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:15,代码来源:TableLayout.java

示例10: clearSeparator

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private List<IFigure> clearSeparator(IFigure parent) {
    for (final Iterator<Polyline> iter = parent.getChildren().iterator(); iter.hasNext();) {
        final IFigure child = iter.next();

        if (separators.contains(child)) {
            iter.remove();
        }
    }

    separators.clear();

    return parent.getChildren();
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:15,代码来源:TableLayout.java

示例11: addVerticalSeparator

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void addVerticalSeparator(IFigure figure, Rectangle rect) {
    final Polyline separator = new Polyline();
    separator.setLineWidth(separatorWidth);
    separator.addPoint(new Point(rect.x, rect.y));
    separator.addPoint(new Point(rect.x, rect.y + rect.height));

    figure.getChildren().add(separator);
    separator.setParent(figure);

    separators.add(separator);
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:13,代码来源:TableLayout.java

示例12: addHorizontalSeparator

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void addHorizontalSeparator(IFigure figure, Rectangle rect) {
    final Polyline separator = new Polyline();
    separator.setLineWidth(separatorWidth);
    separator.addPoint(new Point(rect.x, rect.y));
    separator.addPoint(new Point(rect.x + rect.width, rect.y));
    figure.getChildren().add(separator);
    separator.setParent(figure);

    separators.add(separator);
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:12,代码来源:TableLayout.java

示例13: getStartFigure

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
private Polyline getStartFigure(Rectangle bounds) {
	IPlanModifier modifier = PlanModifierMember.get(getViewer().getPlan()).getModifier();
	if (startFigure != null || !(modifier instanceof ConstrainedPlanModifier)) {
		return null;
	}
	startFigure = getTemporalBoundFigure(Timepoint.START, bounds);
	return startFigure;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:9,代码来源:TemporalNodeMoveEditPolicy.java

示例14: getEndFigure

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
private Polyline getEndFigure(Rectangle bounds) {
	IPlanModifier modifier = PlanModifierMember.get(getViewer().getPlan()).getModifier();
	if (endFigure != null || !(modifier instanceof ConstrainedPlanModifier)) {
		return null;
	}
	endFigure = getTemporalBoundFigure(Timepoint.END, bounds);
	return endFigure;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:9,代码来源:TemporalNodeMoveEditPolicy.java

示例15: showSelection

import org.eclipse.draw2d.Polyline; //导入依赖的package包/类
@Override
protected void showSelection() {
	Polyline line = (Polyline)getHostFigure();
	IFigure p = line.getParent();
	p.remove(line);
	p.add(line);
	line.setLineWidth(3);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:9,代码来源:LinePlotDataSelectionEditPolicy.java


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