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 205069 Details for
Bug 332575
Build up new reference documentation for Draw2d, GEF, and Zest in the GEF wiki
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Patch for column issue.
patch.txt (text/plain), 1.98 KB, created by
Miles Parker
on 2011-10-12 16:55:57 EDT
(
hide
)
Description:
Patch for column issue.
Filename:
MIME Type:
Creator:
Miles Parker
Created:
2011-10-12 16:55:57 EDT
Size:
1.98 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.draw2d.examples >Index: src/org/eclipse/draw2d/examples/layouts/GridLayoutExample.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/examples/org.eclipse.draw2d.examples/src/org/eclipse/draw2d/examples/layouts/GridLayoutExample.java,v >retrieving revision 1.2 >diff -u -r1.2 GridLayoutExample.java >--- src/org/eclipse/draw2d/examples/layouts/GridLayoutExample.java 22 Dec 2010 18:01:18 -0000 1.2 >+++ src/org/eclipse/draw2d/examples/layouts/GridLayoutExample.java 12 Oct 2011 20:53:30 -0000 >@@ -25,6 +25,8 @@ > import org.eclipse.draw2d.Triangle; > import org.eclipse.draw2d.examples.AbstractExample; > import org.eclipse.swt.SWT; >+import org.eclipse.swt.events.FocusEvent; >+import org.eclipse.swt.events.FocusListener; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.graphics.Color; >@@ -84,7 +86,7 @@ > container.setBorder(new LineBorder()); > > gridLayout = new GridLayout(); >- gridLayout.numColumns = 2; >+ gridLayout.numColumns = 3; > gridLayout.makeColumnsEqualWidth = false; > > container.setLayoutManager(gridLayout); >@@ -194,14 +196,18 @@ > _data = new org.eclipse.swt.layout.GridData( > org.eclipse.swt.layout.GridData.VERTICAL_ALIGN_FILL); > columnsGroup.setLayoutData(_data); >- Text numColumns = new Text(columnsGroup, SWT.BORDER); >+ final Text numColumns = new Text(columnsGroup, SWT.BORDER); > numColumns.setText("2"); >- numColumns.addListener(SWT.DefaultSelection, new Listener() { >- public void handleEvent(Event e) { >- gridLayout.numColumns = getEventValue(e, "numColumns") >+ numColumns.addFocusListener(new FocusListener() { >+ >+ public void focusLost(FocusEvent e) { >+ gridLayout.numColumns = Integer.valueOf(numColumns.getText()) > .intValue(); > updateView(); > } >+ >+ public void focusGained(FocusEvent e) { >+ } > }); > _data = new org.eclipse.swt.layout.GridData(); > _data.widthHint = 15;
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 Raw
Actions:
View
Attachments on
bug 332575
: 205069