|
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.ui.forms.widgets.SizeCache
Caches the preferred size of an SWT control
Constructor Summary | |
---|---|
SizeCache()
|
|
SizeCache(Control control)
Creates a cache for size computations on the given control |
Method Summary | |
---|---|
Point |
computeAdjustedSize(int widthHint,
int heightHint)
Compute the control's size, and ensure that non-default hints are returned verbatim (this tries to compensate for SWT's hints, which aren't really the outer width of the control). |
int |
computeMaximumWidth()
|
Point |
computeMinimumSize()
|
int |
computeMinimumWidth()
|
Point |
computeSize(int widthHint,
int heightHint)
Computes the preferred size of the control. |
void |
flush()
Flush the cache (should be called if the control's contents may have changed since the last query) |
void |
flush(boolean recursive)
|
Control |
getControl()
Returns the control whose size is being cached |
void |
layoutIfNecessary()
|
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setBounds(Rectangle bounds)
|
void |
setControl(Control newControl)
Sets the control whose size is being cached. |
void |
setSize(int width,
int height)
|
void |
setSize(Point newSize)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SizeCache()
public SizeCache(Control control)
control
- the control for which sizes will be calculated,
or null to always return (0,0)Method Detail |
public void setControl(Control newControl)
newControl
- the control whose size is being cached, or null to always return (0,0)public Control getControl()
public void flush()
public void flush(boolean recursive)
public Point computeSize(int widthHint, int heightHint)
widthHint
- the known width of the control (pixels) or SWT.DEFAULT if unknownheightHint
- the known height of the control (pixels) or SWT.DEFAULT if unknown
public Point computeAdjustedSize(int widthHint, int heightHint)
widthHint
- the horizontal hintheightHint
- the vertical hint
public int computeMinimumWidth()
public int computeMaximumWidth()
public Point computeMinimumSize()
public void setSize(Point newSize)
public void setSize(int width, int height)
public void setBounds(int x, int y, int width, int height)
public void setBounds(Rectangle bounds)
public void layoutIfNecessary()
|
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.