Skip to main content



      Home
Home » Archived » Visual Editor (VE) » how to implement it by using VE/ SWT?
how to implement it by using VE/ SWT? [message #101463] Sun, 07 August 2005 19:55 Go to next message
Eclipse UserFriend
Originally posted by: qingxing20052.gmail.com

Hello,

I have two questions, and am looking forward to hearing from you. :0)

1. How to implement this scenario by using SWT/VE?

Scenario:
There is one button on the shell. When mouse points to this button (not
click), there is one small block that shows the functionality of the button.
It seems like Winword. When you point to button save, there is one small
hint which shows the functionality of this button "save".

Can you give me some suggestions or links for such example?
I know I have to use mouse event, but how about functionality hint (small
white block)?

2. It may be related about Java IO. But I couldn't find right place to ask
this question. So I hope that you can help me a little. Even some hints are
also welcome.

Scenario:
There is one button. Once you click on it, one JAR file program is involved.

I can do it by invoking *.exe program. But I couldn't find the way of
invoking JAR file. How can I implement this scenario in JAVA io? Or only exe
file is ok?

Thx for your time and help.

Have a nice day,
Re: how to implement it by using VE/ SWT? [message #101481 is a reply to message #101463] Mon, 08 August 2005 01:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: weconsul.ptd.net

eclipse.newcomer wrote:
> Hello,
>
> I have two questions, and am looking forward to hearing from you. :0)
>
> 1. How to implement this scenario by using SWT/VE?
>
> Scenario:
> There is one button on the shell. When mouse points to this button (not
> click), there is one small block that shows the functionality of the button.
> It seems like Winword. When you point to button save, there is one small
> hint which shows the functionality of this button "save".
>
> Can you give me some suggestions or links for such example?
> I know I have to use mouse event, but how about functionality hint (small
> white block)?
>
> 2. It may be related about Java IO. But I couldn't find right place to ask
> this question. So I hope that you can help me a little. Even some hints are
> also welcome.
>
> Scenario:
> There is one button. Once you click on it, one JAR file program is involved.
>
> I can do it by invoking *.exe program. But I couldn't find the way of
> invoking JAR file. How can I implement this scenario in JAVA io? Or only exe
> file is ok?
>
> Thx for your time and help.
>
> Have a nice day,
>
>
>
1 - For the button tool tip..

// Set tool tip text
button.setToolTipText("tool tip text");

http://javaalmanac.com/egs/javax.swing/tooltip_ToolTip.html

2 - If I understand situation

java -classpath ..\path to jar file\target.jar package.target.class

or

http://www.cis.upenn.edu/~matuszek/cit597-2002/Pages/executa ble-jar-files.html
--


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
____________________________________________________________ ______________

' If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Re: how to implement it by using VE/ SWT? [message #101507 is a reply to message #101481] Mon, 08 August 2005 11:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: qingxing20052.gmail.com

Hi, IchBin:

Thanks for your suggestion and links.

I still have following quesitons:

1. If I want to keep the tool tip showing as long as the cursor is in the
component, can I do it in SWT?

In Swing, it is easy to do it:
Set ToolTipManager the Max number value.

But SWT doesn't support such method.

How to solve this problem?

2. I am a little sorry that I can't follow you for the suggestion.

From the links, I know the method about how to make executable jar file.
Thx!!!

But my case is following:
I have already had one JAR-file (executable JAR file: A.jar), and I want to
creat one UI which only contains one button that will be involved A.jar file
when the button is pressed. So I think that I need to use key event. But
what shall I write in it? I find the way for exe file, but no for the JAR
file yet. So it is my obstacle.

I am looking forward to hearing from you.

Any suggestion and answer are helpful!!

Thx. :0)





"IchBin" <weconsul@ptd.net> ??????:dd6p24$evi$1@news.eclipse.org...
> eclipse.newcomer wrote:
> > Hello,
> >
> > I have two questions, and am looking forward to hearing from you. :0)
> >
> > 1. How to implement this scenario by using SWT/VE?
> >
> > Scenario:
> > There is one button on the shell. When mouse points to this button (not
> > click), there is one small block that shows the functionality of the
button.
> > It seems like Winword. When you point to button save, there is one small
> > hint which shows the functionality of this button "save".
> >
> > Can you give me some suggestions or links for such example?
> > I know I have to use mouse event, but how about functionality hint
(small
> > white block)?
> >
> > 2. It may be related about Java IO. But I couldn't find right place to
ask
> > this question. So I hope that you can help me a little. Even some hints
are
> > also welcome.
> >
> > Scenario:
> > There is one button. Once you click on it, one JAR file program is
involved.
> >
> > I can do it by invoking *.exe program. But I couldn't find the way of
> > invoking JAR file. How can I implement this scenario in JAVA io? Or only
exe
> > file is ok?
> >
> > Thx for your time and help.
> >
> > Have a nice day,
> >
> >
> >
> 1 - For the button tool tip..
>
> // Set tool tip text
> button.setToolTipText("tool tip text");
>
> http://javaalmanac.com/egs/javax.swing/tooltip_ToolTip.html
>
> 2 - If I understand situation
>
> java -classpath ..\path to jar file\target.jar package.target.class
>
> or
>
>
http://www.cis.upenn.edu/~matuszek/cit597-2002/Pages/executa ble-jar-files.ht
ml
> --
>
>
> Thanks in Advance...
> IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
> ____________________________________________________________ ______________
>
> ' If there is one, Knowledge is the "Fountain of Youth"'
> -William E. Taylor, Regular Guy (1952-)
Re: how to implement it by using VE/ SWT? [message #101520 is a reply to message #101507] Mon, 08 August 2005 11:56 Go to previous message
Eclipse UserFriend
Hi,
1. It is native OS (windows/linux) behaviour to have the tooltip go
away after providing the hint. If you would like to override this
behaviour you could add a combination of MouseTrackListener and
MouseMoveListener to create your own tooltip area. MouseTrackListener
has mouseHover(MouseEvent) which is called when hover is to happen. You
could popup a shell with SWT.TOOL style i think to emulate a hover help.
(Please dig through JDT's hover help mechanism for the Java editor -
that hover help stays on till mouse starts moving again etc.)

2. If A.jar is already in your applications classpath, you might be
able to run that by calling main() with whatever arguments you want.
Regards,
Sri.

eclipse.newcomer wrote:
> Hi, IchBin:
>
> Thanks for your suggestion and links.
>
> I still have following quesitons:
>
> 1. If I want to keep the tool tip showing as long as the cursor is in the
> component, can I do it in SWT?
>
> In Swing, it is easy to do it:
> Set ToolTipManager the Max number value.
>
> But SWT doesn't support such method.
>
> How to solve this problem?
>
> 2. I am a little sorry that I can't follow you for the suggestion.
>
> From the links, I know the method about how to make executable jar file.
> Thx!!!
>
> But my case is following:
> I have already had one JAR-file (executable JAR file: A.jar), and I want to
> creat one UI which only contains one button that will be involved A.jar file
> when the button is pressed. So I think that I need to use key event. But
> what shall I write in it? I find the way for exe file, but no for the JAR
> file yet. So it is my obstacle.
>
> I am looking forward to hearing from you.
>
> Any suggestion and answer are helpful!!
>
> Thx. :0)
>
>
>
>
>
> "IchBin" <weconsul@ptd.net> ??????:dd6p24$evi$1@news.eclipse.org...
>
>>eclipse.newcomer wrote:
>>
>>>Hello,
>>>
>>>I have two questions, and am looking forward to hearing from you. :0)
>>>
>>>1. How to implement this scenario by using SWT/VE?
>>>
>>>Scenario:
>>>There is one button on the shell. When mouse points to this button (not
>>>click), there is one small block that shows the functionality of the
>
> button.
>
>>>It seems like Winword. When you point to button save, there is one small
>>>hint which shows the functionality of this button "save".
>>>
>>>Can you give me some suggestions or links for such example?
>>>I know I have to use mouse event, but how about functionality hint
>
> (small
>
>>>white block)?
>>>
>>>2. It may be related about Java IO. But I couldn't find right place to
>
> ask
>
>>>this question. So I hope that you can help me a little. Even some hints
>
> are
>
>>>also welcome.
>>>
>>>Scenario:
>>>There is one button. Once you click on it, one JAR file program is
>
> involved.
>
>>>I can do it by invoking *.exe program. But I couldn't find the way of
>>>invoking JAR file. How can I implement this scenario in JAVA io? Or only
>
> exe
>
>>>file is ok?
>>>
>>>Thx for your time and help.
>>>
>>>Have a nice day,
>>>
>>>
>>>
>>
>>1 - For the button tool tip..
>>
>> // Set tool tip text
>> button.setToolTipText("tool tip text");
>>
>>http://javaalmanac.com/egs/javax.swing/tooltip_ToolTip.html
>>
>>2 - If I understand situation
>>
>>java -classpath ..\path to jar file\target.jar package.target.class
>>
>>or
>>
>>
>
> http://www.cis.upenn.edu/~matuszek/cit597-2002/Pages/executa ble-jar-files.ht
> ml
>
>>--
>>
>>
>>Thanks in Advance...
>>IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
>> ____________________________________________________________ ______________
>>
>>' If there is one, Knowledge is the "Fountain of Youth"'
>>-William E. Taylor, Regular Guy (1952-)
>
>
>
Re: how to implement it by using VE/ SWT? [message #610169 is a reply to message #101463] Mon, 08 August 2005 01:03 Go to previous message
Eclipse UserFriend
eclipse.newcomer wrote:
> Hello,
>
> I have two questions, and am looking forward to hearing from you. :0)
>
> 1. How to implement this scenario by using SWT/VE?
>
> Scenario:
> There is one button on the shell. When mouse points to this button (not
> click), there is one small block that shows the functionality of the button.
> It seems like Winword. When you point to button save, there is one small
> hint which shows the functionality of this button "save".
>
> Can you give me some suggestions or links for such example?
> I know I have to use mouse event, but how about functionality hint (small
> white block)?
>
> 2. It may be related about Java IO. But I couldn't find right place to ask
> this question. So I hope that you can help me a little. Even some hints are
> also welcome.
>
> Scenario:
> There is one button. Once you click on it, one JAR file program is involved.
>
> I can do it by invoking *.exe program. But I couldn't find the way of
> invoking JAR file. How can I implement this scenario in JAVA io? Or only exe
> file is ok?
>
> Thx for your time and help.
>
> Have a nice day,
>
>
>
1 - For the button tool tip..

// Set tool tip text
button.setToolTipText("tool tip text");

http://javaalmanac.com/egs/javax.swing/tooltip_ToolTip.html

2 - If I understand situation

java -classpath ..\path to jar file\target.jar package.target.class

or

http://www.cis.upenn.edu/~matuszek/cit597-2002/Pages/executa ble-jar-files.html
--


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
____________________________________________________________ ______________

' If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Re: how to implement it by using VE/ SWT? [message #610172 is a reply to message #101481] Mon, 08 August 2005 11:39 Go to previous message
Eclipse UserFriend
Originally posted by: qingxing20052.gmail.com

Hi, IchBin:

Thanks for your suggestion and links.

I still have following quesitons:

1. If I want to keep the tool tip showing as long as the cursor is in the
component, can I do it in SWT?

In Swing, it is easy to do it:
Set ToolTipManager the Max number value.

But SWT doesn't support such method.

How to solve this problem?

2. I am a little sorry that I can't follow you for the suggestion.

From the links, I know the method about how to make executable jar file.
Thx!!!

But my case is following:
I have already had one JAR-file (executable JAR file: A.jar), and I want to
creat one UI which only contains one button that will be involved A.jar file
when the button is pressed. So I think that I need to use key event. But
what shall I write in it? I find the way for exe file, but no for the JAR
file yet. So it is my obstacle.

I am looking forward to hearing from you.

Any suggestion and answer are helpful!!

Thx. :0)





"IchBin" <weconsul@ptd.net> ??????:dd6p24$evi$1@news.eclipse.org...
> eclipse.newcomer wrote:
> > Hello,
> >
> > I have two questions, and am looking forward to hearing from you. :0)
> >
> > 1. How to implement this scenario by using SWT/VE?
> >
> > Scenario:
> > There is one button on the shell. When mouse points to this button (not
> > click), there is one small block that shows the functionality of the
button.
> > It seems like Winword. When you point to button save, there is one small
> > hint which shows the functionality of this button "save".
> >
> > Can you give me some suggestions or links for such example?
> > I know I have to use mouse event, but how about functionality hint
(small
> > white block)?
> >
> > 2. It may be related about Java IO. But I couldn't find right place to
ask
> > this question. So I hope that you can help me a little. Even some hints
are
> > also welcome.
> >
> > Scenario:
> > There is one button. Once you click on it, one JAR file program is
involved.
> >
> > I can do it by invoking *.exe program. But I couldn't find the way of
> > invoking JAR file. How can I implement this scenario in JAVA io? Or only
exe
> > file is ok?
> >
> > Thx for your time and help.
> >
> > Have a nice day,
> >
> >
> >
> 1 - For the button tool tip..
>
> // Set tool tip text
> button.setToolTipText("tool tip text");
>
> http://javaalmanac.com/egs/javax.swing/tooltip_ToolTip.html
>
> 2 - If I understand situation
>
> java -classpath ..\path to jar file\target.jar package.target.class
>
> or
>
>
http://www.cis.upenn.edu/~matuszek/cit597-2002/Pages/executa ble-jar-files.ht
ml
> --
>
>
> Thanks in Advance...
> IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
> ____________________________________________________________ ______________
>
> ' If there is one, Knowledge is the "Fountain of Youth"'
> -William E. Taylor, Regular Guy (1952-)
Re: how to implement it by using VE/ SWT? [message #610174 is a reply to message #101507] Mon, 08 August 2005 11:56 Go to previous message
Eclipse UserFriend
Hi,
1. It is native OS (windows/linux) behaviour to have the tooltip go
away after providing the hint. If you would like to override this
behaviour you could add a combination of MouseTrackListener and
MouseMoveListener to create your own tooltip area. MouseTrackListener
has mouseHover(MouseEvent) which is called when hover is to happen. You
could popup a shell with SWT.TOOL style i think to emulate a hover help.
(Please dig through JDT's hover help mechanism for the Java editor -
that hover help stays on till mouse starts moving again etc.)

2. If A.jar is already in your applications classpath, you might be
able to run that by calling main() with whatever arguments you want.
Regards,
Sri.

eclipse.newcomer wrote:
> Hi, IchBin:
>
> Thanks for your suggestion and links.
>
> I still have following quesitons:
>
> 1. If I want to keep the tool tip showing as long as the cursor is in the
> component, can I do it in SWT?
>
> In Swing, it is easy to do it:
> Set ToolTipManager the Max number value.
>
> But SWT doesn't support such method.
>
> How to solve this problem?
>
> 2. I am a little sorry that I can't follow you for the suggestion.
>
> From the links, I know the method about how to make executable jar file.
> Thx!!!
>
> But my case is following:
> I have already had one JAR-file (executable JAR file: A.jar), and I want to
> creat one UI which only contains one button that will be involved A.jar file
> when the button is pressed. So I think that I need to use key event. But
> what shall I write in it? I find the way for exe file, but no for the JAR
> file yet. So it is my obstacle.
>
> I am looking forward to hearing from you.
>
> Any suggestion and answer are helpful!!
>
> Thx. :0)
>
>
>
>
>
> "IchBin" <weconsul@ptd.net> ??????:dd6p24$evi$1@news.eclipse.org...
>
>>eclipse.newcomer wrote:
>>
>>>Hello,
>>>
>>>I have two questions, and am looking forward to hearing from you. :0)
>>>
>>>1. How to implement this scenario by using SWT/VE?
>>>
>>>Scenario:
>>>There is one button on the shell. When mouse points to this button (not
>>>click), there is one small block that shows the functionality of the
>
> button.
>
>>>It seems like Winword. When you point to button save, there is one small
>>>hint which shows the functionality of this button "save".
>>>
>>>Can you give me some suggestions or links for such example?
>>>I know I have to use mouse event, but how about functionality hint
>
> (small
>
>>>white block)?
>>>
>>>2. It may be related about Java IO. But I couldn't find right place to
>
> ask
>
>>>this question. So I hope that you can help me a little. Even some hints
>
> are
>
>>>also welcome.
>>>
>>>Scenario:
>>>There is one button. Once you click on it, one JAR file program is
>
> involved.
>
>>>I can do it by invoking *.exe program. But I couldn't find the way of
>>>invoking JAR file. How can I implement this scenario in JAVA io? Or only
>
> exe
>
>>>file is ok?
>>>
>>>Thx for your time and help.
>>>
>>>Have a nice day,
>>>
>>>
>>>
>>
>>1 - For the button tool tip..
>>
>> // Set tool tip text
>> button.setToolTipText("tool tip text");
>>
>>http://javaalmanac.com/egs/javax.swing/tooltip_ToolTip.html
>>
>>2 - If I understand situation
>>
>>java -classpath ..\path to jar file\target.jar package.target.class
>>
>>or
>>
>>
>
> http://www.cis.upenn.edu/~matuszek/cit597-2002/Pages/executa ble-jar-files.ht
> ml
>
>>--
>>
>>
>>Thanks in Advance...
>>IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com
>> ____________________________________________________________ ______________
>>
>>' If there is one, Knowledge is the "Fountain of Youth"'
>>-William E. Taylor, Regular Guy (1952-)
>
>
>
Previous Topic:how to implement it by using VE/ SWT?
Next Topic:Another NPE and VE won't display my composite after some simple source editing.
Goto Forum:
  


Current Time: Tue Jun 17 20:11:06 EDT 2025

Powered by FUDForum. Page generated in 0.05840 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top