public abstract class ToggleHyperlink extends AbstractHyperlink
This is an abstract class. Subclasses are responsible for rendering the control using decoration and hover decoration color. Control should be rendered based on the current expansion state.
Modifier and Type | Field and Description |
---|---|
protected boolean |
hover |
protected int |
innerHeight |
protected int |
innerWidth |
marginHeight, marginWidth
Constructor and Description |
---|
ToggleHyperlink(Composite parent,
int style)
Creates a control in a provided composite.
|
Modifier and Type | Method and Description |
---|---|
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Computes the size of the control.
|
Color |
geHoverDecorationColor()
Deprecated.
use
getHoverDecorationColor |
Color |
getDecorationColor()
Returns the color of the decoration.
|
Color |
getHoverDecorationColor()
Returns the hover color of the decoration.
|
boolean |
isExpanded()
Returns the expansion state of the toggle control.
|
void |
setDecorationColor(Color decorationColor)
Sets the color of the decoration.
|
void |
setExpanded(boolean expanded)
Sets the expansion state of the twistie control
|
void |
setHoverDecorationColor(Color hoverColor)
Sets the hover color of decoration.
|
addHyperlinkListener, getHref, getSelection, getText, handleActivate, handleEnter, handleExit, paint, paintHyperlink, removeHyperlinkListener, setEnabled, setHref
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, 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, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
protected int innerWidth
protected int innerHeight
protected boolean hover
public ToggleHyperlink(Composite parent, int style)
parent
- the parentstyle
- the stylepublic void setDecorationColor(Color decorationColor)
decorationColor
- public Color getDecorationColor()
public void setHoverDecorationColor(Color hoverColor)
hoverColor
- the hover color to usepublic Color getHoverDecorationColor()
public Color geHoverDecorationColor()
getHoverDecorationColor
getHoverDecorationColor()
public Point computeSize(int wHint, int hHint, boolean changed)
computeSize
in class Composite
wHint
- width hinthHint
- height hintchanged
- if true, flush any saved layout stateLayout
,
Control.getBorderWidth()
,
Control.getBounds()
,
Control.getSize()
,
Control.pack(boolean)
,
"computeTrim, getClientArea for controls that implement them"public boolean isExpanded()
public void setExpanded(boolean expanded)
expanded
- the expansion state
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.