<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FSWT%2FFillLayout</id>
		<title>Java Tutorial/SWT/FillLayout - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FSWT%2FFillLayout"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/FillLayout&amp;action=history"/>
		<updated>2026-04-21T11:27:10Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/FillLayout&amp;diff=2979&amp;oldid=prev</id>
		<title> в 17:44, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/FillLayout&amp;diff=2979&amp;oldid=prev"/>
				<updated>2010-05-31T17:44:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 17:44, 31 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/FillLayout&amp;diff=2980&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_Tutorial/SWT/FillLayout&amp;diff=2980&amp;oldid=prev"/>
				<updated>2010-05-31T15:19:40Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==  Configure the layout orientation: HORIZONTAL and VERTICAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The possible values for type: SWT.HORIZONTAL, SWT.VERTICAL&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;SWT.HORIZONTAL: lays the controls in a single row&lt;br /&gt;
SWT.VERTICAL:   lays the controls in a single column.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class FillLayoutHorizontal {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    Shell shell = new Shell(display);&lt;br /&gt;
    shell.setLayout(new FillLayout(SWT.HORIZONTAL));&lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;one&amp;quot;);&lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;two&amp;quot;);&lt;br /&gt;
    new Button(shell, SWT.PUSH).setText(&amp;quot;three&amp;quot;);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Define the margins and spacing properties ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The default (initial) value of each property is 0.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class MarginSpaceProperties {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    FillLayout fillLayout = new FillLayout(SWT.HORIZONTAL);&lt;br /&gt;
    // Width of horizontal margins placed along the left and right edges    &lt;br /&gt;
    fillLayout.marginWidth = 5;&lt;br /&gt;
    // Height of vertical margins placed along the top and bottom edges&lt;br /&gt;
    fillLayout.marginHeight = 5;&lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(fillLayout);&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button number 2&amp;quot;);&lt;br /&gt;
    Button button3 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button3.setText(&amp;quot;3&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    shell.setSize(450, 100);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Set spacing properties ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The default (initial) value of each property is 0.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.layout.FillLayout;&lt;br /&gt;
import org.eclipse.swt.widgets.Button;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
public class LayoutSpaceProperties {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Display display = new Display();&lt;br /&gt;
    final Shell shell = new Shell(display);&lt;br /&gt;
    FillLayout fillLayout = new FillLayout(SWT.HORIZONTAL);&lt;br /&gt;
    &lt;br /&gt;
    fillLayout.marginWidth = 5;&lt;br /&gt;
    fillLayout.marginHeight = 5;&lt;br /&gt;
    &lt;br /&gt;
    // Number of pixels between the edge of a cell and edges of its neighboring cells&lt;br /&gt;
    fillLayout.spacing = 10;    &lt;br /&gt;
    &lt;br /&gt;
    shell.setLayout(fillLayout);&lt;br /&gt;
    &lt;br /&gt;
    Button button1 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button1.setText(&amp;quot;button1&amp;quot;);&lt;br /&gt;
    Button button2 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button2.setText(&amp;quot;button number 2&amp;quot;);&lt;br /&gt;
    Button button3 = new Button(shell, SWT.PUSH);&lt;br /&gt;
    button3.setText(&amp;quot;3&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    shell.setSize(450, 100);&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!display.readAndDispatch()) {&lt;br /&gt;
        display.sleep();&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    display.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Using FillLayout ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;FillLayout lays out controls into a single row or column (without wrap).&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;FillLayout forces all the children to be the same size.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;FillLayout places the children into the whole client area of a composite.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can specify the margins and spacing properties. &lt;br /&gt;
FillLayout has no layout data. &lt;br /&gt;
The primary usage of FillLayouts is laying out controls in task bars and toolbars.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It places all controls in either a single column or a single row, and makes them all the same size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;FillLayout Constructors:&amp;lt;/p&amp;gt;&lt;br /&gt;
ConstructorDescriptionpublic FillLayout()Constructs a FillLayout and sets type to SWT.HORIZONTAL.public FillLayout(int type)Constructs a FillLayout and sets type to the passed type.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>