Folder Drop Down

Does anyone know what the name for function clicking on an arrowed folder in the list, and when the arrows turns down, it shows all the contents in that folder?

[167 byte] By [blackmagea] at [2007-11-27 10:43:56]
# 1

a menu tree?

jGardnera at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 2

Whats the best way to create on in Java?

blackmagea at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 3

http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html

jGardnera at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 4

> http://java.sun.com/docs/books/tutorial/uiswing/compon

> ents/tree.html

Swing fascist!

http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/SimpleTree.htm

(note: I'm only half-serious)

edit: Hang on, is this for use on an iPhone?

Message was edited by:

georgemc

georgemca at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 5

> http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Simp

> leTree.htm

Ewwww, that design is so ugly.

blackmagea at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 6

> >

> http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Simp

>

> > leTree.htm

>

> Ewwww, that design is so ugly.

It is what it is - a simple tree example in SWT

georgemca at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 7

> >

> http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Simp

>

> > leTree.htm

>

> Ewwww, that design is so ugly.

George: pwn't. :-D

jGardnera at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 8

> > >

> >

> http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Simp

>

> >

> > > leTree.htm

> >

> > Ewwww, that design is so ugly.

>

> George: pwn't. :-D

I didn't design it!!</defensive>

What's ugly about it that the equivalent in Swing betters?

georgemca at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 9

George: I can sum up a fairly large issue with SWT in one statement from that link you posted:

display.dispose();

jGardnera at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 10

> George: I can sum up a fairly large issue with SWT in

> one statement from that link you posted:

>

> display.dispose();

Why's that an issue?

georgemca at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 11

What's the correct term? Swing Chauvinist? Swingista? Swing Nazi?

BigDaddyLoveHandlesa at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 12

> What's the correct term? Swing Chauvinist? Swingista?

> Swing Nazi?

Nazi? Oh boy.

1. I could very easily call you an "SWT Nazi" for the above, clearly being as narrow-minded as you choose to perceive I am.

2. The argument that the use of swing equates with supporting mass genocide is a childish one at best, and is horribly inaccurate. I did not state that I intended to visit every person that prefers SWT and put them in an oven, for example.Nor do I believe that George is the perfect scapegoat for my country's loss in a war.

3. The best policy is to keep an open mind, and know how to work with both when it comes to that. The question that I was asked was "how do I do that in Java?" My answer does not fail to answer that question, and I left it there.

4. I have no preference, I am merely aware of the advantages and disadvantages associated with one or the other and recommend the use of one when it fits. George then asked me what a disadvantage of SWT was over Swing, and I gave him an answer.

If you feel that you are too childish, too obnoxious, or too stupid to understand the above and wish to continue trolling, feel free to do it on someone else's time.

jGardnera at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 13

No Swing for you!

BigDaddyLoveHandlesa at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 14

> > What's the correct term? Swing Chauvinist?

> Swingista?

> > Swing Nazi?

>

> Nazi? Oh boy.

>

> 1. I could very easily call you an "SWT Nazi" for the

> above, clearly being as narrow-minded as you choose

> to perceive I am.

>

> 2. The argument that the use of swing equates with

> supporting mass genocide is a childish one at best,

> and is horribly inaccurate. I did not state that I

> intended to visit every person that prefers SWT and

> put them in an oven, for example.Nor do I believe

> that George is the perfect scapegoat for my country's

> loss in a war.

>

> 3. The best policy is to keep an open mind, and know

> how to work with both when it comes to that. The

> question that I was asked was "how do I do that in

> Java?" My answer does not fail to answer that

> question, and I left it there.

>

> 4. I have no preference, I am merely aware of the

> advantages and disadvantages associated with one or

> the other and recommend the use of one when it fits.

> George then asked me what a disadvantage of SWT was

> over Swing, and I gave him an answer.

>

> If you feel that you are too childish, too obnoxious,

> or too stupid to understand the above and wish to

> continue trolling, feel free to do it on someone

> else's time.

Good grief, man, calm down! Big Daddy ain't no troll! You've taken him too seriously. Seriously

Hen-knee-weigh, you never did tell me why the dispose() method is an issue. Why is it?

georgemca at 2007-7-28 20:03:40 > top of Java-index,Java Essentials,Java Programming...
# 15

I think we've finally found someone who's never heard of Seinfeld!

I didn't mean to get your dander up, but these Swing-versus-SWT

threads usually degenerate to shouting quickly, so I thought I'd

get in early and define some terms ;-)

BigDaddyLoveHandlesa at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 16

George: I am calm; that was just my long winded retort to make him look stupid and assuage my own ego.

Anyways.

Also, as JRE's garbage collection becomes better, doing it manually not only goes against the language specifications, but whatever efficiency gained by it becomes less and less meaningful to the point where it is either superfluous or, in some cases, less efficient all together.

jGardnera at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 17

> I think we've finally found someone who's never heard

> of Seinfeld!

>

> I didn't mean to get your dander up, but these

> Swing-versus-SWT

> threads usually degenerate to shouting quickly, so I

> thought I'd

> get in early and define some terms ;-)

I am just not a fan of one-line retorts. The day some fat person on the forums offends me is the day I need to step away from the computer for a while :P

jGardnera at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 18

> I think we've finally found someone who's never heard of Seinfeld!

Who is Seinfeld?

KelVarnsona at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 19

> George: I am calm; that was just my long winded

> retort to make him look stupid and assuage my own

> ego.

I think you've just made a mistake. Big Daddy isn't a troll, he's one of the Good Guys ™ :-)

> Anyways.

>

> Also, as JRE's garbage collection becomes better,

> doing it manually not only goes against the language

> specifications, but whatever efficiency gained by it

> becomes less and less meaningful to the point where

> it is either superfluous or, in some cases, less

> efficient all together.

The method is there to manually dispose of native peers which are outwith the runtime's control

georgemca at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 20

> > George: I am calm; that was just my long winded

> > retort to make him look stupid and assuage my own

> > ego.

>

> I think you've just made a mistake. Big Daddy isn't a

> troll, he's one of the Good Guys :-)

>

> > Anyways.

> >

> > Also, as JRE's garbage collection becomes better,

> > doing it manually not only goes against the

> language

> > specifications, but whatever efficiency gained by

> it

> > becomes less and less meaningful to the point

> where

> > it is either superfluous or, in some cases, less

> > efficient all together.

>

> The method is there to manually dispose of native

> peers which are outwith the runtime's control

But it is possible to implement the JNI in a manner that allows for JRE garbage collection, yes?

jGardnera at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 21

> > > George: I am calm; that was just my long winded

> > > retort to make him look stupid and assuage my

> own

> > > ego.

> >

> > I think you've just made a mistake. Big Daddy isn't

> a

> > troll, he's one of the Good Guys :-)

> >

> > > Anyways.

> > >

> > > Also, as JRE's garbage collection becomes

> better,

> > > doing it manually not only goes against the

> > language

> > > specifications, but whatever efficiency gained

> by

> > it

> > > becomes less and less meaningful to the point

> > where

> > > it is either superfluous or, in some cases, less

> > > efficient all together.

> >

> > The method is there to manually dispose of native

> > peers which are outwith the runtime's control

>

> But it is possible to implement the JNI in a manner

> that allows for JRE garbage collection, yes?

Mneh. It is, I guess. AWT must do so. That SWT doesn't is not really a weakness, IMHO. Certainly, in the great Java widget library debate, that particular argument would smack of clutching at straws.

The most common use of SWT is within the Eclipse platform, where such management is taken care of on your behalf anyway

georgemca at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 22

> I am just not a fan of one-line retorts. The day some

> fat person on the forums offends me is the day I need

> to step away from the computer for a while :P

I prefer the term "steatopygous".

BigDaddyLoveHandlesa at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 23

Daddy got back

georgemca at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 24

> > I am just not a fan of one-line retorts. The day some

> > fat person on the forums offends me is the day I need

> > to step away from the computer for a while :P

>

> I prefer the term "steatopygous".(< one-line retort)

KelVarnsona at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 25

I'd snap my fingers, but they're just too chubby for that.

BigDaddyLoveHandlesa at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 26

> ... that particular argument would smack of clutching at straws.

I would disagree. According to the language specifications, garbage collection should be automatic. Otherwise, I could just go write a GUI up in C++.

Also, consider a GUI which is running for a relatively extended period of time and is fairly dynamic. Java's garbage collection as you know is designed to collect objects that are unreachable (JNI allows for global references to be reachable, I think.) and therefore no longer in use. If these are always reachable, or have valid references, they are not collected.

However, in SWT (like in the example you posted), garbage collection was not manually done until the END of the program; furthermore, the java garbage collector did nothing because there were still references to the objects. ( I think that at this point it would be almost useless anyways because the references go out of scope and are collected.) But... what if all references to an object are destroyed BEFORE execution of the program ends? what if all the references to hundreds of objects are destroyed? thousands?

jGardnera at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 27

> I'd snap my fingers, but they're just too chubby for

> that.

Ask the guy at the bakery to do it for you

georgemca at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 28

> > ... that particular argument would smack of

> clutching at straws.

>

> I would disagree. According to the language

> specifications, garbage collection should be

> automatic. Otherwise, I could just go write a GUI up

> in C++.

Which would be more effort. I couldn't do it, because I don't have the C++ nous to. I'm far from alone there.

> Also, consider a GUI which is running for a

> relatively extended period of time and is fairly

> dynamic. Java's garbage collection as you know is

> designed to collect objects that are unreachable (JNI

> allows for global references to be reachable, I

> think.) and therefore no longer in use. If these are

> always reachable, or have valid references, they are

> not collected.

> However, in SWT (like in the example you

> posted), garbage collection was not manually done

> until the END of the program; furthermore, the java

> garbage collector did nothing because there were

> still references to the objects. ( I think that at

> this point it would be almost useless anyways

> because the references go out of scope and are

> collected.) But... what if all references to an

> object are destroyed BEFORE execution of the program

> ends? what if all the references to hundreds of

> objects are destroyed? thousands?

That example is poor. The dispose method is defined on org.eclipse.swt.widgets.Widget, one is free to call it whenever, on whatever widgets he chooses. When learning SWT, almost all tutorials and books mention that you as a developer are responsible for disposing of the widgets you create. Not perfect, but still, in my opinion, not so big a deal as to render SWT a poor choice of library

georgemca at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 29

Funny how a simple topic is turning into an arguement over Java.

But I'm gonna take jGardner side just because george doesn't think the IPhone won't be a complete failure.

Ah hail, the swing facist!!!

-

blackmagea at 2007-7-28 20:03:45 > top of Java-index,Java Essentials,Java Programming...
# 30

I never said that SWT was a poor choice of a library in the first place, I was pointing out that expecting the programmer to manually handle the disposal of objects in a language where it is specified that it is done automatically is a weakness in that it is odd. Not only that, but the JRE garbage collector becomes a redundant monster that just sits there.

jGardnera at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 31

> Funny how a simple topic is turning into an arguement

> over Java.

>

> But I'm gonna take jGardner side just because george

> doesn't think the IPhone won't be a complete

> failure.

>

> Ah hail, the swing facist!!!

>

> -

The customer is always right. I win! :D

jGardnera at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 32

> Funny how a simple topic is turning into an arguement

> over Java.

See, what's happened here is two people have opposing views, but rather than just insist on being right, present reasoned arguments in favour of their corner. Not really an argument, as such

> But I'm gonna take jGardner side just because george

> doesn't think the IPhone won't be a complete

> failure.

Straw man. I - nor anyone else in that thread - said any such thing :p

georgemca at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 33

> Straw man. I - nor anyone else in that thread - said

> any such thing :p

Where's the proof?

Do your research!!!!!!!!!!!!

-

blackmagea at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 34

> I never said that SWT was a poor choice of a library

> in the first place, I was pointing out that expecting

> the programmer to manually handle the disposal of

> objects in a language where it is specified that it

> is done automatically is a weakness in that it is

> odd. Not only that, but the JRE garbage collector

> becomes a redundant monster that just sits there.

Ok, I assumed that was your stance

While its true that the Java language does the heavy lifting of GC, it doesn't mandate that all third-party libraries should take advantage of that. I don't know the reasoning behind why SWT requires manual disposal, but I bet there is some. SWT was conceived by ex-Sun engineers, some of whom worked on AWT and the JFC

The JRE isn't redundant, unless of course, your code consists solely of instances of SWT widgets!

georgemca at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 35

> > Straw man. I - nor anyone else in that thread -

> said

> > any such thing :p

>

>

> Where's the proof?

>

> Do your research!!!!!!!!!!!!

>

>

http://216.239.59.104/search?q=cache:yB8Di3tuGogJ:forum.java.sun.com/thread.jspa%3FthreadID%3D5190722+java+on+iphone+blackmage&hl=en&ct=clnk&cd=1&gl=uk

georgemca at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 36

> > Funny how a simple topic is turning into an

> arguement

> > over Java.

> >

> > But I'm gonna take jGardner side just because

> george

> > doesn't think the IPhone won't be a complete

> > failure.

> >

> > Ah hail, the swing facist!!!

> >

> > -

>

> The customer is always right. I win! :D

lol

georgemca at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 37

> > > Straw man. I - nor anyone else in that thread -

> > said

> > > any such thing :p

> >

> >

> > Where's the proof?

> >

> > Do your research!!!!!!!!!!!!

> >

> >

>

> http://216.239.59.104/search?q=cache:yB8Di3tuGogJ:foru

> m.java.sun.com/thread.jspa%3FthreadID%3D5190722+java+o

> n+iphone+blackmage&hl=en&ct=clnk&cd=1&gl=uk

IMAO,

I guess I have to wait a while until there really is no proof left.

blackmagea at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 38

> > > > Straw man. I - nor anyone else in that thread

> -

> > > said

> > > > any such thing :p

> > >

> > >

> > > Where's the proof?

> > >

> > > Do your research!!!!!!!!!!!!

> > >

> > >

> >

> >

> http://216.239.59.104/search?q=cache:yB8Di3tuGogJ:foru

>

> >

> m.java.sun.com/thread.jspa%3FthreadID%3D5190722+java+o

>

> > n+iphone+blackmage&hl=en&ct=clnk&cd=1&gl=uk

>

> IMAO,

>

> I guess I have to wait a while until there really is

> no proof left.

I've got a copy of the thread here, too. Ho ho ho

(I may be open to bribes)

georgemca at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 39

> > > > > Straw man. I - nor anyone else in that

> thread

> > -

> > > > said

> > > > > any such thing :p

> > > >

> > > >

> > > > Where's the proof?

> > > >

> > > > Do your research!!!!!!!!!!!!

> > > >

> > > >

> > >

> > >

> >

> http://216.239.59.104/search?q=cache:yB8Di3tuGogJ:foru

>

> >

> > >

> >

> m.java.sun.com/thread.jspa%3FthreadID%3D5190722+java+o

>

> >

> > > n+iphone+blackmage&hl=en&ct=clnk&cd=1&gl=uk

> >

> > IMAO,

> >

> > I guess I have to wait a while until there really

> is

> > no proof left.

>

> I've got a copy of the thread here, too. Ho ho ho

>

> (I may be open to bribes)

Lets cut the chase, how mant duke stars are we talking about?

blackmagea at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 40

> Lets cut the chase, how mant duke stars are we

> talking about?

heh heh make me an offer I can't refuse

georgemca at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 41

All of yawmarks dukes,

eheheh

blackmagea at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 42

> All of yawmarks dukes,

>

> eheheh

99 billion dukes? WOW!

georgemca at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...
# 43

Well, you said make you an offer you can't refuse

blackmagea at 2007-7-28 20:03:50 > top of Java-index,Java Essentials,Java Programming...