|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
org.eclipse.swt.custom.StyledText
org.mailster.gui.StyledLabel
public class StyledLabel
---
Mailster (C) 2007-2009 De Oliveira Edouard
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
See Mailster
Web Site
---
StyledLabel.java - An improved SWT Label that handles automatic styling of
the label text. Currently only supports :
\...\<\/a\> : show a text as a fake hyperlink
\...\<\/b\> : set bold font
| Field Summary | |
|---|---|
static org.eclipse.swt.graphics.Color |
LINK_COLOR
|
static org.eclipse.swt.graphics.Color |
SUBJECT_COLOR
|
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
StyledLabel(org.eclipse.swt.widgets.Composite c,
int flags)
|
|
| Method Summary | |
|---|---|
protected void |
checkSubclass()
|
private void |
setBold(java.util.ArrayList<org.eclipse.swt.custom.StyleRange> ranges,
int start,
int length)
|
private void |
setLink(java.util.ArrayList<org.eclipse.swt.custom.StyleRange> ranges,
int start,
int length)
|
private void |
setSubject(java.util.ArrayList<org.eclipse.swt.custom.StyleRange> ranges,
int start,
int length)
|
void |
setText(java.lang.String s)
|
| Methods inherited from class org.eclipse.swt.custom.StyledText |
|---|
addBidiSegmentListener, addExtendedModifyListener, addLineBackgroundListener, addLineStyleListener, addModifyListener, addPaintObjectListener, addSelectionListener, addVerifyKeyListener, addVerifyListener, addWordMovementListener, append, computeSize, copy, copy, cut, getAlignment, getBackground, getBaseline, getBaseline, getBidiColoring, getCaretOffset, getCharCount, getContent, getDoubleClickEnabled, getDragDetect, getEditable, getForeground, getHorizontalIndex, getHorizontalPixel, getIndent, getJustify, getKeyBinding, getLine, getLineAlignment, getLineAtOffset, getLineBackground, getLineBullet, getLineCount, getLineDelimiter, getLineHeight, getLineHeight, getLineIndent, getLineIndex, getLineJustify, getLinePixel, getLineSpacing, getLocationAtOffset, getOffsetAtLine, getOffsetAtLocation, getOrientation, getRanges, getRanges, getSelection, getSelectionBackground, getSelectionCount, getSelectionForeground, getSelectionRange, getSelectionText, getStyle, getStyleRangeAtOffset, getStyleRanges, getStyleRanges, getStyleRanges, getStyleRanges, getTabs, getText, getText, getTextBounds, getTextLimit, getTextRange, getTopIndex, getTopPixel, getWordWrap, insert, invokeAction, paste, print, print, print, redraw, redraw, redrawRange, removeBidiSegmentListener, removeExtendedModifyListener, removeLineBackgroundListener, removeLineStyleListener, removeModifyListener, removePaintObjectListener, removeSelectionListener, removeVerifyKeyListener, removeVerifyListener, removeWordMovementListener, replaceStyleRanges, replaceTextRange, scroll, selectAll, setAlignment, setBackground, setBidiColoring, setCaret, setCaretOffset, setContent, setCursor, setDoubleClickEnabled, setDragDetect, setEditable, setFont, setForeground, setHorizontalIndex, setHorizontalPixel, setIndent, setJustify, setKeyBinding, setLineAlignment, setLineBackground, setLineBullet, setLineIndent, setLineJustify, setLineSpacing, setOrientation, setSelection, setSelection, setSelection, setSelectionBackground, setSelectionForeground, setSelectionRange, setStyleRange, setStyleRanges, setStyleRanges, setStyleRanges, setTabs, setTextLimit, setTopIndex, setTopPixel, setWordWrap, showSelection |
| Methods inherited from class org.eclipse.swt.widgets.Canvas |
|---|
drawBackground, getCaret, getIME, setIME |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackgroundImage, getBorderWidth, getBounds, getCursor, getEnabled, getFont, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.eclipse.swt.graphics.Color LINK_COLOR
public static final org.eclipse.swt.graphics.Color SUBJECT_COLOR
| Constructor Detail |
|---|
public StyledLabel(org.eclipse.swt.widgets.Composite c,
int flags)
| Method Detail |
|---|
private void setLink(java.util.ArrayList<org.eclipse.swt.custom.StyleRange> ranges,
int start,
int length)
private void setBold(java.util.ArrayList<org.eclipse.swt.custom.StyleRange> ranges,
int start,
int length)
private void setSubject(java.util.ArrayList<org.eclipse.swt.custom.StyleRange> ranges,
int start,
int length)
public void setText(java.lang.String s)
setText in class org.eclipse.swt.custom.StyledTextprotected void checkSubclass()
checkSubclass in class org.eclipse.swt.widgets.Composite
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||