Package org.eclipse.swt.graphics

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


          for( int i = 0; i < s.length; i++ ) {
            gc.drawString(s[i].getNo(), 100, 150 + ( i + 1 ) * 50);
            gc.drawString("" + s[i].getSize(), 200, 150 + ( i + 1 ) * 50);
            gc.drawString("" + s[i].getReminded(), 300, 150 + ( i + 1 ) * 50);
            gc.drawString("" + s[i].getPercentReminded(), 400, 150 + ( i + 1 ) * 50);
            gc.drawString("" + s[i].getPercentFiner(), 500, 150 + ( i + 1 ) * 50);
          }
         
          printer.endPage();
        }
       
 
View Full Code Here


    if (!isEnabled()) {
      gc.setForeground(mTextColor_Disabled);
    }

    if (getText() != null) {
      gc.drawString(getText(), x+13+6, y-1, true);
    }

    p.dispose();
    p2.dispose();
    gc.setForegroundPattern(null);
View Full Code Here

                    if ((bits & SWT.ITALIC) != 0)
                        style += "ITALIC";
                }
                string += data.getName() + " " + data.getHeight() + " " + style + lf;
            }
            gc.drawString(string, 0, 0);
            return;
        }
        // NOTHING TO DRAW FOR GC
        // if (object instanceof GC) {
        // return;
View Full Code Here

        }
        if (object instanceof Region) {
            if (((Region) object).isDisposed())
                return;
            String string = ((Region) object).getBounds().toString();
            gc.drawString(string, 0, 0);
            return;
        }
    }

    void refreshObject() {
View Full Code Here

                    String string = labelProvider.getText(displayedItems[i]);
                    if(string == null) {
            string = "";//$NON-NLS-1$
          }
                    if (orientation == SWT.HORIZONTAL) {
                      gc.drawString(string, 2, yOffset + (i * fontMetrics.getHeight()), true);
                    } else {
                  gc.setTransform(transform);
                      gc.drawString(string, xOffset + (i * fontMetrics.getHeight()), 2, true);
                    }
                }
View Full Code Here

          }
                    if (orientation == SWT.HORIZONTAL) {
                      gc.drawString(string, 2, yOffset + (i * fontMetrics.getHeight()), true);
                    } else {
                  gc.setTransform(transform);
                      gc.drawString(string, xOffset + (i * fontMetrics.getHeight()), 2, true);
                    }
                }
                if (transform != null)
                  transform.dispose();
            }
View Full Code Here

        Point dot = transform( new Point( x, y ) );
        int lableInterval = 1;
        if( dotLabel % lableInterval == 0 ) {
          Color oldBackground = gc.getBackground();
          gc.setBackground( gc.getDevice().getSystemColor( SWT.COLOR_WHITE ) );
          gc.drawString( Integer.toString( dotLabel ), dot.x + 5, dot.y + 5 );
          gc.setBackground( oldBackground );
        }
        gc.fillOval( dot.x, dot.y, 5, 5 );
      }
View Full Code Here

        public void paintControl(PaintEvent e) {
          final GC gc = e.gc;
          gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));
          gc.fillRectangle(0, 0, getBounds().width, getBounds().height);
          gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_BLUE));
          gc.drawString(f_label, f_sphereX, 5);
          gc.drawImage(f_sphereImage, f_sphereX, f_sphereY);
        }
      });
    }
View Full Code Here

      public void paintControl(PaintEvent e) {
        final GC gc = e.gc;
        gc.setBackground(e.widget.getDisplay().getSystemColor(SWT.COLOR_WHITE));
        gc.fillRectangle(0, 0, getBounds().width, getBounds().height);

        gc.drawString("Click on the screen and the ball and the colored rectangle will move to that point in two seconds.", 5, 5);
        gc.drawString("The ball and the colored rectangle don't use the same interpolator, so they will move at different rates.",
            5, 20);
        gc.drawString("Feel free to change the destination at any time.", 5, 35);

        gc.setBackground(f_ball.getRecColor());
View Full Code Here

        final GC gc = e.gc;
        gc.setBackground(e.widget.getDisplay().getSystemColor(SWT.COLOR_WHITE));
        gc.fillRectangle(0, 0, getBounds().width, getBounds().height);

        gc.drawString("Click on the screen and the ball and the colored rectangle will move to that point in two seconds.", 5, 5);
        gc.drawString("The ball and the colored rectangle don't use the same interpolator, so they will move at different rates.",
            5, 20);
        gc.drawString("Feel free to change the destination at any time.", 5, 35);

        gc.setBackground(f_ball.getRecColor());
        gc.setForeground(e.widget.getDisplay().getSystemColor(SWT.COLOR_BLACK));
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.