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


Java ConnectionStyle类代码示例

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


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

示例1: applyRule

import com.sun.hotspot.igv.graph.Connection.ConnectionStyle; //导入依赖的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:arodchen,项目名称:MaxSim,代码行数:20,代码来源:ColorFilter.java

示例2: apply

import com.sun.hotspot.igv.graph.Connection.ConnectionStyle; //导入依赖的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

示例3: ColorRule

import com.sun.hotspot.igv.graph.Connection.ConnectionStyle; //导入依赖的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:arodchen,项目名称:MaxSim,代码行数:8,代码来源:ColorFilter.java

示例4: apply

import com.sun.hotspot.igv.graph.Connection.ConnectionStyle; //导入依赖的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

示例5: apply

import com.sun.hotspot.igv.graph.Connection.ConnectionStyle; //导入依赖的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

示例6: getLineStyle

import com.sun.hotspot.igv.graph.Connection.ConnectionStyle; //导入依赖的package包/类
public Connection.ConnectionStyle getLineStyle() {
    return lineStyle;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:4,代码来源:ColorFilter.java


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