public class ScrolledPageBook extends SharedScrolledComposite
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
isDelayedReflow, layout, reflow, setBackground, setContent, setDelayedReflow, setExpandHorizontal, setExpandVertical, setFont, setForeground
getAlwaysShowScrollBars, getContent, getExpandHorizontal, getExpandVertical, getMinHeight, getMinWidth, getOrigin, getShowFocusedControl, setAlwaysShowScrollBars, setLayout, setMinHeight, setMinSize, setMinSize, setMinWidth, setOrigin, setOrigin, setShowFocusedControl, showControl
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, 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, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, 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
public ScrolledPageBook(Composite parent)
parent
- public ScrolledPageBook(Composite parent, int style)
parent
- the control parentstyle
- the style to usepublic 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 valuesLayout
,
Control.getBorderWidth()
,
Control.getBounds()
,
Control.getSize()
,
Control.pack(boolean)
,
"computeTrim, getClientArea for controls that implement them"public boolean hasPage(Object key)
key
- the page keytrue
if page exists, false
otherwise.public Composite createPage(Object key)
key
- the page keypublic Composite getContainer()
public void registerPage(Object key, Control page)
key
- the page keypage
- the page composite to registercreatePage(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
true
if the control got focus, and false
if it was unable to.Control.forceFocus()
public Control getCurrentPage()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.