[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.ve] Re: how to implement it by using VE/ SWT?

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@xxxxxxx> ??????:dd6p24$evi$1@xxxxxxxxxxxxxxxxxxx

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/executable-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-)