org.eclipse.datatools.sqltools.common.ui.util
Class LineBreakingReader

java.lang.Object
  extended by org.eclipse.datatools.sqltools.common.ui.util.LineBreakingReader

public class LineBreakingReader
extends java.lang.Object


Constructor Summary
LineBreakingReader(java.io.Reader reader, org.eclipse.swt.graphics.GC gc, int maxLineWidth)
          Creates a reader that breaks an input text to fit in a given width.
 
Method Summary
 boolean isFormattedLine()
           
 java.lang.String readLine()
          Reads the next line.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineBreakingReader

public LineBreakingReader(java.io.Reader reader,
                          org.eclipse.swt.graphics.GC gc,
                          int maxLineWidth)
Creates a reader that breaks an input text to fit in a given width.

Parameters:
reader - Reader of the input text
gc - The graphic context that defines the currently used font sizes
maxLineWidth - The max width (pixes) where the text has to fit in
Method Detail

isFormattedLine

public boolean isFormattedLine()

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Reads the next line. The lengths of the line will not exceed the gived maximum width.

Throws:
java.io.IOException