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 164665 Details for
Bug 16552
[Dialogs] Title Area dialog should support > 2 lines text
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Dialog to test
MyTitleAreaDialog.java (text/plain), 2.45 KB, created by
Prakash Rangaraj
on 2010-04-13 03:20:04 EDT
(
hide
)
Description:
Dialog to test
Filename:
MIME Type:
Creator:
Prakash Rangaraj
Created:
2010-04-13 03:20:04 EDT
Size:
2.45 KB
patch
obsolete
>package org.eclipse.bugs.dialogscroll; > >import org.eclipse.jface.dialogs.TitleAreaDialog; >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.SelectionAdapter; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Control; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class MyTitleAreaDialog extends TitleAreaDialog { > > public MyTitleAreaDialog() { > super(new Shell()); > setShellStyle(SWT.SHELL_TRIM); > } > > @Override > protected void configureShell(Shell newShell) { > super.configureShell(newShell); > } > > > @Override > protected Control createDialogArea(Composite parent) { > Composite composite = (Composite) super.createDialogArea(parent); > > final String smallMessage = "This is a small message, just to see stuff."; > final String message = "This is a very very long message, that should make the title area to scroll, as it cannot be contained inside the normal title area dialog. Well it seems that I might be wrong, so I need a much more larger text to make this happen. That is why I'm typing in all this junk here."; > > Button smallMessageButton = new Button(parent, SWT.PUSH); > smallMessageButton.setText("Small Message"); > smallMessageButton.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > setMessage(smallMessage); > } > }); > > Button normalMessageButton = new Button(parent, SWT.PUSH); > normalMessageButton.setText("Set Message"); > normalMessageButton.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > setMessage(message); > } > }); > > > Button errorMessageButton = new Button(parent, SWT.PUSH); > errorMessageButton.setText("Set Error Message"); > errorMessageButton.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > setErrorMessage(message); > } > }); > > > Button clearButton = new Button(parent, SWT.PUSH); > clearButton.setText("Clear"); > clearButton.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > setErrorMessage(null); > setMessage(null); > } > }); > > return composite; > } > > public static void main(String[] args) { > > Display display = new Display(); > > MyTitleAreaDialog dialog = new MyTitleAreaDialog(); > dialog.open(); > > display.dispose(); > } > > >}
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 16552
:
164664
| 164665 |
165695
|
165979
|
165980
|
166041
|
167724
|
168074
|
168154
|
168272