本文整理汇总了Java中com.sun.hotspot.igv.graph.Connection.ConnectionStyle.DASHED属性的典型用法代码示例。如果您正苦于以下问题:Java ConnectionStyle.DASHED属性的具体用法?Java ConnectionStyle.DASHED怎么用?Java ConnectionStyle.DASHED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.hotspot.igv.graph.Connection.ConnectionStyle
的用法示例。
在下文中一共展示了ConnectionStyle.DASHED属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
@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);
}
}
}
}
}
}
示例2: apply
@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);
}
}
}
}
}
示例3: apply
@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);
}
}
}
}
}