Class HyperlinkLabel
- All Implemented Interfaces:
Drawable
-
Field Summary
Fields inherited from class org.eclipse.swt.widgets.Widget
nativeZoom
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in theMouseListener
interface.void
Adds the listener to the collection of listeners who will be notified when the mouse passes or hovers over controls, by sending it one of the messages defined in theMouseTrackListener
interface.void
Adds the listener to the collection of listeners who will be notified when the receiver needs to be painted, by sending it one of the messages defined in thePaintListener
interface.void
addSelectionListener
(SelectionListener listener) computeSize
(int wHint, int hHint, boolean changed) Returns the preferred size (in points) of the receiver.getLabel()
boolean
protected void
paint
(PaintEvent e) void
removeSelectionListener
(SelectionListener listener) void
Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.void
Sets the receiver's cursor to the cursor specified by the argument, or to the default cursor for that kind of control if the argument is null.void
Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.void
Methods inherited from class org.eclipse.swt.widgets.Canvas
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsMode
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseMoveListener, addMouseWheelListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackgroundImage, setBounds, setBounds, setCapture, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, addTypedListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.swt.graphics.Drawable
isAutoScalable
-
Constructor Details
-
HyperlinkLabel
Constructor for Hyperlink.
-
-
Method Details
-
setText
-
getSelection
public boolean getSelection() -
getLabel
-
paint
-
addSelectionListener
-
removeSelectionListener
-
computeSize
Description copied from class:Control
Returns the preferred size (in points) of the receiver.The preferred size of a control is the size that it would best be displayed at. The width hint and height hint arguments allow the caller to ask a control questions such as "Given a particular width, how high does the control need to be to show all of the contents?" To indicate that the caller does not wish to constrain a particular dimension, the constant
SWT.DEFAULT
is passed for the hint.If the changed flag is
true
, it indicates that the receiver's contents have changed, therefore any caches that a layout manager containing the control may have been keeping need to be flushed. When the control is resized, the changed flag will befalse
, so layout manager caches can be retained.- Overrides:
computeSize
in classControl
- Parameters:
wHint
- the width hint (can beSWT.DEFAULT
)hHint
- the height hint (can beSWT.DEFAULT
)changed
-true
if the control's contents have changed, andfalse
otherwise- Returns:
- the preferred size of the control.
- See Also:
-
Layout
Control.getBorderWidth()
Control.getBounds()
Control.getSize()
Control.pack(boolean)
- "computeTrim, getClientArea for controls that implement them"
-
addMouseListener
Description copied from class:Control
Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in theMouseListener
interface.- Overrides:
addMouseListener
in classControl
- Parameters:
l
- the listener which should be notified- See Also:
-
addMouseTrackListener
Description copied from class:Control
Adds the listener to the collection of listeners who will be notified when the mouse passes or hovers over controls, by sending it one of the messages defined in theMouseTrackListener
interface.- Overrides:
addMouseTrackListener
in classControl
- Parameters:
l
- the listener which should be notified- See Also:
-
addPaintListener
Description copied from class:Control
Adds the listener to the collection of listeners who will be notified when the receiver needs to be painted, by sending it one of the messages defined in thePaintListener
interface.- Overrides:
addPaintListener
in classControl
- Parameters:
l
- the listener which should be notified- See Also:
-
setBackground
Description copied from class:Control
Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.Note: This operation is a hint and may be overridden by the platform.
- Overrides:
setBackground
in classControl
- Parameters:
c
- the new color (or null)
-
setForeground
Description copied from class:Control
Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.Note: This operation is a hint and may be overridden by the platform.
- Overrides:
setForeground
in classControl
- Parameters:
c
- the new color (or null)
-
setCursor
Description copied from class:Control
Sets the receiver's cursor to the cursor specified by the argument, or to the default cursor for that kind of control if the argument is null.When the mouse pointer passes over a control its appearance is changed to match the control's cursor.
-