Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] ravikanth,chatura pls can u clarify my doubt


See boss ,,

you need to override another method called init();;

just check out , you missed out something either constructor or something in init,, etc...




"Steven Sequeira" <ssequeira@xxxxxxxxx>
Sent by: pde-dev-admin@xxxxxxxxxxx

05/28/04 03:44 PM

Please respond to
pde-dev@xxxxxxxxxxx

To
<pde-dev@xxxxxxxxxxx>
cc
Subject
[pde-dev] ravikanth,chatura pls can u clarify my doubt





I did as according to ur suggestions,but iam getting error "class cant be instantiated".wat i shld do.Is it necessry to create a file as in helloworld(autocode wizard)which extends from AbstractUIPplugin and has some resource bundle descriptions in my package org.eclipse.login.
----- Original Message -----
From: ravikanth.bhamidipati@xxxxxxx
To: pde-dev@xxxxxxxxxxx
Sent: Friday, May 28, 2004 9:52 AM
Subject: Re: [pde-dev] chatura pls can u clarify my doubt


Hi Steven,,


               I hope your problem is trivial,, just seee, you want a tool bar icon,, something which opens the dialog box right,, if i am right in understanding your problem,,


then just you might have extended  "actionsets" extension points,, or some other extension point.. in which you have to specify the attribute <class name="xyz"> in which you will have "xyz" file implements IWorkbenchWindowActionDelegate  in which you will have a method  "run()" from IActiondelgate which has to be implemented and inthis you write your code appropriately,,,


so that by clicking in you button in tool bar ,, this code will run and let you display the contents you coded... No need to have static main method ,, as the code in run will be executed,, so write contents of your main class in this run method,,,


Hope i am clear as far as my understanding.....


all the best

Cheerss...

Rk



"Steven Sequeira" <ssequeira@xxxxxxxxx>
Sent by: pde-dev-admin@xxxxxxxxxxx

05/27/04 06:43 PM

Please respond to
pde-dev@xxxxxxxxxxx


To
<pde-dev@xxxxxxxxxxx>
cc
Subject
[pde-dev] chatura pls can u clarify my doubt







Chatura,is it necessary to create another class file like Sampleaction in
helloworld example.But problem is i have public static void main(...) in my
Main class,wheras helloworld example has no public static void main(..)
class.Now how do i link swt main program to plugin.xml.



----- Original Message -----
From: "Chatura Gunawardana" <chatura@xxxxxxxxxxxxx>
To: <pde-dev@xxxxxxxxxxx>
Sent: Wednesday, May 26, 2004 9:29 AM
Subject: [pde-dev] Re: pde-dev digest, Vol 1 #148 - 1 msg


> Hi Steven,
>
>  Create the plug-in by using org.eclipse.ui.actionSet.
>  There is a exaple in Eclipse Help, PDE Guide.
>
>  Then Edit the plugin.xml file as follows:
>
>  - Change "action" element property called "toolbarPath"
>  Sample code:
>          <action
>                label="&amp;Web Servise"
>                icon="icon/sample.jpg"
>                class="org.apache.axis.wsdl.wsdl2ws.WSDL2WsGUI"
>                toolbarPath="asa"  //Give any name as value
>                id="com.example.wsdl2ws.action1">
>          </action>
>
> Chatura Gunawardana
> (Sri Lanka)
>
>
> > 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. To make login window as a plugin,pls reply (Steven Sequeira)
> >
> > --__--__--
> >
> > Message: 1
> > From: "Steven Sequeira" <ssequeira@xxxxxxxxx>
> > To: "swt list" <platform-swt-dev@xxxxxxxxxxx>,
> > "eclipse plugin" <pde-dev@xxxxxxxxxxx>,
> > <platform-swt-dev-request@xxxxxxxxxxx>
> > Date: Tue, 25 May 2004 20:06:08 +0530
> > Subject: [pde-dev] To make login window as a plugin,pls reply
> > Reply-To: pde-dev@xxxxxxxxxxx
> >
> > This is a multi-part message in MIME format.
> >
> > ------=_NextPart_000_002D_01C44293.B807EF50
> > Content-Type: text/plain;
> > charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > Hi all, I have a login window that has simple user id and password field
=
> > with corresponding text boxes implementesd in pure swt.Now i want to put
=
> > it as a plugin(toolbar button) so that on pressing it i will get the =
> > login window.I just want to explore these things ,as iam new to eclipse
=
> > plugin progrraming
> >
> >     My code has 3 classes
> > 1.Login class,that has get,set methods for fields userid,password,button
=
> > pressed
> > 2.Logindialog class that will display a window.
> > 3.Main class.
> >
> > 1. public class Login {
> >    String id;
> >  String password;
> >  boolean buttonResponse;
> >
> > public Login(){}
> >
> > public boolean getButtonResponse() {
> >
> > return buttonResponse;}
> >
> > public void setButtonResponse(boolean b){
> >
> > buttonResponse =3D b;}
> >
> > public String getID()
> >
> > {return id;}
> >
> > public void setID(String id){
> >
> > this.id =3D id;}
> >
> > public String getPassword(){
> >
> > return password;}
> >
> > public void setPassword(String password){
> >
> > this.password =3D password;}}
> >
> > 2.
> > import org.eclipse.swt.SWT;
> > import org.eclipse.swt.widgets.*;i
> > import org.eclipse.swt.graphics.*;
> >
> > public class Logindialog extends Dialog {
> > private Text idText;
> >
> > private Text passwordText;
> >
> > private Button btnOK;
> >
> > private Button btnCancel;
> >
> > private Login login;
> >
> >
> > Logindialog(Shell arg0) {super(arg0);}
> >
> > public Login open(){
> >
> > login =3D new Login();
> >
> > final Shell shell =3D new Shell(getParent(),SWT.DIALOG_TRIM | =
> > SWT.APPLICATION_MODAL);
> >
> > shell.setText(getText());shell.setSize(400,200);Label label1 =3D new =
> > Label(shell,SWT.NONE);
> >
> > label1.setSize(400,50);label1.setLocation(0,0);
> >
> > label1.setAlignment(SWT.CENTER);label1.setText("\nWelcome to my program.
=
> > \n please login");
> >
> > label1.setBackground(new Color(shell.getDisplay(),255,255,255));
> >
> >
> > Label label2 =3D new Label(shell,SWT.NONE);label2.setSize(70,10);
> >
> > label2.setLocation(20,63);label2.setAlignment(SWT.RIGHT);=20
> >
> > label2.setText("ID :");idText =3D new Text(shell,SWT.BORDER);
> >
> > idText.setTextLimit(30);idText.setBounds(100,60,200,20);
> >
> >
> > Label label3 =3D new Label(shell,SWT.NONE);label3.setSize(70,10);
> >
> > label3.setLocation(20,93);label3.setAlignment(SWT.RIGHT);=20
> >
> > label3.setText("Password :");passwordText =3D new =
> > Text(shell,SWT.BORDER);
> >
> > passwordText.setTextLimit(30);passwordText.setBounds(100,90,200,20);
> >
> > passwordText.setEchoChar('*');btnOK =3D new Button(shell,SWT.PUSH);
> >
> > btnOK.setText("Login");btnOK.setLocation(110,130);
> >
> > btnOK.setSize(80,20);btnCancel =3D new Button(shell,SWT.PUSH);
> >
> > btnCancel.setText("Cancel");btnCancel.setLocation(210,130);
> >
> > btnCancel.setSize(80,20);=20
> >
> >
> > Listener listener =3D new Listener(){
> >
> > public void handleEvent(Event event){
> >
> > login.setButtonResponse(event.widget=3D=3DbtnOK);
> >
> > login.setID(idText.getText());
> >
> > login.setPassword(passwordText.getText());shell.close();}};
> >
> > btnOK.addListener(SWT.Selection,listener);
> >
> > btnCancel.addListener(SWT.Selection,listener);
> >
> > Display display =3D getParent().getDisplay();
> >
> > Rectangle rect =3D display.getBounds();
> >
> > int mx =3D rect.width/2;
> >
> > int my =3D rect.height/2;
> >
> > shell.setLocation(mx-200,my-100);
> >
> > shell.open();
> >
> >
> > while(!shell.isDisposed()){
> >
> > if(!display.readAndDispatch()) display.sleep();
> >
> > }
> >
> > return login;
> >
> > }
> >
> > }
> >
> > 3.Main class
> > import org.eclipse.swt.SWT;import org.eclipse.swt.widgets.*;import =
> > org.eclipse.swt.graphics.*;
> >
> > public class Main {
> >
> > public static void main(String args[]){
> >
> > Display display=3D new Display();
> >
> > final Shell sh =3D new Shell(display);
> >
> > Logindialog dialog =3D new Logindialog(sh);Login login =3D =
> > dialog.open();
> >
> > MessageBox msg =3D new MessageBox(sh,SWT.OK);
> >
> > if(login.getButtonResponse()) {
> >
> > msg.setMessage("Your id is:"+login.getID()+"\nYour Password is =
> > :"+login.getPassword());
> >
> > msg.open();
> >
> >
> > while(!sh.isDisposed()) {
> >
> > if(!display.readAndDispatch()) display.sleep();
> >
> > }}
> >
> > display.dispose(); }}
> >
> >
> > Regards,
> > Steven Sequeira
> >
> > ------=_NextPart_000_002D_01C44293.B807EF50
> > Content-Type: text/html;
> > charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > <HTML><HEAD>
> > <META http-equiv=3DContent-Type content=3D"text/html; =
> > charset=3Diso-8859-1">
> > <META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
> > <STYLE></STYLE>
> > </HEAD>
> > <BODY bgColor=3D#ffffff>
> > <DIV><FONT face=3DArial size=3D2>Hi all, I have a login window that has
=
> > simple user=20
> > id and password field with corresponding text boxes implementesd in pure
=
> > swt.Now=20
> > i want to put it as a plugin(toolbar button) so that on pressing it i =
> > will get=20
> > the login window.I just want to explore these things ,as iam new to =
> > eclipse=20
> > plugin progrraming</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> > <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; My code has 3=20
> > classes</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2>1.Login class,that has get,set methods
=
> > for fields=20
> > userid,password,button pressed</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2>2.Logindialog class that will display a
=
> >
> > window.</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2>3.Main class.</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> > <DIV><FONT face=3DArial size=3D2>1. <B><FONT color=3D#7f0055=20
> > size=3D2>public</B></FONT><FONT size=3D2> </FONT><B><FONT =
> > color=3D#7f0055=20
> > size=3D2>class</B></FONT><FONT size=3D2> Login {</FONT></FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2><FONT size=3D2>&nbsp;&nbsp; String=20
> > id;</FONT></FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2><FONT size=3D2>&nbsp;String=20
> > password;</FONT></FONT></DIV>
> > <DIV><FONT face=3DArial><FONT size=3D2>&nbsp;<B><FONT=20
> > color=3D#7f0055>boolean</B></FONT></FONT><FONT size=3D2>=20
> > buttonResponse;</FONT></DIV>
> > <P><FONT size=3D2></FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>public</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > Login(){}</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>public</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > <B><FONT color=3D#7f0055>boolean</B></FONT></FONT><FONT size=3D2>=20
> > getButtonResponse() {</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>return</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > buttonResponse;}</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>public</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > <B><FONT color=3D#7f0055>void</B></FONT></FONT><FONT size=3D2>=20
> > setButtonResponse(<B><FONT =
> > color=3D#7f0055>boolean</B></FONT></FONT><FONT size=3D2>=20
> > b){</FONT></P>
> > <P><FONT size=3D2>buttonResponse =3D b;</FONT><FONT =
> > size=3D2>}</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>public</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > String getID()</FONT></P>
> > <P><FONT size=3D2>{<B><FONT =
> > color=3D#7f0055>return</B></FONT></FONT><FONT size=3D2>=20
> > id;</FONT><FONT size=3D2>}</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>public</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > <B><FONT color=3D#7f0055>void</B></FONT></FONT><FONT size=3D2> =
> > setID(String=20
> > id){</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>this</FONT></B></FONT><FONT =
> > size=3D2>.id =3D=20
> > id;</FONT><FONT size=3D2>}</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>public</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > String getPassword(){</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>return</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > password;</FONT><FONT size=3D2>}</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT size=3D2>public</FONT></B></FONT><FONT
=
> > size=3D2>=20
> > <B><FONT color=3D#7f0055>void</B></FONT></FONT><FONT size=3D2> =
> > setPassword(String=20
> > password){</FONT></P>
> > <P><B><FONT color=3D#7f0055><FONT
size=3D2>this</FONT></B></FONT><FONT=20
> > size=3D2>.password =3D password;}}</FONT></P></FONT>
> > <DIV><FONT face=3DArial size=3D2>2.</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2><B><FONT color=3D#7f0055=20
> > size=3D2>import</B></FONT><FONT size=3D2> =
> > org.eclipse.swt.SWT;</FONT></FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2><B><FONT color=3D#7f0055=20
> > size=3D2>import</B></FONT><FONT size=3D2>=20
> > org.eclipse.swt.widgets.*;i</FONT></FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2>i<B><FONT color=3D#7f0055=20
> > size=3D2>mport</B></FONT><FONT size=3D2>=20
> > org.eclipse.swt.graphics.*;</FONT></FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2><B><FONT color=3D#7f0055=20
> > size=3D2></FONT></B></FONT>&nbsp;</DIV>
> > <DIV><FONT face=3DArial size=3D2><B><FONT color=3D#7f0055=20
> > size=3D2>public</B></FONT><FONT size=3D2> </FONT><B><FONT =
> > color=3D#7f0055=20
> > size=3D2>class</B></FONT><FONT size=3D2> Logindialog </FONT><B><FONT =
> > color=3D#7f0055=20
> > size=3D2>extends</B></FONT><FONT size=3D2> Dialog {</DIV>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>private</B></FONT><FONT =
> > size=3D2> Text=20
> > idText;</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>private</B></FONT><FONT =
> > size=3D2> Text=20
> > passwordText;</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>private</B></FONT><FONT =
> > size=3D2> Button=20
> > btnOK;</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>private</B></FONT><FONT =
> > size=3D2> Button=20
> > btnCancel;</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>private</B></FONT><FONT =
> > size=3D2> Login=20
> > login;</P>
> > <P></P>
> > <P>Logindialog(Shell arg0) {</FONT><B><FONT color=3D#7f0055=20
> > size=3D2>super</B></FONT><FONT size=3D2>(arg0);}</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>public</B></FONT><FONT =
> > size=3D2> Login=20
> > open(){</FONT></P>
> > <P><FONT size=3D2>login =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Login();</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>final</B></FONT><FONT =
> > size=3D2> Shell=20
> > shell =3D </FONT><B><FONT color=3D#7f0055 size=3D2>new</B></FONT><FONT =
> > size=3D2>=20
> > Shell(getParent(),SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);</P>
> > <P>shell.setText(getText());shell.setSize(400,200);Label label1 =3D=20
> > </FONT><B><FONT color=3D#7f0055 size=3D2>new</B></FONT><FONT
size=3D2>=20
> > Label(shell,SWT.NONE);</P>
> > <P>label1.setSize(400,50);label1.setLocation(0,0);</P>
> > <P>label1.setAlignment(SWT.CENTER);label1.setText(</FONT><FONT =
> > color=3D#2a00ff=20
> > size=3D2>"\nWelcome to my program. \n please login"</FONT><FONT =
> > size=3D2>);</P>
> > <P>label1.setBackground(</FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Color(shell.getDisplay(),255,255,255));</P>
> > <P></P>
> > <P>Label label2 =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Label(shell,SWT.NONE);label2.setSize(70,10);</P>
> > <P>label2.setLocation(20,63);label2.setAlignment(SWT.RIGHT); </P>
> > <P>label2.setText(</FONT><FONT color=3D#2a00ff size=3D2>"ID =
> > :"</FONT><FONT=20
> > size=3D2>);idText =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Text(shell,SWT.BORDER);</P>
> > <P>idText.setTextLimit(30);</FONT><FONT=20
> > size=3D2>idText.setBounds(100,60,200,20);</P>
> > <P></P>
> > <P>Label label3 =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Label(shell,SWT.NONE);label3.setSize(70,10);</P>
> > <P>label3.setLocation(20,93);label3.setAlignment(SWT.RIGHT); </P>
> > <P>label3.setText(</FONT><FONT color=3D#2a00ff size=3D2>"Password =
> > :"</FONT><FONT=20
> > size=3D2>);passwordText =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Text(shell,SWT.BORDER);</P>
> > <P>passwordText.setTextLimit(30);</FONT><FONT=20
> > size=3D2>passwordText.setBounds(100,90,200,20);</P>
> > <P>passwordText.setEchoChar(</FONT><FONT color=3D#2a00ff =
> > size=3D2>'*'</FONT><FONT=20
> > size=3D2>);btnOK =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Button(shell,SWT.PUSH);</P>
> > <P>btnOK.setText(</FONT><FONT color=3D#2a00ff =
> > size=3D2>"Login"</FONT><FONT=20
> > size=3D2>);btnOK.setLocation(110,130);</P>
> > <P>btnOK.setSize(80,20);btnCancel =3D </FONT><B><FONT color=3D#7f0055=20
> > size=3D2>new</B></FONT><FONT size=3D2> =
> > Button(shell,SWT.PUSH);</FONT></P>
> > <P><FONT size=3D2>btnCancel.setText(</FONT><FONT color=3D#2a00ff=20
> > size=3D2>"Cancel"</FONT><FONT =
> > size=3D2>);btnCancel.setLocation(210,130);</P>
> > <P>btnCancel.setSize(80,20); </P>
> > <P></P>
> > <P>Listener listener =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Listener(){</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>public</B></FONT><FONT =
> > size=3D2>=20
> > </FONT><B><FONT color=3D#7f0055 size=3D2>void</B></FONT><FONT
size=3D2>=20
> > handleEvent(Event event){</P>
> > <P>login.setButtonResponse(event.widget=3D=3DbtnOK);</P>
> > <P>login.setID(idText.getText());</P>
> > <P>login.setPassword(passwordText.getText());shell.close();}};</P>
> > <P>btnOK.addListener(SWT.Selection,listener);</P>
> > <P>btnCancel.addListener(SWT.Selection,listener);</P>
> > <P>Display display =3D getParent().getDisplay();</P>
> > <P>Rectangle rect =3D display.getBounds();</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>int</B></FONT><FONT =
> > size=3D2> mx =3D=20
> > rect.width/2;</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>int</B></FONT><FONT =
> > size=3D2> my =3D=20
> > rect.height/2;</P>
> > <P>shell.setLocation(mx-200,my-100);</P>
> > <P>shell.open();</P>
> > <P></P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>while</B></FONT><FONT=20
> > size=3D2>(!shell.isDisposed()){</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>if</B></FONT><FONT=20
> > size=3D2>(!display.readAndDispatch()) display.sleep();</P>
> > <P>}</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>return</B></FONT><FONT =
> > size=3D2>=20
> > login;</P>
> > <P>}</P>
> > <P>}</P></FONT></FONT>
> > <DIV><FONT face=3DArial size=3D2>3.Main class</FONT></DIV>
> > <DIV><B><FONT color=3D#7f0055 size=3D2>
> > <P>import</B></FONT><FONT size=3D2>
org.eclipse.swt.SWT;</FONT><B><FONT=20
> > color=3D#7f0055 size=3D2>import</B></FONT><FONT size=3D2>=20
> > org.eclipse.swt.widgets.*;</FONT><B><FONT color=3D#7f0055=20
> > size=3D2>import</B></FONT><FONT size=3D2>=20
> > org.eclipse.swt.graphics.*;</P></FONT><B><FONT color=3D#7f0055 size=3D2>
> > <P>public</B></FONT><FONT size=3D2> </FONT><B><FONT color=3D#7f0055=20
> > size=3D2>class</B></FONT><FONT size=3D2> Main {</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>public</B></FONT><FONT =
> > size=3D2>=20
> > </FONT><B><FONT color=3D#7f0055 size=3D2>static</B></FONT><FONT =
> > size=3D2>=20
> > </FONT><B><FONT color=3D#7f0055 size=3D2>void</B></FONT><FONT size=3D2>
=
> > main(String=20
> > args[]){</P>
> > <P>Display display=3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Display();</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>final</B></FONT><FONT =
> > size=3D2> Shell sh =3D=20
> > </FONT><B><FONT color=3D#7f0055 size=3D2>new</B></FONT><FONT
size=3D2>=20
> > Shell(display);</P>
> > <P>Logindialog dialog =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> Logindialog(sh);Login login =3D dialog.open();</P>
> > <P>MessageBox msg =3D </FONT><B><FONT color=3D#7f0055 =
> > size=3D2>new</B></FONT><FONT=20
> > size=3D2> MessageBox(sh,SWT.OK);</FONT></P>
> > <P><B><FONT color=3D#7f0055 size=3D2>if</B></FONT><FONT=20
> > size=3D2>(login.getButtonResponse()) {</P>
> > <P>msg.setMessage(</FONT><FONT color=3D#2a00ff size=3D2>"Your id =
> > is:"</FONT><FONT=20
> > size=3D2>+login.getID()+</FONT><FONT color=3D#2a00ff size=3D2>"\nYour =
> > Password is=20
> > :"</FONT><FONT size=3D2>+login.getPassword());</P>
> > <P>msg.open();</P>
> > <P></P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>while</B></FONT><FONT=20
> > size=3D2>(!sh.isDisposed()) {</P>
> > <P></FONT><B><FONT color=3D#7f0055 size=3D2>if</B></FONT><FONT=20
> > size=3D2>(!display.readAndDispatch()) display.sleep();</P>
> > <P>}}</P>
> > <P>display.dispose(); }}</P></FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> > <DIV><FONT face=3DArial size=3D2>Regards,<BR>Steven=20
> > Sequeira<BR></DIV></FONT></BODY></HTML>
> >
> > ------=_NextPart_000_002D_01C44293.B807EF50--
> >
> >
> >
> > --__--__--
> >
> > _______________________________________________
> > 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

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


ForwardSourceID:NT000068E6    

ForwardSourceID:NT0000692E    
DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery
of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. 
Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message 
that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you.


Back to the top