net.sourceforge.rssowl.util.shop
Class LayoutShop

java.lang.Object
  extended bynet.sourceforge.rssowl.util.shop.LayoutShop

public class LayoutShop
extends Object

Factory class for some LayoutData concerns in RSSOwl.

Version:
1.1.3
Author:
Benjamin Pasero

Constructor Summary
private LayoutShop()
          This utility class constructor is hidden
 
Method Summary
static void centerShell(org.eclipse.swt.widgets.Display display, org.eclipse.swt.widgets.Shell shell)
          Center a shell on the monitor
static org.eclipse.swt.layout.FillLayout createFillLayout(int marginWidth, int marginHeight)
          Create a new FillLayout with the given parameters
static org.eclipse.swt.layout.GridLayout createGridLayout(int cols)
          Create a new GridLayout with the given parameters
static org.eclipse.swt.layout.GridLayout createGridLayout(int cols, int marginWidth)
          Create a new GridLayout with the given parameters
static org.eclipse.swt.layout.GridLayout createGridLayout(int cols, int marginWidth, int marginHeight)
          Create a new GridLayout with the given parameters
static org.eclipse.swt.layout.GridLayout createGridLayout(int cols, int marginWidth, int marginHeight, boolean makeColumnsEqualWidth)
          Create a new GridLayout with the given parameters
static org.eclipse.swt.layout.GridLayout createGridLayout(int cols, int marginWidth, int marginHeight, int verticalSpacing)
          Create a new GridLayout with the given parameters
static org.eclipse.swt.layout.GridLayout createGridLayout(int cols, int marginWidth, int marginHeight, int verticalSpacing, int horizontalSpacing, boolean makeColumnsEqualWidth)
          Create a new GridLayout with the given parameters
static void positionShell(org.eclipse.swt.widgets.Shell shell, boolean computeSize, int sameDialogCount)
          Sets the initial location to use for the shell.
static void setDialogSpacer(org.eclipse.swt.widgets.Composite composite, int cols, int rows)
          Set invisible labels as spacer to a composite.
static void setLayoutForAll(org.eclipse.swt.widgets.Control control)
          Recursivly update layout for given control and childs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutShop

private LayoutShop()
This utility class constructor is hidden

Method Detail

centerShell

public static void centerShell(org.eclipse.swt.widgets.Display display,
                               org.eclipse.swt.widgets.Shell shell)
Center a shell on the monitor

Parameters:
display - The display
shell - The shell to center

createFillLayout

public static org.eclipse.swt.layout.FillLayout createFillLayout(int marginWidth,
                                                                 int marginHeight)
Create a new FillLayout with the given parameters

Parameters:
marginWidth - Margin width in pixel
marginHeight - Margin height in pixel
Returns:
FillLayout New FillLayout with the given parameters

createGridLayout

public static org.eclipse.swt.layout.GridLayout createGridLayout(int cols)
Create a new GridLayout with the given parameters

Parameters:
cols - The number of columns
Returns:
GridLayout New GridLayout with the given parameters

createGridLayout

public static org.eclipse.swt.layout.GridLayout createGridLayout(int cols,
                                                                 int marginWidth)
Create a new GridLayout with the given parameters

Parameters:
cols - The number of columns
marginWidth - Margin width in pixel
Returns:
GridLayout New GridLayout with the given parameters

createGridLayout

public static org.eclipse.swt.layout.GridLayout createGridLayout(int cols,
                                                                 int marginWidth,
                                                                 int marginHeight)
Create a new GridLayout with the given parameters

Parameters:
cols - The number of columns
marginWidth - Margin width in pixel
marginHeight - Margin height in pixel
Returns:
GridLayout New GridLayout with the given parameters

createGridLayout

public static org.eclipse.swt.layout.GridLayout createGridLayout(int cols,
                                                                 int marginWidth,
                                                                 int marginHeight,
                                                                 boolean makeColumnsEqualWidth)
Create a new GridLayout with the given parameters

Parameters:
cols - The number of columns
marginWidth - Margin width in pixel
marginHeight - Margin height in pixel
makeColumnsEqualWidth - TRUE if columns should be equals in size
Returns:
GridLayout New GridLayout with the given parameters

createGridLayout

public static org.eclipse.swt.layout.GridLayout createGridLayout(int cols,
                                                                 int marginWidth,
                                                                 int marginHeight,
                                                                 int verticalSpacing)
Create a new GridLayout with the given parameters

Parameters:
cols - The number of columns
marginWidth - Margin width in pixel
marginHeight - Margin height in pixel
verticalSpacing - Vertical spacing in pixel
Returns:
GridLayout New GridLayout with the given parameters

createGridLayout

public static org.eclipse.swt.layout.GridLayout createGridLayout(int cols,
                                                                 int marginWidth,
                                                                 int marginHeight,
                                                                 int verticalSpacing,
                                                                 int horizontalSpacing,
                                                                 boolean makeColumnsEqualWidth)
Create a new GridLayout with the given parameters

Parameters:
cols - The number of columns
marginWidth - Margin width in pixel
marginHeight - Margin height in pixel
verticalSpacing - Vertical spacing in pixel
horizontalSpacing - Horizontal spacing in pixel
makeColumnsEqualWidth - TRUE if columns should be equals in size
Returns:
GridLayout New GridLayout with the given parameters

positionShell

public static void positionShell(org.eclipse.swt.widgets.Shell shell,
                                 boolean computeSize,
                                 int sameDialogCount)
Sets the initial location to use for the shell. The default implementation centers the shell horizontally (1/2 of the difference to the left and 1/2 to the right) and vertically (1/3 above and 2/3 below) relative to the parent shell

Parameters:
shell - The shell to set the location
computeSize - If TRUE, initialSize is computed from the Shell
sameDialogCount - In the case the same dialog is opened more than once, do not position the Shells on the same position. The sameDialogCount integer tells how many dialogs of the same kind are already open. This number is used to move the new dialog by some pixels.

setDialogSpacer

public static void setDialogSpacer(org.eclipse.swt.widgets.Composite composite,
                                   int cols,
                                   int rows)
Set invisible labels as spacer to a composite. The labels will grab vertical space.

Parameters:
composite - The control to add the spacer into
cols - Is used as horizontal span in the GridData
rows - Number of labels that are created

setLayoutForAll

public static void setLayoutForAll(org.eclipse.swt.widgets.Control control)
Recursivly update layout for given control and childs

Parameters:
control - The control to set the layout


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo