Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.forms.widgets
Class LayoutCache


java.lang.Object
  extended by 
org.eclipse.ui.forms.widgets.LayoutCache

public class LayoutCache
extends Object

Caches the preferred sizes of an array of controls

Since:
3.0

Constructor Summary
LayoutCache ()
          Creates an empty layout cache
LayoutCache ( Control[] controls)
          Creates a cache for the given array of controls
 
Method Summary
  Point computeSize (int controlIndex, int widthHint, int heightHint)
          Computes the preferred size of the nth control
 void flush ()
          Flushes the cache.
 void flush (int controlIndex)
          Flushes the cache for the given control.
  SizeCache getCache (int idx)
          Returns the size cache for the given control
 void setControls ( Control[] controls)
          Sets the controls that are being cached here.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutCache

public LayoutCache()
Creates an empty layout cache


LayoutCache

public LayoutCache(
Control[] controls)
Creates a cache for the given array of controls

Parameters:
controls -
Method Detail

getCache

public 
SizeCache getCache(int idx)
Returns the size cache for the given control

Parameters:
idx -
Returns:
the size cache for the given control

setControls

public void setControls(
Control[] controls)
Sets the controls that are being cached here. If these are the same controls that were used last time, this method does nothing. Otherwise, the cache is flushed and a new cache is created for the new controls.

Parameters:
controls -

computeSize

public 
Point computeSize(int controlIndex,
                         int widthHint,
                         int heightHint)
Computes the preferred size of the nth control

Parameters:
controlIndex - index of the control whose size will be computed
widthHint - width of the control (or SWT.DEFAULT if unknown)
heightHint - height of the control (or SWT.DEFAULT if unknown)
Returns:
the preferred size of the control

flush

public void flush(int controlIndex)
Flushes the cache for the given control. This should be called if exactly one of the controls has changed but the remaining controls remain unmodified

Parameters:
controlIndex -

flush

public void flush()
Flushes the cache.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire