Package org.eclipse.swt.graphics

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


        // draw the title
        //g.drawString(fTitle, (bounds.width - titleWidth) / 2, titleHeight, true);

        // draw the max and min values
        g.drawString(smin, PADDING/2+labelWidth-emin.x, bottom-titleHeight, true);
        g.drawString(smax, PADDING/2+labelWidth-emax.x, top, true);

        // draw the vertical and horizontal lines
        g.drawLine(left, top, left, bottom);
        g.drawLine(left, bottom, right, bottom);
View Full Code Here


            if (i > 0 && yposition < lasty)
                shift= 3;   // below dot
            else
                shift= -(2*titleHeight+3)// above dot
            if (thisItem.displayDescription){
              g.drawString(thisItem.title, xposition+2, yposition+shift, true);
              g.drawString(thisItem.description, xposition+2, yposition+shift+titleHeight, true);
            }
            g.setBackground(oldbg);
            g.setForeground(oldfg);

View Full Code Here

                shift= 3;   // below dot
            else
                shift= -(2*titleHeight+3)// above dot
            if (thisItem.displayDescription){
              g.drawString(thisItem.title, xposition+2, yposition+shift, true);
              g.drawString(thisItem.description, xposition+2, yposition+shift+titleHeight, true);
            }
            g.setBackground(oldbg);
            g.setForeground(oldfg);

            lastx= xposition;
View Full Code Here

        int right=bounds.width - PADDING/2;
        if (lastItem!=null)
          right= bounds.width - lastItem.getSize(g).x - PADDING/2;

        // draw the max and min values
        g.drawString(smin, PADDING/2+labelWidth-emin.x, bottom-titleHeight, true);
        g.drawString(smax, PADDING/2+labelWidth-emax.x, top, true);
        g.drawString("TIME (not drawn to scale)", (right-left)/3+PADDING+titleHeight,bottom-PADDING+(titleHeight*2), true);

        // draw the vertical and horizontal lines
        g.drawLine(left, top, left, bottom);
View Full Code Here

        if (lastItem!=null)
          right= bounds.width - lastItem.getSize(g).x - PADDING/2;

        // draw the max and min values
        g.drawString(smin, PADDING/2+labelWidth-emin.x, bottom-titleHeight, true);
        g.drawString(smax, PADDING/2+labelWidth-emax.x, top, true);
        g.drawString("TIME (not drawn to scale)", (right-left)/3+PADDING+titleHeight,bottom-PADDING+(titleHeight*2), true);

        // draw the vertical and horizontal lines
        g.drawLine(left, top, left, bottom);
        g.drawLine(left, bottom, right, bottom);
View Full Code Here

          right= bounds.width - lastItem.getSize(g).x - PADDING/2;

        // draw the max and min values
        g.drawString(smin, PADDING/2+labelWidth-emin.x, bottom-titleHeight, true);
        g.drawString(smax, PADDING/2+labelWidth-emax.x, top, true);
        g.drawString("TIME (not drawn to scale)", (right-left)/3+PADDING+titleHeight,bottom-PADDING+(titleHeight*2), true);

        // draw the vertical and horizontal lines
        g.drawLine(left, top, left, bottom);
        g.drawLine(left, bottom, right, bottom);

View Full Code Here

        if (i > 0 && yposition < lasty)
          shift = 3; // below dot
        else
          shift = -(2 * titleHeight + 3); // above dot
        if (thisItem.displayDescription) {
          g.drawString(thisItem.title, xposition + 2, yposition
              + shift, true);
          g.drawString(thisItem.description, xposition + 2, yposition
              + shift + titleHeight, true);
        }
        g.setBackground(oldbg);
View Full Code Here

        else
          shift = -(2 * titleHeight + 3); // above dot
        if (thisItem.displayDescription) {
          g.drawString(thisItem.title, xposition + 2, yposition
              + shift, true);
          g.drawString(thisItem.description, xposition + 2, yposition
              + shift + titleHeight, true);
        }
        g.setBackground(oldbg);
        g.setForeground(oldfg);

View Full Code Here

  gc.setForeground(mGridColor);
  int Value = myLowRangeValue + (int) (10.0 * (float) (myhighValue - myLowRangeValue) / (float) rect.height);
  int RangeStep = (int) ((float) (rect.height - 20) / (float) (numHorizontalLines - 1) * (float) (myhighValue - myLowRangeValue) / (float) rect.height);
  for (int i = 0; i < numHorizontalLines; i++) {
      gc.drawLine(0, 10 + (step * i), width, 10 + (step * i));
      gc.drawString(Integer.toString(Value + RangeStep * (numHorizontalLines - (i + 1))), 10, 10 + (step * i));
  }
  step = (getSize().x - 20) / (numVerticalLines - 1);
  for (int i = 0; i < numVerticalLines; i++) {
      gc.drawLine(10 + (step * i), 0, 10 + (step * i), height);
  }
View Full Code Here

  }
  step = (int) Math.round(gc.getFont().getFontData()[0].height * 1.5);
  if (ShowLabels) {
      for (int i = 0; i < chan.length; i++) {
    gc.setForeground(chan[i].fg);
    gc.drawString(chan[i].name, 50, 10 + (step * i));
      }
  }
  gc.setForeground(chan[0].fg);
  gc.drawString(myStatus, 200, 10);

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.