Package org.gudy.azureus2.ui.swt.shells

Examples of org.gudy.azureus2.ui.swt.shells.GCStringPrinter.printString()


      } else {
        int ofs = (clientArea.width / 2) - (textSize.x / 2);
        clientArea.x += ofs;
        clientArea.width -= ofs;
      }
      sp.printString(e.gc, clientArea, SWT.LEFT);

      int x = clientArea.x + clientArea.width - 1;
      e.gc.setAlpha(20);
      e.gc.drawLine(x, 3, x, clientArea.height - 3);
    }
View Full Code Here


        cellBounds.width -= 6;
        if (!cellBounds.isEmpty()) {
          GCStringPrinter sp = new GCStringPrinter(gc, text, cellBounds, true,
              cellBounds.height > 20, style);

          boolean fit = sp.printString();
          if (fit) {

            cell.setDefaultToolTip(null);
          } else {
View Full Code Here

    bounds.y += 3;
    bounds.x += 7;
    bounds.width -= 14;
    String name = MessageText.getString(key, column.getName());
    GCStringPrinter sp = new GCStringPrinter(gc, name, bounds, GCStringPrinter.FLAG_SKIPCLIP, SWT.TOP);
    sp.printString();

    Point titleSize = sp.getCalculatedSize();

    gc.setFont(fontDefault);
    String info = MessageText.getString(key + ".info", "");
View Full Code Here

      gc.setForeground(ColorCache.getColor(gc.getDevice(), 145, 145, 145));
      gc.drawRoundRectangle(x, y, w, h, 15, h);

      gc.setForeground(ColorCache.getColor(gc.getDevice(), 50, 50, 50));
      hitArea = new Rectangle(x, y, w + 2, h);
      sp2.printString(gc, hitArea, SWT.CENTER);
      bounds = cell.getBounds();
      hitArea.x -= bounds.x;
      hitArea.y -= bounds.y;
    }
    cell.getTableRowCore().setData("AddHitArea", hitArea);
View Full Code Here

    }

    if (text != null && text.length() > 0) {
      GCStringPrinter sp = new GCStringPrinter(gc, text, bounds, true, false,
          wrapText?( orientation | SWT.WRAP ):orientation );
      sp.printString();
      hadMore = sp.isCutoff();
    }

    invokeSWTPaintListeners(gc);
  }
View Full Code Here

              sp.calculateMetrics();
              if (sp.isCutoff()) {
                GCStringPrinter.printString(gc, title, bounds, false, false,
                    SWT.CENTER | SWT.WRAP);
              } else {
                sp.printString();
              }
            } finally {
              gc.dispose();
            }
          } catch (Throwable t) {
View Full Code Here

        clipping.x++;
        clipping.y++;
        //style = SWT.TOP;
        GCStringPrinter sp = new GCStringPrinter(gc, text, clipping, true, false,
            style);
        sp.printString();
        gc.setAlpha(255);

        clipping.x--;
        clipping.y--;
        gc.setForeground(fgText);
View Full Code Here

      }
      //gc.setClipping(clipping);

      GCStringPrinter sp = new GCStringPrinter(gc, text, clipping, true, false,
          style);
      sp.printString();
      clipping.x += sp.getCalculatedSize().x + 5;
      //gc.setClipping((Rectangle) null);
    }
   
    // Vitality Images
View Full Code Here

          int allBoxesWidth = numBoxes * boxSizeAndPadding;
          int textPadding = 15;
          printArea.x = (fullWidth - (allBoxesWidth + sizeAccess.x + textPadding)) / 2;
          printArea.width = sizeAccess.x;

          sp.printString(e.gc, printArea, 0);
          e.gc.setBackground(Colors.white);
          e.gc.setForeground(Colors.blue);

          int xStart = printArea.x + sizeAccess.x + textPadding;
          int yStart = (fullHeight - boxSize) / 2;
View Full Code Here

            hitUrl.urlColor = colorLinkHover;
          }
        }
      }

      sp.printString();
    }
  }
 
  // @see org.gudy.azureus2.plugins.ui.tables.TableCellAddedListener#cellAdded(org.gudy.azureus2.plugins.ui.tables.TableCell)
  public void cellAdded(TableCell cell) {
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.