<?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_by_API%2Forg.eclipse.swt.custom%2FCCombo</id>
		<title>Java by API/org.eclipse.swt.custom/CCombo - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_by_API%2Forg.eclipse.swt.custom%2FCCombo"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_by_API/org.eclipse.swt.custom/CCombo&amp;action=history"/>
		<updated>2026-04-22T22:20:23Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java_by_API/org.eclipse.swt.custom/CCombo&amp;diff=2231&amp;oldid=prev</id>
		<title> в 17:43, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_by_API/org.eclipse.swt.custom/CCombo&amp;diff=2231&amp;oldid=prev"/>
				<updated>2010-05-31T17:43:48Z</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:43, 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_by_API/org.eclipse.swt.custom/CCombo&amp;diff=2232&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java_by_API/org.eclipse.swt.custom/CCombo&amp;diff=2232&amp;oldid=prev"/>
				<updated>2010-05-31T14:43:42Z</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;== new CCombo(Composite com, int style) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
import org.eclipse.swt.SWT;&lt;br /&gt;
import org.eclipse.swt.custom.CCombo;&lt;br /&gt;
import org.eclipse.swt.custom.TableEditor;&lt;br /&gt;
import org.eclipse.swt.events.ModifyEvent;&lt;br /&gt;
import org.eclipse.swt.events.ModifyListener;&lt;br /&gt;
import org.eclipse.swt.events.MouseAdapter;&lt;br /&gt;
import org.eclipse.swt.events.MouseEvent;&lt;br /&gt;
import org.eclipse.swt.events.SelectionAdapter;&lt;br /&gt;
import org.eclipse.swt.events.SelectionEvent;&lt;br /&gt;
import org.eclipse.swt.graphics.Color;&lt;br /&gt;
import org.eclipse.swt.graphics.Point;&lt;br /&gt;
import org.eclipse.swt.graphics.Rectangle;&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.Control;&lt;br /&gt;
import org.eclipse.swt.widgets.Display;&lt;br /&gt;
import org.eclipse.swt.widgets.Shell;&lt;br /&gt;
import org.eclipse.swt.widgets.Table;&lt;br /&gt;
import org.eclipse.swt.widgets.TableColumn;&lt;br /&gt;
import org.eclipse.swt.widgets.TableItem;&lt;br /&gt;
import org.eclipse.swt.widgets.Text;&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void main(String[] a) {&lt;br /&gt;
    final Display d = new Display();&lt;br /&gt;
    final Shell shell = new Shell(d);&lt;br /&gt;
    shell.setSize(250, 200);&lt;br /&gt;
    shell.setLayout(new FillLayout());&lt;br /&gt;
    final int NUM = 5;&lt;br /&gt;
    final String[] options = { &amp;quot;Option 1&amp;quot;, &amp;quot;Option 2&amp;quot;, &amp;quot;Option 3&amp;quot; };&lt;br /&gt;
    final Table table = new Table(shell, SWT.SINGLE | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);&lt;br /&gt;
    table.setHeaderVisible(true);&lt;br /&gt;
    table.setLinesVisible(true);&lt;br /&gt;
    for (int i = 0; i &amp;lt; NUM; i++) {&lt;br /&gt;
      TableColumn column = new TableColumn(table, SWT.CENTER);&lt;br /&gt;
      column.setText(&amp;quot;Column &amp;quot; + (i + 1));&lt;br /&gt;
      column.pack();&lt;br /&gt;
    }&lt;br /&gt;
    TableEditor[] colorEditors = new TableEditor[NUM];&lt;br /&gt;
    Button[] colorButtons = new Button[NUM];&lt;br /&gt;
    for (int i = 0; i &amp;lt; NUM; i++) {&lt;br /&gt;
      final TableItem item = new TableItem(table, SWT.NONE);&lt;br /&gt;
      colorEditors[i] = new TableEditor(table);&lt;br /&gt;
      colorButtons[i] = new Button(table, SWT.PUSH);&lt;br /&gt;
      colorEditors[i].setEditor(colorButtons[i], item, 0);&lt;br /&gt;
    }&lt;br /&gt;
    final TableEditor editor = new TableEditor(table);&lt;br /&gt;
    editor.horizontalAlignment = SWT.LEFT;&lt;br /&gt;
    editor.grabHorizontal = true;&lt;br /&gt;
    table.addMouseListener(new MouseAdapter() {&lt;br /&gt;
      public void mouseDown(MouseEvent event) {&lt;br /&gt;
        Control old = editor.getEditor();&lt;br /&gt;
        if (old != null)&lt;br /&gt;
          old.dispose();&lt;br /&gt;
        Point pt = new Point(event.x, event.y);&lt;br /&gt;
        final TableItem item = table.getItem(pt);&lt;br /&gt;
        if (item != null) {&lt;br /&gt;
          int column = -1;&lt;br /&gt;
          for (int i = 0, n = table.getColumnCount(); i &amp;lt; n; i++) {&lt;br /&gt;
            Rectangle rect = item.getBounds(i);&lt;br /&gt;
            if (rect.contains(pt)) {&lt;br /&gt;
              column = i;&lt;br /&gt;
              break;&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
          if (column == 1) {&lt;br /&gt;
            final CCombo combo = new CCombo(table, SWT.READ_ONLY);&lt;br /&gt;
            for (int i = 0, n = options.length; i &amp;lt; n; i++) {&lt;br /&gt;
              combo.add(options[i]);&lt;br /&gt;
            }&lt;br /&gt;
            combo.select(combo.indexOf(item.getText(column)));&lt;br /&gt;
            editor.minimumWidth = combo.ruputeSize(SWT.DEFAULT, SWT.DEFAULT).x;&lt;br /&gt;
            table.getColumn(column).setWidth(editor.minimumWidth);&lt;br /&gt;
            combo.setFocus();&lt;br /&gt;
            editor.setEditor(combo, item, column);&lt;br /&gt;
          } else if (column &amp;gt; 1) {&lt;br /&gt;
            final Text text = new Text(table, SWT.NONE);&lt;br /&gt;
            text.setForeground(item.getForeground());&lt;br /&gt;
            text.setText(item.getText(column));&lt;br /&gt;
            text.setForeground(item.getForeground());&lt;br /&gt;
            text.selectAll();&lt;br /&gt;
            text.setFocus();&lt;br /&gt;
            editor.minimumWidth = text.getBounds().width;&lt;br /&gt;
            editor.setEditor(text, item, column);&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    });&lt;br /&gt;
    shell.open();&lt;br /&gt;
    while (!shell.isDisposed()) {&lt;br /&gt;
      if (!d.readAndDispatch())&lt;br /&gt;
        d.sleep();&lt;br /&gt;
    }&lt;br /&gt;
    d.dispose();&lt;br /&gt;
  }&lt;br /&gt;
}&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;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>