congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
TextViewer.getExtent
Code IndexAdd Tabnine to your IDE (free)

How to use
getExtent
method
in
org.eclipse.jface.text.TextViewer

Best Java code snippets using org.eclipse.jface.text.TextViewer.getExtent (Showing top 4 results out of 315)

origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Returns the width of the representation of a text range in the
 * visible region of the viewer's document as drawn in this viewer's
 * widget.
 *
 * @param offset the offset of the text range in the visible region
 * @param length the length of the text range in the visible region
 * @return the width of the presentation of the specified text range
 * @since 2.0
 */
final protected int getWidthInPixels(int offset, int length) {
  return getExtent(offset, offset + length).getLength();
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns the width of the representation of a text range in the
 * visible region of the viewer's document as drawn in this viewer's
 * widget.
 *
 * @param offset the offset of the text range in the visible region
 * @param length the length of the text range in the visible region
 * @return the width of the presentation of the specified text range
 * @since 2.0
 */
final protected int getWidthInPixels(int offset, int length) {
  return getExtent(offset, offset + length).getLength();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

IRegion extent= getExtent(start, start);
startPixel= extent.getOffset() + fTextWidget.getHorizontalPixel();
endPixel= startPixel;
IRegion extent= getExtent(start, end);
startPixel= extent.getOffset() + fTextWidget.getHorizontalPixel();
endPixel= startPixel + extent.getLength();
origin: org.eclipse.platform/org.eclipse.jface.text

IRegion extent= getExtent(start, start);
startPixel= extent.getOffset() + fTextWidget.getHorizontalPixel();
endPixel= startPixel;
IRegion extent= getExtent(start, end);
startPixel= extent.getOffset() + fTextWidget.getHorizontalPixel();
endPixel= startPixel + extent.getLength();
org.eclipse.jface.textTextViewergetExtent

Javadoc

Returns the region covered by the given start and end offset. The result is relative to the upper left corner of the widget client area.

Popular methods of TextViewer

  • getTextWidget
  • getControl
  • doOperation
  • setDocument
  • modelRange2WidgetRange
    Same as #modelRange2WidgetRange(IRegion) just for a org.eclipse.jface.text.Position.
  • getRewriteTarget
  • getSelection
  • modelLine2WidgetLine
    Implements the contract of ITextViewerExtension5#modelLine2WidgetLine(int).
  • getDocument
  • setSelectedRange
  • setSelection
  • <init>
    Create a new text viewer with the given SWT style bits. The viewer is ready to use but does not have
  • setSelection,
  • <init>,
  • canDoOperation,
  • getVisibleRegion,
  • handleDispose,
  • invalidateTextPresentation,
  • setTopIndex,
  • _getVisibleRegionOffset,
  • activatePlugins,
  • addPresentation

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • Permission (java.security)
    Legacy security code; do not use.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now