|
Eclipse Platform Release 3.1 |
|||||||||||
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.custom.ScrolledComposite
org.eclipse.ui.forms.widgets.SharedScrolledComposite
org.eclipse.ui.forms.widgets.ScrolledPageBook
ScrolledPageBook is a class that is capable of stacking several composites (pages), while showing one at a time. The content is scrolled if there is not enough space to fit it in the client area.
Field Summary |
---|
Fields inherited from class org.eclipse.swt.widgets.Control |
---|
handle |
Constructor Summary | |
---|---|
ScrolledPageBook(Composite parent)
Creates a new instance in the provided parent |
|
ScrolledPageBook(Composite parent,
int style)
Creates a new instance in the provided parent and with the provided style. |
Method Summary | |
---|---|
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Removes the default size of the composite, allowing the control to shrink to the trim. |
Composite |
createPage(Object key)
Creates a new page for the provided key. |
Composite |
getContainer()
Returns the page book container. |
Control |
getCurrentPage()
Returns the page currently showing. |
boolean |
hasPage(Object key)
Tests if the page under the provided key is currently in the book. |
void |
registerPage(Object key,
Control page)
Registers a page under the privided key to be managed by the page book. |
void |
removePage(Object key)
Removes the page under the provided key from the page book. |
void |
removePage(Object key,
boolean showEmptyPage)
Removes the page under the provided key from the page book. |
boolean |
setFocus()
Sets focus on the current page if shown. |
void |
showEmptyPage()
Shows a page with no children to be used if the desire is to not show any registered page. |
void |
showPage(Object key)
Shows the page with the provided key and hides the page previously showing. |
Methods inherited from class org.eclipse.ui.forms.widgets.SharedScrolledComposite |
---|
isDelayedReflow, layout, reflow, setBackground, setContent, setDelayedReflow, setExpandHorizontal, setExpandVertical, setFont, setForeground |
Methods inherited from class org.eclipse.swt.custom.ScrolledComposite |
---|
getAlwaysShowScrollBars, getContent, getOrigin, setAlwaysShowScrollBars, setLayout, setMinHeight, setMinSize, setMinSize, setMinWidth, setOrigin, setOrigin |
Methods inherited from class org.eclipse.swt.widgets.Composite |
---|
changed, checkSubclass, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, setLayoutDeferred, 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 |
Constructor Detail |
public ScrolledPageBook(Composite parent)
parent
- public ScrolledPageBook(Composite parent, int style)
parent
- the control parentstyle
- the style to useMethod Detail |
public Point computeSize(int wHint, int hHint, boolean changed)
computeSize
in class Composite
wHint
- the width hinthHint
- the height hintchanged
- if true
, do not use cached valuespublic boolean hasPage(Object key)
key
- the page key
true
if page exists, false
otherwise.public Composite createPage(Object key)
key
- the page key
public Composite getContainer()
public void registerPage(Object key, Control page)
key
- the page keypage
- the page composite to registercreatePage(java.lang.Object)
,
getContainer()
public void removePage(Object key)
key
- the page key.public void removePage(Object key, boolean showEmptyPage)
key
- the page key.showEmptyPage
- if true
, shows the empty page
after page removal.public void showPage(Object key)
key
- the page keypublic void showEmptyPage()
public boolean setFocus()
setFocus
in class SharedScrolledComposite
public Control getCurrentPage()
|
Eclipse Platform Release 3.1 |
|||||||||||
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, 2005. All rights reserved.