Package java.awt

Examples of java.awt.Stroke


    /**
     * Set the Stroke to use for the edge of a graphic.
     */
    public void setStroke(Stroke stroke) {
        Stroke oldStroke = this.stroke;
        this.stroke = stroke;

        // We don't want to call getBasicStrokeEditor, that creates
        // the editor if it doesn't exist, which may be problematic
        // for cases where there is no Graphics Display.
View Full Code Here


        props.put(prefix + PointOvalProperty, new Boolean(pointOval).toString());

        props.put(prefix + fillPatternProperty, (fPattern == null ? ""
                : fPattern));

        Stroke bs = getStroke();

        if (bs == null) {
            bs = new BasicStroke();
        }
View Full Code Here

      return;
    }
    final Color cssColor = (Color) layoutContext.getStyleProperty(ElementStyleKeys.PAINT);
    g2.setColor(cssColor);

    final Stroke styleProperty = (Stroke) layoutContext.getStyleProperty(ElementStyleKeys.STROKE);
    if (styleProperty != null)
    {
      g2.setStroke(styleProperty);
    }
    else
View Full Code Here

      return;
    }

    final double y = area.getCenterY();

    final Stroke outlineStroke = getOutlineStroke();
    final Shape defaultShape = getDefaultShape();

    g2.setPaint(getFillPaint());
    for (int i = 0; i < values.length; i++)
    {
View Full Code Here

     * @param thickness the thickness of the line
     * @param dashed true if the line should be dashed
     */
    public void setLinkDrawingParameters(OMLine link, Paint paint,
                                         float thickness, boolean dashed) {
        Stroke stroke;
        if (dashed) {
            // create a basic default dash
            float[] dash = { 8.0f, 8.0f };
            stroke = new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, dash, 0.0f);
        } else {
View Full Code Here

        // fill grid
        int gr=getGrid();
        if( (gr > 0) && _param.gridDisplay) {
            g2.translate(_param.xmargin,_param.ymargin);
            Stroke oldStroke = g2.getStroke();

            g2.setStroke(_gridStrocke);
            g2.setColor(_gridColor);
           
           
View Full Code Here

            drawClipboardElements(g2, pMax);
        }

        // Draw tracked gates and components
        //----------------------
        Stroke oldStroke = g2.getStroke();
        g2.setStroke(new BasicStroke(0));

       
        // draw tracked component gates
        for(int i=0;i<_currentTrackedComponent.size(); i++){
View Full Code Here

      }
      return null;
    }

    protected void drawDiagramElements(Graphics2D g2, Point pMax){
        Stroke oldStrocke = g2.getStroke();
        Color oldColor = g2.getColor();
        Font olfFont = g2.getFont();

        g2.setFont(_sFont);
        if(_diagParam.backgr!=null){
View Full Code Here

     * @param sy
     */
    public void drawReferencePoint(Graphics2D g2, double ox, double oy, double sx, double sy){
        if (referencePoint != null) {
            Color oldColor = g2.getColor();
            Stroke oldStroke = g2.getStroke();

            // Get current point coordinates in the graphical frame
            int posX, posY;
            if (logx) {
                if(referencePoint.x < LOG_MIN){
View Full Code Here

     * Draws the computed magnetized point into the graphic
     * @param g2 the current graphics
     */
    public void drawMagnetizedPoint(Graphics2D g2, double ox, double oy, double sx, double sy){
        Color oldColor = g2.getColor();
        Stroke oldStroke = g2.getStroke();

        // Get current point coordinates in the graphical frame
        int posX, posY;
        if (logx) {
            if(currentPoint.x < LOG_MIN){
View Full Code Here

TOP

Related Classes of java.awt.Stroke

Copyright © 2018 www.massapicom. 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.