Available Methods
- setText ( )
- getCaretOffset ( )
- setBackground ( )
- setLayoutData ( )
- setEditable ( )
- setFont ( )
- setStyleRange ( )
- isDisposed ( )
- getSelection ( )
- setSelection ( )
- getText ( )
- addMouseListener ( )
- getBackground ( )
- setCaretOffset ( )
- setEnabled ( )
- setKeyBinding ( )
- getOffsetAtLine ( )
- notifyListeners ( )
- addModifyListener ( )
- addLineStyleListener ( )
- redraw ( )
- setForeground ( )
- setBottomMargin ( )
- replaceTextRange ( )
- removeVerifyKeyListener ( )
- addListener ( )
- forceFocus ( )
- setAlwaysShowScrollBars ( )
- setWordWrap ( )
- setSelectionRange ( )
- removeKeyListener ( )
- setRedraw ( )
- removeTraverseListener ( )
- addKeyListener ( )
- getLineCount ( )
- invokeAction ( )
- addVerifyKeyListener ( )
- getSelectionRange ( )
- setIME ( )
- setData ( )
- getBounds ( )
- addTraverseListener ( )
- insert ( )
- getLocationAtOffset ( )
- getLineHeight ( )
- setMenu ( )
- getChildren ( )
- getForeground ( )
- addFocusListener ( )
- redrawRange ( )
- getSelectionText ( )
- showSelection ( )
- setStyleRanges ( )
- setLeftMargin ( )
- getStyleRanges ( )
Related Classes
- java.io.File
- org.eclipse.swt.SWT
- org.eclipse.swt.widgets.Composite
- org.eclipse.swt.widgets.Display
- org.eclipse.swt.widgets.Button
- org.eclipse.swt.widgets.Label
- org.eclipse.swt.widgets.Shell
- org.eclipse.swt.layout.GridData
- org.eclipse.swt.widgets.Text
- org.eclipse.swt.layout.GridLayout
- org.eclipse.swt.events.SelectionEvent
- org.eclipse.swt.events.SelectionAdapter
- org.eclipse.swt.widgets.Control
- org.eclipse.swt.widgets.Group
- org.eclipse.swt.widgets.Event
- org.eclipse.swt.graphics.Point
- org.eclipse.swt.graphics.Color
- org.eclipse.ui.PlatformUI
- org.eclipse.swt.widgets.Listener
- org.eclipse.swt.events.SelectionListener
- org.eclipse.swt.events.ModifyListener
- org.eclipse.swt.events.ModifyEvent
- org.eclipse.swt.graphics.Rectangle
- org.eclipse.swt.layout.FillLayout
- org.eclipse.swt.graphics.Font
Java Code Examples for org.eclipse.swt.custom.StyledText#getLineCount()
The following examples show how to use
org.eclipse.swt.custom.StyledText#getLineCount() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InteractiveConsoleView.java From gama with GNU General Public License v3.0 | 5 votes |
private void insertHistory(final boolean back) { if (history.size() == 0) { ViewsHelper.requestUserAttention(this, "No history"); return; } if (indexInHistory <= 0) { if (back) { ViewsHelper.requestUserAttention(this, "No more history"); } indexInHistory = 0; } else if (indexInHistory >= history.size() - 1) { if (!back) { ViewsHelper.requestUserAttention(this, "No more history"); } indexInHistory = history.size() - 1; } try { final StyledText text = viewer.getTextWidget(); final int lineIndex = text.getLineCount() - 1; final int nbChars = text.getCharCount(); final int firstOffset = text.getOffsetAtLine(lineIndex) + PROMPT.length(); viewer.getDocument().replace(firstOffset, nbChars - firstOffset, history.get(indexInHistory)); text.setCaretOffset(text.getCharCount()); if (back) { indexInHistory--; } else { indexInHistory++; } } catch (final org.eclipse.jface.text.BadLocationException e1) {} }
Example 2
Source File: JavaPreview.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private int getHeightOfAllLines(StyledText styledText) { int height= 0; int lineCount= styledText.getLineCount(); for (int i= 0; i < lineCount; i++) height= height + styledText.getLineHeight(styledText.getOffsetAtLine(i)); return height; }
Example 3
Source File: CopiedOverviewRuler.java From Pydev with Eclipse Public License 1.0 | 5 votes |
protected int getLineCount(StyledText textWidget) { int lineCount = textWidget.getLineCount(); if (lineCount < 100) { lineCount = 100; } return lineCount; }