Hi Everyone!
I’m trying to make a GUI using monkeybars, and one of the features I’d
like to have is the ability to display a very long graph which users can
scroll from left and right to view the entire thing. I’d also like to
have the user be able to place (by clicking and dragging) bars to mark
sections of the graph they’d like to cut out.
I’d like to be able to draw the graph in the GUI, but drawing it to a
file and then displaying the image would also work.
Does anyone know of an example I can dissect which might help me do
this, or do you know from your own experience how this can be done?
Thanks in advance!
Chase W. wrote:
Hi Everyone!
I’m trying to make a GUI using monkeybars, and one of the features I’d
like to have is the ability to display a very long graph which users can
scroll from left and right to view the entire thing. I’d also like to
have the user be able to place (by clicking and dragging) bars to mark
sections of the graph they’d like to cut out.
Does anyone know of an example I can dissect which might help me do
this, or do you know from your own experience how this can be done?
Not exactly your scenario, but years back the original project that gave
birth to Monkeybars needed some “VU/EQ meter” sort of widget. To
display a signal value we wanted some colored columns that changed
height.
I cannot find the code, but as I recall they were custom nested
controller things that used a graphics for drawing. We then used an
instance of the widget for each value we needed to display. Something
like
@graphics.fill3DRect( x, y, width, height, raised )
More generally, for anything complex, we would go look to see if there
was already an existing Swing control, since you can easily use those
from Monkeybars.
In JotBot we wanted a nested table object, and writing one would be a
pain in the ass, so we used one from, I think, SwingX.
James B.
–
Neurogami - Avant-garage Research & Development
[email protected]