|
Eclipse Platform Release 3.0 |
||||||||||
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.ui.forms.widgets.AbstractHyperlink
org.eclipse.ui.forms.widgets.ToggleHyperlink
A custom selectable control that can be used to control areas that can be expanded or collapsed.
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.
Field Summary | |
protected boolean |
hover
|
protected int |
innerHeight
|
protected int |
innerWidth
|
Fields inherited from class org.eclipse.ui.forms.widgets.AbstractHyperlink |
marginHeight, marginWidth |
Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
Constructor Summary | |
ToggleHyperlink(Composite parent,
int style)
Creates a control in a provided composite. |
Method Summary | |
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Computes the size of the control. |
Color |
geHoverDecorationColor()
Returns the hover color of the decoration. |
Color |
getDecorationColor()
Returns the 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. |
Methods inherited from class org.eclipse.ui.forms.widgets.AbstractHyperlink |
addHyperlinkListener, getHref, getSelection, getText, handleActivate, handleEnter, handleExit, paint, paintHyperlink, removeHyperlinkListener, setHref |
Methods inherited from class org.eclipse.swt.widgets.Canvas |
getCaret, scroll, setCaret, setFont |
Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, 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 |
protected int innerWidth
protected int innerHeight
protected boolean hover
Constructor Detail |
public ToggleHyperlink(Composite parent, int style)
parent
- the parentstyle
- the styleMethod Detail |
public void setDecorationColor(Color decorationColor)
decorationColor
- public Color getDecorationColor()
public void setHoverDecorationColor(Color hoverColor)
hoverColor
- the hover color to usepublic Color geHoverDecorationColor()
public Point computeSize(int wHint, int hHint, boolean changed)
computeSize
in class Composite
wHint
- width hinthHint
- height hintchanged
- if true, flush any saved layout statepublic boolean isExpanded()
public void setExpanded(boolean expanded)
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.