public abstract class SharedScrolledComposite extends ScrolledComposite
Constructor and Description |
---|
SharedScrolledComposite(Composite parent,
int style)
Creates the new instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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, 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, requestLayout, 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, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public SharedScrolledComposite(Composite parent, int style)
parent
- the parent compositestyle
- the style to usepublic 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)
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
true
if the control got focus, and false
if it was unable to.Control.forceFocus()
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.
It is normally more efficient to invoke Control.requestLayout()
on every control which has changed in the layout than it is to invoke
this method on the layout itself. Clients are encouraged to use
Control.requestLayout()
where possible instead of calling
this method.
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)
).
Note: Layout is different from painting. If a child is moved or resized such that an area in the parent is exposed, then the parent will paint. If no child is affected, the parent will not paint.
public 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.
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.