Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Draw2d
3.3

org.eclipse.draw2d.text
Class TextFragmentBox

java.lang.Object
  extended by

org.eclipse.draw2d.text.FlowBox
      extended by

org.eclipse.draw2d.text.ContentBox
          extended by
org.eclipse.draw2d.text.TextFragmentBox

public class TextFragmentBox
extends ContentBox

A Geometric object for representing a TextFragment region on a line of Text.


Field Summary
 int length
          The fragment's length in characters.
 int offset
          The character offset at which this fragment begins.
 
Constructor Summary
TextFragmentBox ( TextFlow textflow)
          Creates a new TextFragmentBox for the given text flow.
 
Method Summary
 boolean containsPoint (int x, int y)
          This method must be called on a block that is completely positioned and committed.
 int getAscent ()
          Returns the textflow's font's ascent.
 int getDescent ()
          Returns the textflow's font's descent.
 boolean isRightToLeft ()
          Returns true if the bidi level is odd.
 boolean isTruncated ()
          Returns true if the fragment should be rendered as truncated.
 void setTruncated (boolean value)
          Marks the fragment as having been truncated.
 java.lang.String toString ()
           
 
Methods inherited from class org.eclipse.draw2d.text. ContentBox
getBaseline, getBidiLevel, requiresBidi, setBidiLevel
 
Methods inherited from class org.eclipse.draw2d.text. FlowBox
getWidth, getX, setWidth, setX
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

length

public int length
The fragment's length in characters.


offset

public int offset
The character offset at which this fragment begins.

Constructor Detail

TextFragmentBox

public TextFragmentBox(
TextFlow textflow)
Creates a new TextFragmentBox for the given text flow.

Parameters:
textflow - the text flow
Method Detail

containsPoint

public boolean containsPoint(int x,
                             int y)
Description copied from class: FlowBox
This method must be called on a block that is completely positioned and committed.

Specified by:
containsPoint in class FlowBox
Parameters:
x - X
y - Y
Returns:
true if the FlowBox contains the point
See Also:
FlowBox.containsPoint(int, int)

getAscent

public int getAscent()
Returns the textflow's font's ascent. The ascent is the same for all fragments in a given TextFlow.

Specified by:
getAscent in class FlowBox
Returns:
the ascent

getDescent

public int getDescent()
Returns the textflow's font's descent. The descent is the same for all fragments in a given TextFlow.

Specified by:
getDescent in class FlowBox
Returns:
the descent
See Also:
FlowBox.getAscent()

isRightToLeft

public boolean isRightToLeft()
Returns true if the bidi level is odd. Right to left fragments should be queried and rendered with the RLO control character inserted in front.

Returns:
true if right-to-left
Since:
3.1

isTruncated

public boolean isTruncated()
Returns true if the fragment should be rendered as truncated.

Returns:
true if the fragment is truncated
Since:
3.1

setTruncated

public void setTruncated(boolean value)
Marks the fragment as having been truncated.

Parameters:
value - true if the fragment is truncated
Since:
3.1

toString

public java.lang.String toString()
See Also:
Object.toString()

Eclipse Draw2d
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire