• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Connection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setHighlighted

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
private void setHighlighted(boolean b) {
       this.highlighted = b;
Set<Object> highlightedObjects = new HashSet<>(scene.getHighlightedObjects());
Set<Object> highlightedObjectsChange = new HashSet<>();
       for (Connection c : connections) {
	highlightedObjectsChange.add(c.getInputSlot().getFigure());
	highlightedObjectsChange.add(c.getInputSlot());
	highlightedObjectsChange.add(c.getOutputSlot().getFigure());
	highlightedObjectsChange.add(c.getOutputSlot());
       }
if(b) {
	highlightedObjects.addAll(highlightedObjectsChange);
} else {
	highlightedObjects.removeAll(highlightedObjectsChange);
}
scene.setHighlightedObjects(highlightedObjects);
       this.revalidate(true);
   }
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:19,代码来源:LineWidget.java


示例2: setHighlighted

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
private void setHighlighted(boolean b) {
    this.highlighted = b;
    Set<Object> highlightedObjects = new HashSet<>(scene.getHighlightedObjects());
    Set<Object> highlightedObjectsChange = new HashSet<>();
    for (Connection c : connections) {
        highlightedObjectsChange.add(c.getInputSlot().getFigure());
        highlightedObjectsChange.add(c.getInputSlot());
        highlightedObjectsChange.add(c.getOutputSlot().getFigure());
        highlightedObjectsChange.add(c.getOutputSlot());
    }
    if(b) {
        highlightedObjects.addAll(highlightedObjectsChange);
    } else {
        highlightedObjects.removeAll(highlightedObjectsChange);
    }
    scene.setHighlightedObjects(highlightedObjects);
    this.revalidate(true);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:LineWidget.java


示例3: apply

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
@Override
public void apply(Diagram d) {
    List<Figure> figures = d.getFigures();
    for (Figure f : figures) {
        for (InputSlot is : f.getInputSlots()) {
            for (Connection c : is.getConnections()) {
                String type = c.getType();
                if (type == "Association" && "EndNode".equals(c.getOutputSlot().getFigure().getProperties().get("class"))) {
                    type = "Successor";
                }

                if (type != null) {
                    Color typeColor = usageColor.get(type);
                    if (typeColor == null) {
                        c.setColor(otherUsageColor);
                    } else {
                        c.setColor(typeColor);
                    }
                    if (c.getStyle() != ConnectionStyle.DASHED && type == "Successor") {
                        c.setStyle(ConnectionStyle.BOLD);
                    }
                }
            }
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:GraalEdgeColorFilter.java


示例4: applyRule

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
private void applyRule(ColorRule rule, Figure f) {
    if (rule.getColor() != null) {
        f.setColor(rule.getColor());
    }
    Color color = rule.getLineColor();
    ConnectionStyle style = rule.getLineStyle();

    for (OutputSlot s : f.getOutputSlots()) {
        for (Connection c : s.getConnections()) {
            if (color != null) {
                c.setColor(color);
            }

            if (style != null) {
                c.setStyle(style);
            }
        }
    }
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:20,代码来源:ColorFilter.java


示例5: apply

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:24,代码来源:ConnectionFilter.java


示例6: apply

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
public void apply(Diagram d) {
    List<Figure> list = selector.selected(d);

    for (Figure f : list) {
        for (OutputSlot os : f.getOutputSlots()) {
            for (Connection c : os.getConnections()) {
                InputSlot is = c.getInputSlot();
                is.setName(f.getProperties().get("dump_spec"));
                String s = f.getProperties().get("short_name");
                if (s != null) {
                    is.setShortName(s);
                }
            }
        }

        d.removeFigure(f);
    }
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:19,代码来源:SplitFilter.java


示例7: DiagramConnectionWidget

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
/** Creates a new instance of ConnectionWidget */
public DiagramConnectionWidget(Connection connection, Scene scene) {
    super(scene);
    this.connection = connection;
    color = connection.getColor();
    if (connection.getStyle() == Connection.ConnectionStyle.DASHED) {
        this.setStroke(DASHED_STROKE);
    } else if (connection.getStyle() == Connection.ConnectionStyle.BOLD) {
        this.setStroke(BOLD_STROKE);
    } else {
        this.setStroke(NORMAL_STROKE);
    }
    this.setCheckClipping(true);
    clientArea = new Rectangle();
    updateControlPoints();
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:17,代码来源:DiagramConnectionWidget.java


示例8: generateToolTipText

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
private String generateToolTipText(List<Connection> conn) {
    StringBuilder sb = new StringBuilder();
    for (Connection c : conn) {
        sb.append(c.getToolTipText());
        sb.append("<br>");
    }
    return sb.toString();
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:9,代码来源:LineWidget.java


示例9: apply

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
@Override
public void apply(Diagram d) {
    List<Figure> figures = d.getFigures();
    for (Figure f : figures) {
        Properties p = f.getProperties();
        int predCount;
        String predCountString = p.get("predecessorCount");
        if (predCountString != null) {
            predCount = Integer.parseInt(predCountString);
        } else if (Boolean.parseBoolean(p.get("hasPredecessor"))) {
            predCount = 1;
        } else {
            predCount = 0;
        }
        for (InputSlot is : f.getInputSlots()) {
            Color color;
            ConnectionStyle style = ConnectionStyle.NORMAL;
            if (is.getPosition() < predCount) {
                color = successorColor;
                style = ConnectionStyle.BOLD;
            } else {
                color = usageColor;
            }

            is.setColor(color);
            for (Connection c : is.getConnections()) {
                if (c.getLabel() == null || !c.getLabel().endsWith("#NDF")) {
                    c.setColor(color);
                    if (c.getStyle() != ConnectionStyle.DASHED) {
                        c.setStyle(style);
                    }
                } else if ("EndNode".equals(c.getOutputSlot().getFigure().getProperties().get("class"))
                        || "EndNode".equals(c.getOutputSlot().getProperties().get("class"))) {
                    c.setColor(successorColor);
                    c.setStyle(ConnectionStyle.BOLD);
                }
            }
        }
    }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:41,代码来源:GraalEdgeColorFilter.java


示例10: apply

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
@Override
public void apply(Diagram d) {
    List<Figure> figures = d.getFigures();
    for (Figure f : figures) {
        Properties p = f.getProperties();
        int predCount;
        if (p.get("predecessorCount") != null) {
            predCount = Integer.parseInt(p.get("predecessorCount"));
        } else {
            predCount = 0;
        }
        for (InputSlot is : f.getInputSlots()) {
            Color color;
            ConnectionStyle style = ConnectionStyle.NORMAL;
            if (is.getPosition() < predCount) {
                color = successorColor;
                style = ConnectionStyle.BOLD;
            } else {
                color = usageColor;
            }

            is.setColor(color);
            for (Connection c : is.getConnections()) {
                if (c.getLabel() == null || !c.getLabel().endsWith("#NDF")) {
                    c.setColor(color);
                    if (c.getStyle() != ConnectionStyle.DASHED) {
                        c.setStyle(style);
                    }
                } else if ("EndNode".equals(c.getOutputSlot().getFigure().getProperties().get("class"))
                        || "EndNode".equals(c.getOutputSlot().getProperties().get("class"))) {
                    c.setColor(successorColor);
                    c.setStyle(ConnectionStyle.BOLD);
                }
            }
        }
    }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:38,代码来源:GraalEdgeColorFilter.java


示例11: generateToolTipText

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
private String generateToolTipText(List<Connection> conn) {
    StringBuilder sb = new StringBuilder();
    for (Connection c : conn) {
        sb.append(StringUtils.escapeHTML(c.getToolTipText()));
        sb.append("<br>");
    }
    return sb.toString();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:LineWidget.java


示例12: ColorRule

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
public ColorRule(Selector selector, Color c, Color lineColor, Connection.ConnectionStyle lineStyle) {
    this.selector = selector;
    this.color = c;
    this.lineColor = lineColor;
    this.lineStyle = lineStyle;

}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:8,代码来源:ColorFilter.java


示例13: isVisible

import com.sun.hotspot.igv.graph.Connection; //导入依赖的package包/类
private boolean isVisible(Connection c) {
    FigureWidget w1 = figureWidgets.get(c.getInputSlot().getFigure());
    FigureWidget w2 = figureWidgets.get(c.getOutputSlot().getFigure());

    if (w1.isVisible() && w2.isVisible()) {
        return true;
    }

    return false;
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:11,代码来源:DiagramScene.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Plastic3DLookAndFeel类代码示例发布时间:2022-05-22
下一篇:
Java ChangeListManagerImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap