Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 112243 Details for
Bug 242163
[SWT Examples - SWT Controls] top-level tab folder requires wide screen on OS X
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed patch (now includes all controls)
242163-all-tabs.patch (text/plain), 21.88 KB, created by
Volker Wegert
on 2008-09-10 16:05:31 EDT
(
hide
)
Description:
proposed patch (now includes all controls)
Filename:
MIME Type:
Creator:
Volker Wegert
Created:
2008-09-10 16:05:31 EDT
Size:
21.88 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.swt.examples >Index: src/org/eclipse/swt/examples/controlexample/TextTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TextTab.java,v >retrieving revision 1.31 >diff -u -r1.31 TextTab.java >--- src/org/eclipse/swt/examples/controlexample/TextTab.java 31 May 2007 22:02:25 -0000 1.31 >+++ src/org/eclipse/swt/examples/controlexample/TextTab.java 10 Sep 2008 20:00:58 -0000 >@@ -108,8 +108,8 @@ > * @param tabFolder org.eclipse.swt.widgets.TabFolder > * @return the new page for the tab folder > */ >- Composite createTabFolderPage (TabFolder tabFolder) { >- super.createTabFolderPage (tabFolder); >+ Composite createPageComposite (Composite parent) { >+ Composite c = super.createPageComposite (parent); > > /* > * Add a resize listener to the tabFolderPage so that >@@ -117,13 +117,13 @@ > * its preferred size, and then resizes the shell, we > * recalculate the preferred size correctly. > */ >- tabFolderPage.addControlListener(new ControlAdapter() { >+ c.addControlListener(new ControlAdapter() { > public void controlResized(ControlEvent e) { > setExampleWidgetSize (); > } > }); > >- return tabFolderPage; >+ return c; > } > > /** >Index: src/org/eclipse/swt/examples/controlexample/ShellTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java,v >retrieving revision 1.24 >diff -u -r1.24 ShellTab.java >--- src/org/eclipse/swt/examples/controlexample/ShellTab.java 11 Feb 2008 16:36:50 -0000 1.24 >+++ src/org/eclipse/swt/examples/controlexample/ShellTab.java 10 Sep 2008 20:00:57 -0000 >@@ -118,7 +118,7 @@ > * right half of each example tab. It consists of the > * style group, the 'other' group and the size group. > */ >- controlGroup = new Group (tabFolderPage, SWT.NONE); >+ controlGroup = new Group (pageComposite, SWT.NONE); > controlGroup.setLayout (new GridLayout (2, true)); > controlGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL)); > controlGroup.setText (ControlExample.getResourceString("Parameters")); >Index: src/org/eclipse/swt/examples/controlexample/MenuTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/MenuTab.java,v >retrieving revision 1.8 >diff -u -r1.8 MenuTab.java >--- src/org/eclipse/swt/examples/controlexample/MenuTab.java 31 May 2007 22:02:25 -0000 1.8 >+++ src/org/eclipse/swt/examples/controlexample/MenuTab.java 10 Sep 2008 20:00:57 -0000 >@@ -125,7 +125,7 @@ > * right half of each example tab. For MenuTab, it consists of > * the Menu style group, the MenuItem style group and the 'other' group. > */ >- controlGroup = new Group (tabFolderPage, SWT.NONE); >+ controlGroup = new Group (pageComposite, SWT.NONE); > controlGroup.setLayout (new GridLayout (2, true)); > controlGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL)); > controlGroup.setText (ControlExample.getResourceString("Parameters")); >Index: src/org/eclipse/swt/examples/controlexample/ToolTipTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolTipTab.java,v >retrieving revision 1.5 >diff -u -r1.5 ToolTipTab.java >--- src/org/eclipse/swt/examples/controlexample/ToolTipTab.java 31 May 2007 22:02:25 -0000 1.5 >+++ src/org/eclipse/swt/examples/controlexample/ToolTipTab.java 10 Sep 2008 20:00:58 -0000 >@@ -82,8 +82,8 @@ > * @param tabFolder org.eclipse.swt.widgets.TabFolder > * @return the new page for the tab folder > */ >- Composite createTabFolderPage (TabFolder tabFolder) { >- super.createTabFolderPage (tabFolder); >+ Composite createPageComposite (Composite parent) { >+ Composite c = super.createPageComposite (parent); > > /* > * Add a resize listener to the tabFolderPage so that >@@ -91,13 +91,13 @@ > * its preferred size, and then resizes the shell, we > * recalculate the preferred size correctly. > */ >- tabFolderPage.addControlListener(new ControlAdapter() { >+ c.addControlListener(new ControlAdapter() { > public void controlResized(ControlEvent e) { > setExampleWidgetSize (); > } > }); > >- return tabFolderPage; >+ return c; > } > > /** >Index: src/org/eclipse/swt/examples/controlexample/StyledTextTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java,v >retrieving revision 1.23 >diff -u -r1.23 StyledTextTab.java >--- src/org/eclipse/swt/examples/controlexample/StyledTextTab.java 14 Mar 2008 21:15:56 -0000 1.23 >+++ src/org/eclipse/swt/examples/controlexample/StyledTextTab.java 10 Sep 2008 20:00:58 -0000 >@@ -262,8 +262,8 @@ > * @param tabFolder org.eclipse.swt.widgets.TabFolder > * @return the new page for the tab folder > */ >- Composite createTabFolderPage (TabFolder tabFolder) { >- super.createTabFolderPage (tabFolder); >+ Composite createPageComposite (Composite parent) { >+ Composite c = super.createPageComposite (parent); > > /* > * Add a resize listener to the tabFolderPage so that >@@ -271,13 +271,13 @@ > * its preferred size, and then resizes the shell, we > * recalculate the preferred size correctly. > */ >- tabFolderPage.addControlListener(new ControlAdapter() { >+ c.addControlListener(new ControlAdapter() { > public void controlResized(ControlEvent e) { > setExampleWidgetSize (); > } > }); > >- return tabFolderPage; >+ return c; > } > > /** >Index: src/org/eclipse/swt/examples/controlexample/ComboTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ComboTab.java,v >retrieving revision 1.20 >diff -u -r1.20 ComboTab.java >--- src/org/eclipse/swt/examples/controlexample/ComboTab.java 31 May 2007 22:02:25 -0000 1.20 >+++ src/org/eclipse/swt/examples/controlexample/ComboTab.java 10 Sep 2008 20:00:57 -0000 >@@ -80,8 +80,8 @@ > * @param tabFolder org.eclipse.swt.widgets.TabFolder > * @return the new page for the tab folder > */ >- Composite createTabFolderPage (TabFolder tabFolder) { >- super.createTabFolderPage (tabFolder); >+ Composite createPageComposite (Composite parent) { >+ Composite c = super.createPageComposite (parent); > > /* > * Add a resize listener to the tabFolderPage so that >@@ -89,13 +89,13 @@ > * its preferred size, and then resizes the shell, we > * recalculate the preferred size correctly. > */ >- tabFolderPage.addControlListener(new ControlAdapter() { >+ c.addControlListener(new ControlAdapter() { > public void controlResized(ControlEvent e) { > setExampleWidgetSize (); > } > }); > >- return tabFolderPage; >+ return c; > } > > /** >Index: src/org/eclipse/swt/examples/controlexample/BrowserTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java,v >retrieving revision 1.8 >diff -u -r1.8 BrowserTab.java >--- src/org/eclipse/swt/examples/controlexample/BrowserTab.java 1 May 2008 16:52:51 -0000 1.8 >+++ src/org/eclipse/swt/examples/controlexample/BrowserTab.java 10 Sep 2008 20:00:57 -0000 >@@ -154,8 +154,8 @@ > * @param tabFolder org.eclipse.swt.widgets.TabFolder > * @return the new page for the tab folder > */ >- Composite createTabFolderPage (final TabFolder tabFolder) { >- super.createTabFolderPage (tabFolder); >+ Composite createPageComposite (final Composite parent) { >+ Composite c = super.createPageComposite (parent); > > /* > * Add a resize listener to the tabFolderPage so that >@@ -163,29 +163,30 @@ > * its preferred size, and then resizes the shell, we > * recalculate the preferred size correctly. > */ >- tabFolderPage.addControlListener(new ControlAdapter() { >+ c.addControlListener(new ControlAdapter() { > public void controlResized(ControlEvent e) { > setExampleWidgetSize (); > } > }); > >+ return c; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.swt.examples.controlexample.Tab#activated() >+ */ >+ public void activated() { >+ super.activated(); > /* >- * Add a selection listener to the tabFolder to bring up a >- * dialog if this platform does not support the Browser. >+ * Bring up a dialog if this platform does not support the Browser. > */ >- tabFolder.addSelectionListener(new SelectionAdapter() { >- public void widgetSelected(SelectionEvent e) { >- if (errorMessage != null && tabFolder.getSelection()[0].getText().equals(getTabText())) { >- MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK); >- dialog.setMessage(ControlExample.getResourceString("BrowserNotFound", new String [] {errorMessage})); >- dialog.open(); >- } >- } >- }); >- >- return tabFolderPage; >+ if (errorMessage != null) { >+ MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK); >+ dialog.setMessage(ControlExample.getResourceString("BrowserNotFound", new String [] {errorMessage})); >+ dialog.open(); >+ } > } >- >+ > /** > * Disposes the "Example" widgets. > */ >Index: src/org/eclipse/swt/examples/controlexample/DialogTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java,v >retrieving revision 1.29 >diff -u -r1.29 DialogTab.java >--- src/org/eclipse/swt/examples/controlexample/DialogTab.java 28 Mar 2008 20:03:19 -0000 1.29 >+++ src/org/eclipse/swt/examples/controlexample/DialogTab.java 10 Sep 2008 20:00:57 -0000 >@@ -238,7 +238,7 @@ > * right half of each example tab. It consists of the > * style group, the display group and the size group. > */ >- controlGroup = new Group (tabFolderPage, SWT.NONE); >+ controlGroup = new Group (pageComposite, SWT.NONE); > GridLayout gridLayout= new GridLayout (); > controlGroup.setLayout(gridLayout); > gridLayout.numColumns = 2; >Index: src/org/eclipse/swt/examples/controlexample/CanvasTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CanvasTab.java,v >retrieving revision 1.16 >diff -u -r1.16 CanvasTab.java >--- src/org/eclipse/swt/examples/controlexample/CanvasTab.java 31 May 2007 22:02:25 -0000 1.16 >+++ src/org/eclipse/swt/examples/controlexample/CanvasTab.java 10 Sep 2008 20:00:57 -0000 >@@ -184,22 +184,22 @@ > * @param tabFolder org.eclipse.swt.widgets.TabFolder > * @return the new page for the tab folder > */ >- Composite createTabFolderPage (TabFolder tabFolder) { >- super.createTabFolderPage (tabFolder); >+ Composite createPageComposite (Composite parent) { >+ Composite c = super.createPageComposite (parent); > > /* >- * Add a resize listener to the tabFolderPage so that >+ * Add a resize listener to the Composite so that > * if the user types into the example widget to change > * its preferred size, and then resizes the shell, we > * recalculate the preferred size correctly. > */ >- tabFolderPage.addControlListener(new ControlAdapter() { >+ c.addControlListener(new ControlAdapter() { > public void controlResized(ControlEvent e) { > setExampleWidgetSize (); > } > }); > >- return tabFolderPage; >+ return c; > } > > /** >Index: src/org/eclipse/swt/examples/controlexample/SpinnerTab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SpinnerTab.java,v >retrieving revision 1.19 >diff -u -r1.19 SpinnerTab.java >--- src/org/eclipse/swt/examples/controlexample/SpinnerTab.java 3 Mar 2008 19:56:49 -0000 1.19 >+++ src/org/eclipse/swt/examples/controlexample/SpinnerTab.java 10 Sep 2008 20:00:58 -0000 >@@ -163,8 +163,8 @@ > * @param tabFolder org.eclipse.swt.widgets.TabFolder > * @return the new page for the tab folder > */ >- Composite createTabFolderPage (TabFolder tabFolder) { >- super.createTabFolderPage (tabFolder); >+ Composite createPageComposite (Composite parent) { >+ Composite c = super.createPageComposite (parent); > > /* > * Add a resize listener to the tabFolderPage so that >@@ -172,13 +172,13 @@ > * its preferred size, and then resizes the shell, we > * recalculate the preferred size correctly. > */ >- tabFolderPage.addControlListener(new ControlAdapter() { >+ c.addControlListener(new ControlAdapter() { > public void controlResized(ControlEvent e) { > setExampleWidgetSize (); > } > }); > >- return tabFolderPage; >+ return c; > } > > /** >Index: src/org/eclipse/swt/examples/controlexample/ControlExample.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java,v >retrieving revision 1.50 >diff -u -r1.50 ControlExample.java >--- src/org/eclipse/swt/examples/controlexample/ControlExample.java 29 Nov 2007 22:39:09 -0000 1.50 >+++ src/org/eclipse/swt/examples/controlexample/ControlExample.java 10 Sep 2008 20:00:57 -0000 >@@ -12,6 +12,9 @@ > > > import org.eclipse.swt.*; >+import org.eclipse.swt.custom.StackLayout; >+import org.eclipse.swt.events.SelectionAdapter; >+import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.graphics.*; > import org.eclipse.swt.layout.*; > import org.eclipse.swt.widgets.*; >@@ -24,8 +27,11 @@ > private static ResourceBundle resourceBundle = > ResourceBundle.getBundle("examples_control"); //$NON-NLS-1$ > private ShellTab shellTab; >- private TabFolder tabFolder; >+ private Combo tabCombo; >+ private Composite tabArea; >+ private StackLayout tabLayout; > private Tab [] tabs; >+ private Composite[] tabPages; > Image images[]; > > static final int ciClosedFolder = 0, ciOpenFolder = 1, ciTarget = 2, ciBackground = 3, ciParentBackground = 4; >@@ -52,14 +58,42 @@ > */ > public ControlExample(Composite parent) { > initResources(); >- tabFolder = new TabFolder (parent, SWT.NONE); > tabs = createTabs(); >- for (int i=0; i<tabs.length; i++) { >- TabItem item = new TabItem (tabFolder, SWT.NONE); >- item.setText (tabs [i].getTabText ()); >- item.setControl (tabs [i].createTabFolderPage (tabFolder)); >- item.setData (tabs [i]); >+ >+ String comboEntries[] = new String[tabs.length]; >+ for (int i = 0; i < tabs.length; i++) { >+ comboEntries[i] = tabs[i].getTabText(); > } >+ >+ Composite top = new Composite(parent, SWT.NONE); >+ top.setLayout(new GridLayout(2, false)); >+ >+ Label tabLabel = new Label(top, SWT.NONE); >+ tabLabel.setText("Control"); >+ tabLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); >+ >+ tabCombo = new Combo(top, SWT.READ_ONLY); >+ tabCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); >+ tabCombo.setItems(comboEntries); >+ tabCombo.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ selectTab(tabCombo.getSelectionIndex()); >+ } >+ }); >+ >+ tabLayout = new StackLayout(); >+ tabArea = new Composite(top, SWT.NONE); >+ tabArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); >+ tabArea.setLayout(tabLayout); >+ tabPages = new Composite[tabs.length]; >+ for (int i = 0; i < tabs.length; i++) { >+ tabPages[i] = tabs[i].createPageComposite(tabArea); >+ } >+ >+ tabCombo.select(0); >+ tabLayout.topControl = tabPages[0]; >+ tabArea.layout(); >+ > startup = false; > } > >@@ -73,7 +107,7 @@ > new ComboTab (this), > new CoolBarTab (this), > new DateTimeTab (this), >- new DialogTab (this), >+ new DialogTab (this), > new ExpandBarTab (this), > new GroupTab (this), > new LabelTab (this), >@@ -83,14 +117,14 @@ > new ProgressBarTab (this), > new SashTab (this), > new ScaleTab (this), >- shellTab = new ShellTab(this), >+ shellTab = new ShellTab(this), > new SliderTab (this), >- new SpinnerTab (this), >+ new SpinnerTab (this), > new TabFolderTab (this), > new TableTab (this), >- new TextTab (this), >+ new TextTab (this), > new ToolBarTab (this), >- new ToolTipTab (this), >+ new ToolTipTab (this), > new TreeTab (this), > new BrowserTab (this), > }; >@@ -111,7 +145,8 @@ > */ > if (shellTab != null) shellTab.closeAllShells (); > shellTab = null; >- tabFolder = null; >+ tabArea = null; >+ tabCombo = null; > freeResources(); > } > >@@ -214,10 +249,20 @@ > } > > /** >+ * Changes the tab displayed in the group. >+ * @param index the index of the tab in tabs[] >+ */ >+ void selectTab(int index) { >+ tabLayout.topControl = tabPages[index]; >+ tabArea.layout(); >+ tabs[index].activated(); >+ } >+ >+ /** > * Grabs input focus. > */ > public void setFocus() { >- tabFolder.setFocus(); >+ tabCombo.setFocus(); > } > > /** >@@ -231,14 +276,14 @@ > /* Workaround: if the tab folder is wider than the screen, > * carbon clips instead of somehow scrolling the tab items. > * We try to recover some width by using shorter tab names. */ >- if (size.x > monitorArea.width && SWT.getPlatform().equals("carbon")) { >- TabItem [] tabItems = instance.tabFolder.getItems(); >- for (int i=0; i<tabItems.length; i++) { >- tabItems[i].setText (instance.tabs [i].getShortTabText ()); >- } >- size = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT); >- } >- shell.setSize(Math.min(size.x, monitorArea.width), Math.min(size.y, monitorArea.height)); >+// if (size.x > monitorArea.width && SWT.getPlatform().equals("carbon")) { >+// TabItem [] tabItems = instance.tabFolder.getItems(); >+// for (int i=0; i<tabItems.length; i++) { >+// tabItems[i].setText (instance.tabs [i].getShortTabText ()); >+// } >+// size = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT); >+// } >+// shell.setSize(Math.min(size.x, monitorArea.width), Math.min(size.y, monitorArea.height)); > } > } > >Index: src/org/eclipse/swt/examples/controlexample/Tab.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java,v >retrieving revision 1.79 >diff -u -r1.79 Tab.java >--- src/org/eclipse/swt/examples/controlexample/Tab.java 29 May 2008 18:46:47 -0000 1.79 >+++ src/org/eclipse/swt/examples/controlexample/Tab.java 10 Sep 2008 20:00:58 -0000 >@@ -44,7 +44,7 @@ > Button preferredButton, tooSmallButton, smallButton, largeButton, fillHButton, fillVButton; > > /* Common groups and composites */ >- Composite tabFolderPage; >+ Composite pageComposite; > Group exampleGroup, controlGroup, listenersGroup, otherGroup, sizeGroup, styleGroup, colorGroup, backgroundModeGroup; > > /* Controlling instance */ >@@ -231,7 +231,7 @@ > * right half of each example tab. It consists of the > * "Style" group, the "Other" group and the "Size" group. > */ >- controlGroup = new Group (tabFolderPage, SWT.NONE); >+ controlGroup = new Group (pageComposite, SWT.NONE); > controlGroup.setLayout (new GridLayout (2, true)); > controlGroup.setLayoutData (new GridData(SWT.FILL, SWT.FILL, false, false)); > controlGroup.setText (ControlExample.getResourceString("Parameters")); >@@ -762,7 +762,7 @@ > * is typically the left hand column in the tab. > */ > void createExampleGroup () { >- exampleGroup = new Group (tabFolderPage, SWT.NONE); >+ exampleGroup = new Group (pageComposite, SWT.NONE); > exampleGroup.setLayout (new GridLayout ()); > exampleGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); > } >@@ -901,7 +901,7 @@ > * goes below the "Example" and "Control" groups. > */ > void createListenersGroup () { >- listenersGroup = new Group (tabFolderPage, SWT.NONE); >+ listenersGroup = new Group (pageComposite, SWT.NONE); > listenersGroup.setLayout (new GridLayout (3, false)); > listenersGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true, 2, 1)); > listenersGroup.setText (ControlExample.getResourceString ("Listeners")); >@@ -1238,30 +1238,32 @@ > * @param tabFolder org.eclipse.swt.widgets.TabFolder > * @return the new page for the tab folder > */ >- Composite createTabFolderPage (TabFolder tabFolder) { >- /* Cache the shell and display. */ >- shell = tabFolder.getShell (); >- display = shell.getDisplay (); >- >- /* Create a two column page. */ >- tabFolderPage = new Composite (tabFolder, SWT.NONE); >- tabFolderPage.setLayout (new GridLayout (2, false)); >- >- /* Create the "Example" and "Control" groups. */ >- createExampleGroup (); >- createControlGroup (); >- >- /* Create the "Listeners" group under the "Control" group. */ >- createListenersGroup (); >- >- /* Create and initialize the example and control widgets. */ >- createExampleWidgets (); >- hookExampleWidgetListeners (); >- createControlWidgets (); >- createBackgroundModeGroup (); >- setExampleWidgetState (); >+ Composite createPageComposite(Composite parent) { >+ if (pageComposite == null) { >+ /* Cache the shell and display. */ >+ shell = parent.getShell (); >+ display = shell.getDisplay (); >+ >+ /* Create a two column page. */ >+ pageComposite = new Composite (parent, SWT.NONE); >+ pageComposite.setLayout (new GridLayout (2, false)); >+ >+ /* Create the "Example" and "Control" groups. */ >+ createExampleGroup (); >+ createControlGroup (); >+ >+ /* Create the "Listeners" group under the "Control" group. */ >+ createListenersGroup (); >+ >+ /* Create and initialize the example and control widgets. */ >+ createExampleWidgets (); >+ hookExampleWidgetListeners (); >+ createControlWidgets (); >+ createBackgroundModeGroup (); >+ setExampleWidgetState (); >+ } > >- return tabFolderPage; >+ return pageComposite; > } > > void setExampleWidgetPopupMenu() { >@@ -1734,7 +1736,7 @@ > gridData.verticalAlignment = fillVButton.getSelection() ? SWT.FILL : SWT.TOP; > controls [i].setLayoutData (gridData); > } >- tabFolderPage.layout (controls); >+ pageComposite.layout (controls); > } > > /** >@@ -1806,4 +1808,11 @@ > } > return result; > } >+ >+ /** >+ * This is called by the parent view when the tab is activated. >+ */ >+ public void activated() { >+ // default implementation does nothing >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 242163
:
108494
|
108691
| 112243 |
151643