org.gudy.azureus2.ui.swt.shells
Class GCStringPrinter

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.shells.GCStringPrinter

public class GCStringPrinter
extends java.lang.Object

Author:
Olivier Chalouhi, TuxPaper (rewrite)

Nested Class Summary
static class GCStringPrinter.URLInfo
           
 
Field Summary
static int FLAG_FULLLINESONLY
           
static int FLAG_KEEP_URL_INFO
           
static int FLAG_NODRAW
           
static int FLAG_SKIPCLIP
           
 
Constructor Summary
GCStringPrinter(org.eclipse.swt.graphics.GC gc, java.lang.String string, org.eclipse.swt.graphics.Rectangle printArea, boolean skipClip, boolean fullLinesOnly, int swtFlags)
           
GCStringPrinter(org.eclipse.swt.graphics.GC gc, java.lang.String string, org.eclipse.swt.graphics.Rectangle printArea, int printFlags, int swtFlags)
           
 
Method Summary
 void calculateMetrics()
           
 org.eclipse.swt.graphics.Point getCalculatedSize()
           
 GCStringPrinter.URLInfo getHitUrl(int x, int y)
           
 GCStringPrinter.URLInfo[] getHitUrlInfo()
           
 float[] getImageScales()
           
 java.lang.String getText()
           
 org.eclipse.swt.graphics.Color getUrlColor()
           
 boolean hasHitUrl()
           
 boolean isCutoff()
           
 boolean isWordCut()
           
static void main(java.lang.String[] args)
           
 boolean printString()
           
 void printString(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, int swtFlags)
          DO NOT REMOVE OR CHANGE RETURN TYPE -- USED BY PLUGINS
static boolean printString(org.eclipse.swt.graphics.GC gc, java.lang.String string, org.eclipse.swt.graphics.Rectangle printArea)
           
static boolean printString(org.eclipse.swt.graphics.GC gc, java.lang.String string, org.eclipse.swt.graphics.Rectangle printArea, boolean skipClip, boolean fullLinesOnly)
           
static boolean printString(org.eclipse.swt.graphics.GC gc, java.lang.String string, org.eclipse.swt.graphics.Rectangle printArea, boolean skipClip, boolean fullLinesOnly, int swtFlags)
           
 boolean printString(int _printFlags)
           
 boolean printString2(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle, int swtFlags)
           
 void setImages(org.eclipse.swt.graphics.Image[] images)
           
 void setImageScales(float[] imageScales)
           
 void setUrlColor(org.eclipse.swt.graphics.Color urlColor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_SKIPCLIP

public static final int FLAG_SKIPCLIP
See Also:
Constant Field Values

FLAG_FULLLINESONLY

public static final int FLAG_FULLLINESONLY
See Also:
Constant Field Values

FLAG_NODRAW

public static final int FLAG_NODRAW
See Also:
Constant Field Values

FLAG_KEEP_URL_INFO

public static final int FLAG_KEEP_URL_INFO
See Also:
Constant Field Values
Constructor Detail

GCStringPrinter

public GCStringPrinter(org.eclipse.swt.graphics.GC gc,
                       java.lang.String string,
                       org.eclipse.swt.graphics.Rectangle printArea,
                       boolean skipClip,
                       boolean fullLinesOnly,
                       int swtFlags)

GCStringPrinter

public GCStringPrinter(org.eclipse.swt.graphics.GC gc,
                       java.lang.String string,
                       org.eclipse.swt.graphics.Rectangle printArea,
                       int printFlags,
                       int swtFlags)
Method Detail

printString

public static boolean printString(org.eclipse.swt.graphics.GC gc,
                                  java.lang.String string,
                                  org.eclipse.swt.graphics.Rectangle printArea)

printString

public static boolean printString(org.eclipse.swt.graphics.GC gc,
                                  java.lang.String string,
                                  org.eclipse.swt.graphics.Rectangle printArea,
                                  boolean skipClip,
                                  boolean fullLinesOnly)

printString

public static boolean printString(org.eclipse.swt.graphics.GC gc,
                                  java.lang.String string,
                                  org.eclipse.swt.graphics.Rectangle printArea,
                                  boolean skipClip,
                                  boolean fullLinesOnly,
                                  int swtFlags)
Parameters:
gc - GC to print on
string - Text to print
printArea - Area of GC to print text to
skipClip - Don't set any clipping on the GC. Text may overhang printArea when this is true
fullLinesOnly - If bottom of a line will be chopped off, do not display it
swtFlags - SWT flags. SWT.CENTER, SWT.BOTTOM, SWT.TOP, SWT.WRAP
Returns:
whether it fit

main

public static void main(java.lang.String[] args)

printString

public boolean printString()

printString

public boolean printString(int _printFlags)

calculateMetrics

public void calculateMetrics()

printString

public void printString(org.eclipse.swt.graphics.GC gc,
                        org.eclipse.swt.graphics.Rectangle rectangle,
                        int swtFlags)
DO NOT REMOVE OR CHANGE RETURN TYPE -- USED BY PLUGINS


printString2

public boolean printString2(org.eclipse.swt.graphics.GC gc,
                            org.eclipse.swt.graphics.Rectangle rectangle,
                            int swtFlags)

getCalculatedSize

public org.eclipse.swt.graphics.Point getCalculatedSize()

getUrlColor

public org.eclipse.swt.graphics.Color getUrlColor()

setUrlColor

public void setUrlColor(org.eclipse.swt.graphics.Color urlColor)

getHitUrl

public GCStringPrinter.URLInfo getHitUrl(int x,
                                         int y)

getHitUrlInfo

public GCStringPrinter.URLInfo[] getHitUrlInfo()

hasHitUrl

public boolean hasHitUrl()

isCutoff

public boolean isCutoff()

setImages

public void setImages(org.eclipse.swt.graphics.Image[] images)

getImageScales

public float[] getImageScales()

setImageScales

public void setImageScales(float[] imageScales)

getText

public java.lang.String getText()
Returns:
Since:
4.0.0.1

isWordCut

public boolean isWordCut()