Examples of drawText()


Examples of org.apache.xmlgraphics.java2d.Graphics2DImagePainter.drawText()

                    g2d.draw(rect);
                }
                Java2DPainter painter = new Java2DPainter(g2d,
                        getContext(), parent.getFontInfo(), state);
                try {
                    painter.drawText(x, y, letterSpacing, wordSpacing, dp, text);
                } catch (IFException e) {
                    //This should never happen with the Java2DPainter
                    throw new RuntimeException("Unexpected error while painting text", e);
                }
            }
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

      scale.setNbPixels(bounds.height - 16);
      int[] levels = scale.getScaleValues();
      for(int i = 0 ; i < levels.length ; i++) {
        int height = bounds.height - scale.getScaledValue(levels[i]) - 2;
        gcBuffer.drawLine(1,height,bounds.width - 70 ,height);
        gcBuffer.drawText(formater.format(levels[i]),bounds.width - 65,height - 12,true);
      }
      if (this.update_divider_width > 0) {
        for (int i=bounds.width - 70; i > 0; i-=this.update_divider_width) {
          gcBuffer.setForeground(Colors.grey);
          gcBuffer.drawLine(i, 0, i, bounds.height);
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

     
     
      if(nbValues > 0) {
        int height = bounds.height - scale.getScaledValue(computeAverage(currentPosition-6)) - 2;
        gcImage.setForeground(colors[COLOR_AVERAGE]);
        gcImage.drawText(formater.format(computeAverage(currentPosition-6)),bounds.width - 65,height - 12,true);
      }   
     
      gcImage.dispose();

    }finally{
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

      image.drawLine( usable_width, x_axis_right_y - 4, x_axis_right_x, x_axis_right_y );
      image.drawLine( usable_width, x_axis_right_y + 4, x_axis_right_x, x_axis_right_y );

      String x_text = labels[0] + " - " + formatters[0].format( max_x );
     
      image.drawText(
          x_text,
          x_axis_right_x - 20 - x_text.length()*char_width,
          x_axis_right_y - font_height - 2,
          SWT.DRAW_TRANSPARENT );
     
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

     
        // z axis
     
      String z_text = labels[2] + " - " + formatters[2].format( max_z );
     
      image.drawText( z_text, z_axis_top_x + 4, z_axis_top_y + 10, SWT.DRAW_TRANSPARENT );
     
      image.drawLine( z_axis_bottom_x, z_axis_bottom_y, z_axis_top_x, z_axis_top_y );
      image.drawLine( z_axis_top_x-4, z_axis_top_y + 10, z_axis_top_x, z_axis_top_y );
      image.drawLine( z_axis_top_x+4, z_axis_top_y + 10, z_axis_top_x, z_axis_top_y );
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

      image.drawLine( y_axis_right_x-6, y_axis_right_y,  y_axis_right_x, y_axis_right_y );     
      image.drawLine( y_axis_right_x, y_axis_right_y + 6, y_axis_right_x, y_axis_right_y );
     
      String  y_text = labels[1] + " - " + formatters[1].format( max_y );
     
      image.drawText(
          y_text,
          y_axis_right_x - (y_text.length() * char_width),
          y_axis_right_y - font_height - 2,
          SWT.DRAW_TRANSPARENT );

View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

          y_axis_right_x - (y_text.length() * char_width),
          y_axis_right_y - font_height - 2,
          SWT.DRAW_TRANSPARENT );


      image.drawText( title, ( bounds.width - title.length()*char_width )/2, 1, SWT.DRAW_TRANSPARENT );

      image.dispose();

    }finally{

View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

           
            String  str = String.valueOf(entry[0]);
           
            Rectangle  rect = (Rectangle)entry[1];
           
            gc.drawText(str, rect.x, rect.y, SWT.DRAW_TRANSPARENT );
          }
        }
      }
     
        // x axis
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

        gc.setLineWidth( 1 );
      }
     
      String x_text = labels[0] + " - " + formatters[0].format( max_x+1 );

      gc.drawText(   x_text,
              x_axis_right_x - 20 - x_text.length()*char_width,
              x_axis_right_y - font_height - 2,
              SWT.DRAW_TRANSPARENT );

        // y axis
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.drawText()

        gc.setLineWidth( 1 );
      }
     
      String  y_text = labels[1] + " - " + formatters[1].format( max_y+1 );

      gc.drawText( y_text, y_axis_top_x+4, y_axis_top_y + 2, SWT.DRAW_TRANSPARENT );

      gc.drawText( title, ( bounds.width - title.length()*char_width )/2, 1, SWT.DRAW_TRANSPARENT );
     
      gc.dispose();

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.