MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Joust in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98246] Re: Joust in Mathematica
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Fri, 3 Apr 2009 04:38:47 -0500 (EST)
  • Organization: CNNTP
  • References: <gr21m6$lr4$1@smc.vnet.net>

Hi,

> I've been wondering how to set up something that behaves like the Java Joust 
> in Mathematica:  http://www.ivanpeters.com/  we all use them every day
on on
> windows machines, so I am wondering how to implement something like it in
> Mathematica. At first, I thought of using GraphPlot or TreePlot, but
> then started to wonder if OpenerView and Opener could be trained to behave in
a more
> general way. Has anyone thought about this already, or got some
working examples?

I think OpenerView isn't providing the looks, but the functionality,
depending of course what exactly you have in mind. What exactly are you
missing? Here is some code for Mathematica 7 you might want to play with:

tree = "A"["B"["x", "y", "z"], "C"["f"["g"["asdf"]]]]

ov[a_String] := Button[a, content = a]

ov[expr_] := OpenerView[{Head[expr], Column[ov /@ (List @@ expr)]}]

CreateDialog[{Dynamic[
   Row[{Panel[
      Pane[ov[tree], ImageSize -> {100, 200},
       Scrollbars -> {False, True}]],
     Panel[Pane[Dynamic[content], ImageSize -> {200, 200}]]}]]}]


hth,

albert


  • Prev by Date: Re: A simple ordinary differential equation
  • Next by Date: Re: Can't figure out how to export Mathematica into Word
  • Previous by thread: Re: Joust in Mathematica
  • Next by thread: Re: Joust in Mathematica