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

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • BoxLayout (javax.swing)
  • JFrame (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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