Package edu.uci.ics.jung.visualization.transform.shape

Examples of edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator.draw()


        Stroke oldStroke = g.getStroke();
        Stroke stroke = rc.getVertexStrokeTransformer().transform(v);
        if (stroke != null) {
            g.setStroke(stroke);
        }
        g.draw(shape);
        g.setPaint(oldPaint);
        g.setStroke(oldStroke);
    }
}
View Full Code Here


        Stroke oldStroke = g.getStroke();
        Stroke stroke = rc.getVertexStrokeTransformer().transform(v);
        if(stroke != null) {
            g.setStroke(stroke);
        }
        g.draw(shape);
        g.setPaint(oldPaint);
        g.setStroke(oldStroke);
    }
}
View Full Code Here

        }
        p = getAnchorPoint(bounds, d, positioner.getPosition(x, y, vvd));
      } else {
        p = getAnchorPoint(bounds, d, position);
      }
        g.draw(component, rc.getRendererPane(), p.x, p.y, d.width, d.height, true);
    }
   
    protected Point getAnchorPoint(Rectangle2D vertexBounds, Dimension labelSize, Position position) {
      double x;
      double y;
View Full Code Here

        if (vertexHit) {
          if(rc.getVertexIconTransformer() != null) {
            Icon icon = rc.getVertexIconTransformer().transform(v);
            if(icon != null) {
           
                 g.draw(icon, rc.getScreenDevice(), shape, (int)x, (int)y);

            } else {
              paintShapeForVertex(rc, v, shape);
            }
          } else {
View Full Code Here

          Stroke oldStroke = g.getStroke();
          Stroke stroke = rc.getVertexStrokeTransformer().transform(v);
          if(stroke != null) {
            g.setStroke(stroke);
          }
          g.draw(shape);
          g.setPaint(oldPaint);
          g.setStroke(oldStroke);
        }
    }
}
View Full Code Here

            parallelOffset = -parallelOffset;
        }
       
        xform.translate(-d.width/2, -(d.height/2-parallelOffset));
        g.setTransform(xform);
        g.draw(component, rc.getRendererPane(), 0, 0, d.width, d.height, true);

        g.setTransform(old);
    }

}
View Full Code Here

            }
            Paint draw_paint = rc.getEdgeDrawPaintTransformer().transform(e);
            if (draw_paint != null)
            {
                g.setPaint(draw_paint);
                g.draw(edgeShape);
            }
           
            float scalex = (float)g.getTransform().getScaleX();
            float scaley = (float)g.getTransform().getScaleY();
            // see if arrows are too small to bother drawing
View Full Code Here

                    Shape arrow = rc.getEdgeArrowTransformer().transform(Context.<Graph<V,E>,E>getInstance(graph, e));
                    arrow = at.createTransformedShape(arrow);
                    g.setPaint(rc.getArrowFillPaintTransformer().transform(e));
                    g.fill(arrow);
                    g.setPaint(rc.getArrowDrawPaintTransformer().transform(e));
                    g.draw(arrow);
                }
                if (graph.getEdgeType(e) == EdgeType.UNDIRECTED) {
                    Shape vertexShape =
                        rc.getVertexShapeTransformer().transform(graph.getEndpoints(e).getFirst());
                    xf = AffineTransform.getTranslateInstance(x1, y1);
View Full Code Here

                        Shape arrow = rc.getEdgeArrowTransformer().transform(Context.<Graph<V,E>,E>getInstance(graph, e));
                        arrow = at.createTransformedShape(arrow);
                        g.setPaint(rc.getArrowFillPaintTransformer().transform(e));
                        g.fill(arrow);
                        g.setPaint(rc.getArrowDrawPaintTransformer().transform(e));
                        g.draw(arrow);
                    }
                }
                // restore paint and stroke
                if (new_stroke != null)
                    g.setStroke(old_stroke);
View Full Code Here

        p = rc.getMultiLayerTransformer().transform(Layer.LAYOUT, p);

        int x = (int)p.getX();
        int y = (int)p.getY();

        g.draw(component, rc.getRendererPane(), x+h_offset, y+v_offset, d.width, d.height, true);

        Dimension size = component.getPreferredSize();
        Rectangle bounds = new Rectangle(-size.width/2 -2, -size.height/2 -2, size.width+4, size.height);
        shapes.put(v, bounds);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.