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 CaretInfo

java.lang.Object
  extended by
org.eclipse.draw2d.text.CaretInfo
All Implemented Interfaces:
Translatable

public class CaretInfo
extends java.lang.Object
implements Translatable

Stores positional information about where a caret should be placed. This structure currently only offers integer precision. Scaling operations will result in rounding.

Since:
3.1

Constructor Summary
protected CaretInfo ( CaretInfo info)
          Constructs a CaretInfo object by copying the values from another instance.
protected CaretInfo (int x, int y, int ascent, int descent, int lineAscent, int lineDescent)
          Constructor for use by TextFlow.
 
Method Summary
 int getBaseline ()
          Returns the y location of the baseline.
 int getHeight ()
          Returns the total height of the caret.
 int getLineHeight ()
           
 int getLineY ()
           
 int getX ()
          Returns the x location of the caret.
 int getY ()
          Returns the y location of the caret.
 void performScale (double factor)
          Scales this object by the scale factor.
 void performTranslate (int dx, int dy)
          Translates this object horizontally by dx and vertically by dy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaretInfo

protected CaretInfo(int x,
                    int y,
                    int ascent,
                    int descent,
                    int lineAscent,
                    int lineDescent)
Constructor for use by TextFlow. Constructs a new CaretInfo with the figure's ascent and descent and line information.

WARNING: This constructor should not be called by clients. It is for use by TextFlow, and may change in future releases.

Parameters:
x - the x location
y - the y location of the top of the caret
ascent - the ascent
descent - the descent
lineAscent - the ascent of the line on which the caret is placed
lineDescent - the descent of the line on which the caret is placed

CaretInfo

protected CaretInfo(
CaretInfo info)
Constructs a CaretInfo object by copying the values from another instance.

Parameters:
info - the reference
Since:
3.2
Method Detail

getBaseline

public int getBaseline()
Returns the y location of the baseline.

Returns:
the y coordinate of the baseline

getHeight

public int getHeight()
Returns the total height of the caret. The height is the sum of the ascent and descent.

Returns:
the height

getLineHeight

public int getLineHeight()
Returns:
the total height of the line on which the caret is placed

getLineY

public int getLineY()
Returns:
the y location of the line on which the caret is placed

getX

public int getX()
Returns the x location of the caret.

Returns:
the x coordinate

getY

public int getY()
Returns the y location of the caret.

Returns:
the y coordinate

performScale

public void performScale(double factor)
Description copied from interface: Translatable
Scales this object by the scale factor.

Specified by:
performScale in interface Translatable
Parameters:
factor - The scale factor
See Also:
Translatable.performScale(double)

performTranslate

public void performTranslate(int dx,
                             int dy)
Description copied from interface: Translatable
Translates this object horizontally by dx and vertically by dy.

Specified by:
performTranslate in interface Translatable
Parameters:
dx - The amount to translate horizontally
dy - The amount to translate vertically
See Also:
Translatable.performTranslate(int, int)

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