Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] RE:Shell and Composite ??

Or if your class is extending a WizardPage you can just go this.getShell() 
for example:

        public void createControl(Composite parent) {
                Composite container = new Composite(parent, SWT.NULL);
                GridLayout layout = new GridLayout();
                container.setLayout(layout);
                layout.numColumns = 3;
                layout.verticalSpacing = 9;
                Label label = new Label(container, SWT.NULL);
                label.setText("JDBC Driver &Path:");

                driverFileText = new Text(container, SWT.BORDER | 
SWT.SINGLE);
                gd = new GridData(GridData.FILL_HORIZONTAL);
                driverFileText.setLayoutData(gd);
                driverFileText.addModifyListener(new ModifyListener() {
                        public void modifyText(ModifyEvent e) {
                                dialogChanged();
                        }
                });

                Button button = new Button(container, SWT.PUSH);
                button.setText("Browse...");
                button.addSelectionListener(new SelectionAdapter() {
                        public void widgetSelected(SelectionEvent e) {
                                handleFileBrowse();
                        }
                });
        ....
        }

        private void handleFileBrowse() {
                FileDialog dialog = new FileDialog(this.getShell());
                String path = dialog.open();
                if (path != null) {
                        driverFileText.setText(path);
                }
        }

Cheers,
Paul

----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.
----------------------------------------------------------------------------------------





"Mike Evans, Incremental Ltd." <mike.evans@xxxxxxxxxxxxxxxxxx>
Sent by: pde-dev-admin@xxxxxxxxxxx
07/07/2004 08:06 PM
Please respond to pde-dev

 
        To:     <pde-dev@xxxxxxxxxxx>, <hemant_kumar_jaggi@xxxxxxxxx>
        cc: 
        Subject:        [pde-dev] RE:Shell and Composite ??


Hemant,

You can access the current shell via :

Display.getCurrent().getActiveShell()

Useful, if inelegant.

Mike E.

-----Original Message-----
From: pde-dev-admin@xxxxxxxxxxx [mailto:pde-dev-admin@xxxxxxxxxxx] On 
Behalf
Of pde-dev-request@xxxxxxxxxxx
Sent: 06 July 2004 17:00
To: pde-dev@xxxxxxxxxxx
Subject: pde-dev digest, Vol 1 #176 - 2 msgs

Send pde-dev mailing list submissions to
pde-dev@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://dev.eclipse.org/mailman/listinfo/pde-dev
or, via email, send a message with subject or body 'help' to
pde-dev-request@xxxxxxxxxxx

You can reach the person managing the list at
pde-dev-admin@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific than
"Re: Contents of pde-dev digest..."


Today's Topics:

1. Problems with running ImageJ (Christopher Coulon)
2. Shell and Composite ?? (Hemant Jaggi)

--__--__--

Message: 1
Date: Mon, 05 Jul 2004 16:24:34 -0700
From: Christopher Coulon <ad1054@xxxxxxxxxxx>
To: <pde-dev@xxxxxxxxxxx>
Subject: [pde-dev] Problems with running ImageJ
Reply-To: pde-dev@xxxxxxxxxxx

> This message is in MIME format. Since your mail reader does not
> understand
this format, some or all of this message may not be legible.

--B_3171889475_361096
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

I have been developing plugins for ImageJ using Eclipse for many months 
now=
, but today I started getting an error that I can=B9t seem to get around.
Normally I click on the run icon in the Eclipse Platform and an instance 
of
ImageJ opens and allows me to test my code.  But now I get an Errors 
Runnin=
g Jobs window and the first line states:

ERROR: Launch: Cannot connect to VM

Followed by many identical lines of:

ERROR: Launch: Launch configuration ImageJ references non-existing project
Ctumor_1a.

Can anyone help me resolve this?  Thanks in advance!

Chris Coulon=20
=20

The GAIA Group
Global Automated Image Analysis
http://www.theGAIAgroup.net
GAIA@xxxxxxxxxxxxxxxx


We welcome image analysis problems in all fields.

Christopher Coulon, Ph.D., Founder
Chris@xxxxxxxxxxxxxxxx
415 515-3379





--B_3171889475_361096
Content-type: text/html; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Problems with running ImageJ</TITLE> </HEAD> <BODY> <FONT
FACE=3D"Verdana"><SPAN STYLE=3D'font-size:12.0px'>I have been developing =
plugins for ImageJ using Eclipse for many months now, but today I started
ge= tting an error that I can&#8217;t seem to get around.
&nbsp;&nbsp;Normally I=  click on the run icon in the Eclipse Platform and
an instance of ImageJ ope= ns and allows me to test my code. &nbsp;But now 
I
get an Errors Running Jobs=  window and the first line states:<BR> <BR>
ERROR: Launch: Cannot connect to VM<BR>
<BR>
Followed by many identical lines of:<BR> <BR>
ERROR: Launch: Launch configuration ImageJ references non-existing project 
=
Ctumor_1a.<BR> <BR> Can anyone help me resolve this? &nbsp;Thanks in
advance!<BR> <BR> Chris Coulon </SPAN></FONT> <P ALIGN=3DCENTER> <FONT
FACE=3D"Verdana"><SPAN STYLE=3D'font-size:12.0px'> &nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;<BR> <HR ALIGN=3DCENTER SIZE=3D"3" WIDTH=3D"95%"><B>The GAIA
Group<BR> G</B>lobal <B>A</B>utomated <B>I</B>mage <B>A</B>nalysis<BR> <a
href=3D"http://www.theGAIAgroup.net";>http://www.theGAIAgroup.net</a><BR>
GAIA@xxxxxxxxxxxxxxxx<BR>
<BR>
<BR>
We welcome image analysis problems in all fields.<BR> <BR> Christopher
Coulon, Ph.D., Founder<BR> Chris@xxxxxxxxxxxxxxxx<BR>
415 515-3379<BR>
<HR ALIGN=3DCENTER SIZE=3D"3" WIDTH=3D"95%"> </SPAN></FONT> <P> <FONT
FACE=3D"Verdana"><SPAN STYLE=3D'font-size:12.0px'><BR> </SPAN></FONT>
</BODY> </HTML>


--B_3171889475_361096--


--__--__--

Message: 2
Date: Tue, 6 Jul 2004 00:03:47 -0700 (PDT)
From: Hemant Jaggi <hemant_kumar_jaggi@xxxxxxxxx>
To: pde <pde-dev@xxxxxxxxxxx>
Subject: [pde-dev] Shell and Composite ??
Reply-To: pde-dev@xxxxxxxxxxx

Hi

I want to use FileDialog SWT component in a wizard page's createControl
function. Now my problem is FileDialog constructor takes input as "Shell"
and I create my wizard page using Composite (i.e. input to createControl
function). I donot have any instance of Shell in createControl function, 
all
the components in that page will be laid on top of Composite.

**********
public void createControl(Composite parent) { Composite composite =  new
Composite(parent, SWT.NULL);

**********

Is there any way I could use FileDialog with Composite, instead of using 
it
with Shell. I mean can there be a work-around for this ? Any inputs will 
be
appreciated.

Regards
Hemant




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail


--__--__--

_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/pde-dev


End of pde-dev Digest



_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/pde-dev




Back to the top