本文整理汇总了Java中com.sun.hotspot.igv.graph.OutputSlot类的典型用法代码示例。如果您正苦于以下问题:Java OutputSlot类的具体用法?Java OutputSlot怎么用?Java OutputSlot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OutputSlot类属于com.sun.hotspot.igv.graph包,在下文中一共展示了OutputSlot类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: applyRule
import com.sun.hotspot.igv.graph.OutputSlot; //导入依赖的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);
}
}
}
}
示例2: apply
import com.sun.hotspot.igv.graph.OutputSlot; //导入依赖的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());
}
}
}
}
}
}
示例3: apply
import com.sun.hotspot.igv.graph.OutputSlot; //导入依赖的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);
}
}
示例4: OutputSlotWidget
import com.sun.hotspot.igv.graph.OutputSlot; //导入依赖的package包/类
public OutputSlotWidget(OutputSlot slot, DiagramScene scene, Widget parent, FigureWidget fw) {
super(slot, scene, parent, fw);
outputSlot = slot;
//init();
//getFigureWidget().getRightWidget().addChild(this);
Point p = outputSlot.getRelativePosition();
p.y += getSlot().getFigure().getHeight() - Figure.SLOT_START;
p.x -= this.calculateClientArea().width / 2;
//p.x += this.calculateClientArea().width / 2;
this.setPreferredLocation(p);
}
示例5: OutputSlotWidget
import com.sun.hotspot.igv.graph.OutputSlot; //导入依赖的package包/类
public OutputSlotWidget(OutputSlot slot, DiagramScene scene, Widget parent, FigureWidget fw) {
super(slot, scene, parent, fw);
outputSlot = slot;
Point p = outputSlot.getRelativePosition();
p.y += getSlot().getFigure().getHeight() - Figure.SLOT_START;
p.x -= this.calculateClientArea().width / 2;
this.setPreferredLocation(p);
}
示例6: paintWidget
import com.sun.hotspot.igv.graph.OutputSlot; //导入依赖的package包/类
@Override
protected void paintWidget() {
if (scene.getRealZoomFactor() < ZOOM_FACTOR) {
return;
}
if (bufferImage == null) {
Graphics2D g = this.getGraphics();
g.setColor(Color.DARK_GRAY);
int w = this.getBounds().width;
int h = this.getBounds().height;
if (getSlot().getShortName() != null && getSlot().getShortName().length() > 0 && scene.getRealZoomFactor() >= TEXT_ZOOM_FACTOR) {
Font f = new Font("Arial", Font.PLAIN, 8);
g.setFont(f.deriveFont(7.5f));
Rectangle2D r1 = g.getFontMetrics().getStringBounds(getSlot().getShortName(), g);
g.drawString(getSlot().getShortName(), (int) (this.getBounds().width - r1.getWidth()) / 2, (int) (this.getBounds().height + r1.getHeight()) / 2);
} else {
if (slot instanceof OutputSlot) {
g.fillArc(w / 4, -h / 4 - 1, w / 2, h / 2, 180, 180);
} else {
g.fillArc(w / 4, 3 * h / 4, w / 2, h / 2, 0, 180);
}
}
}
}
示例7: getOutputSlot
import com.sun.hotspot.igv.graph.OutputSlot; //导入依赖的package包/类
public OutputSlot getOutputSlot() {
return outputSlot;
}
示例8: OutputSlotWidget
import com.sun.hotspot.igv.graph.OutputSlot; //导入依赖的package包/类
public OutputSlotWidget(OutputSlot slot, DiagramScene scene, Widget parent, FigureWidget fw) {
super(slot, scene, parent, fw);
outputSlot = slot;
init();
getFigureWidget().getRightWidget().addChild(this);
}