Examples of drawText()


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

        gc.setLineWidth(1);
        gc.drawLine(0, 20, config.getClientArea().width, 20);
        gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
        gc.drawLine(0, 21, config.getClientArea().width, 21);
        gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));
        gc.drawText((area.getVisible() ? title() : title(levelBillPlan)), 5, 3, SWT.DRAW_TRANSPARENT);
        gc.dispose();
      }
    });

    FormData data = new FormData();
View Full Code Here

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

  public void fillErrorMessage(String errorMessage) {
    GC gcmessage = new GC(mainPanel);
    Font font = new Font(getDisplay(), new FontData("Arial", 10, SWT.BOLD));
    gcmessage.setFont(font);
    gcmessage.setForeground(getDisplay().getSystemColor(SWT.COLOR_RED));
    gcmessage.drawText(errorMessage, posX-(gc.textExtent(errorMessage).x/2), posY+265, SWT.DRAW_TRANSPARENT);
  }

  public void close() {
    this.dispose();
  }
View Full Code Here

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

                gc.setLineWidth(1);
                gc.drawLine(0, title.getClientArea().height-2, title.getClientArea().width, title.getClientArea().height-2);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
                gc.drawLine(0, title.getClientArea().height-1, title.getClientArea().width, title.getClientArea().height-1);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));
                gc.drawText("Extrato Recebido do Banco", 10, 3, SWT.DRAW_TRANSPARENT);

                gc.dispose();
            }
        });
       
View Full Code Here

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

                gc.setLineWidth(1);
                gc.drawLine(0, 30, mainPanel.getClientArea().width, 30);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));

                if (screenMessageLabel.getText().equals("")) {
                    gc.drawText(DEFAULT_MESSAGE, 10, 10, SWT.DRAW_TRANSPARENT);
                } else {
                    gc.drawText(screenMessageLabel.getText(), 32, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                }
                gc.dispose();
View Full Code Here

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

                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));

                if (screenMessageLabel.getText().equals("")) {
                    gc.drawText(DEFAULT_MESSAGE, 10, 10, SWT.DRAW_TRANSPARENT);
                } else {
                    gc.drawText(screenMessageLabel.getText(), 32, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                }
                gc.dispose();
            }
        });
View Full Code Here

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

        {
          String message = image.getBounds().width + "x" + image.getBounds().height;
          Point extent = gc.textExtent(message);
          int x = (clientArea.width - extent.x) / 2;
          int y = clientArea.height - extent.y - 5;
          gc.drawText(message, x, y);
        }
      }
    });
  }
}
View Full Code Here

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

                gc.setLineWidth(1);
                gc.drawLine(0, 30, mainPanel.getClientArea().width, 30);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));

                if (screenMessageLabel.getText().equals("")) {
                    gc.drawText("", 10, 10, SWT.DRAW_TRANSPARENT);
                } else {
                    gc.drawText(screenMessageLabel.getText(), 32, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                }
                gc.dispose();
View Full Code Here

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

                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));

                if (screenMessageLabel.getText().equals("")) {
                    gc.drawText("", 10, 10, SWT.DRAW_TRANSPARENT);
                } else {
                    gc.drawText(screenMessageLabel.getText(), 32, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                }
                gc.dispose();
            }
        });
View Full Code Here

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

    stringGc.setForeground(gc.getForeground());
    stringGc.setBackground(gc.getBackground());
    stringGc.setFont(gc.getFont());

    // Draw the text onto the image
    stringGc.drawText(string, 0, 0);

    // Draw the image vertically onto the original GC
    drawVerticalImage(stringImage, x, y, gc, style);

    // Dispose the new GC
View Full Code Here

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

    gc.setFont(font);
    gc.setForeground(foreground);
    gc.setBackground(background);

    // Draw the text onto the image
    gc.drawText(text, 0, 0);

    // Draw the image vertically onto the original GC
    Image image = createRotatedImage(stringImage, style);

    // Dispose the new GC
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.