|
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
This class is used to provide common scrolling services to a number of controls in the toolkit. Classes that extend it are not required to implement any method.
Field Summary |
---|
Fields inherited from class org.eclipse.swt.widgets.Control |
---|
handle |
Constructor Summary | |
---|---|
SharedScrolledComposite(Composite parent,
int style)
Creates the new instance. |
Method Summary | |
---|---|
boolean |
isDelayedReflow()
Tests if the control uses delayed reflow. |
void |
layout(boolean changed)
If the receiver has a layout, asks the layout to lay out (that is, set the size and location of) the receiver's children. |
void |
reflow(boolean flushCache)
Recomputes the body layout and the scroll bars. |
void |
setBackground(Color bg)
Sets the background of the control and its content. |
void |
setContent(Control content)
Overrides 'super' to pass the proper colors and font |
void |
setDelayedReflow(boolean delayedReflow)
Sets the delayed reflow feature. |
void |
setExpandHorizontal(boolean expand)
Configure the ScrolledComposite to resize the content object to be as wide as the ScrolledComposite when the width of the ScrolledComposite is greater than the minimum width specified in setMinWidth. |
void |
setExpandVertical(boolean expand)
Configure the ScrolledComposite to resize the content object to be as tall as the ScrolledComposite when the height of the ScrolledComposite is greater than the minimum height specified in setMinHeight. |
boolean |
setFocus()
If content is set, transfers focus to the content. |
void |
setFont(Font font)
Sets the font of the form. |
void |
setForeground(Color fg)
Sets the foreground of the control and its content. |
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, computeSize, 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 SharedScrolledComposite(Composite parent, int style)
parent
- the parent compositestyle
- the style to useMethod Detail |
public void setForeground(Color fg)
setForeground
in class Control
fg
- the new foreground colorpublic void setBackground(Color bg)
setBackground
in class Control
bg
- the new background colorpublic void setFont(Font font)
setFont
in class Control
font
- the new font (or null)public void setContent(Control content)
setContent
in class ScrolledComposite
content
- the control to be displayed in the content areapublic boolean setFocus()
setFocus
in class Composite
public void layout(boolean changed)
Composite
true
the layout must not rely
on any information it has cached about the immediate children. If it
is false
the layout may (potentially) optimize the
work it is doing by assuming that none of the receiver's
children has changed state since the last layout.
If the receiver does not have a layout, do nothing.
If a child is resized as a result of a call to layout, the
resize event will invoke the layout of the child. The layout
will cascade down through all child widgets in the receiver's widget
tree until a child is encountered that does not resize. Note that
a layout due to a resize will not flush any cached information
(same as layout(false)
).
layout
in class Composite
changed
- true
if the layout must flush its caches, and false
otherwisepublic void setExpandHorizontal(boolean expand)
ScrolledComposite
setExpandHorizontal
in class ScrolledComposite
expand
- true to expand the content control to fill available horizontal spacepublic void setExpandVertical(boolean expand)
ScrolledComposite
setExpandVertical
in class ScrolledComposite
expand
- true to expand the content control to fill available vertical spacepublic void reflow(boolean flushCache)
flushCache
- if true
, drop the cached datapublic boolean isDelayedReflow()
true
if reflow requests will
be delayed, false
otherwise.public void setDelayedReflow(boolean delayedReflow)
delayedReflow
- The delayedReflow to set.
|
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.