<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: JitterGUI Family Documentation</title>
		<atom:link href="http://cycling74.com/forums/topic/jittergui-family-documentation/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/jittergui-family-documentation/feed</link>
		<description></description>
		<pubDate>Thu, 20 Jun 2013 03:51:25 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-30773</guid>
					<title><![CDATA[JitterGUI Family Documentation]]></title>
					<link>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-30773</link>
					<pubDate>Tue, 13 Mar 2007 00:16:07 +0000</pubDate>
					<dc:creator>Matthew Aidekman</dc:creator>

					<description>
						<![CDATA[
						<p>I&#8217;m hoping for any tips on how to write a peer to jitterGUISlider which utilizes the available classes. If I don&#8217;t have to reinvent the wheel, I don&#8217;t want to. BUT just reading the .java files is really making my brain explode.</p>
<p>is there something akin to api documentation?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98963</guid>
					<title><![CDATA[Re: JitterGUI Family Documentation]]></title>
					<link>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98963</link>
					<pubDate>Sat, 17 Mar 2007 05:59:24 +0000</pubDate>
					<dc:creator>projects</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Matthew,</p>
<p>There is nothing akin to API documentation for these example java<br />
classes (or the javascript code that inspired them.)  But I don&#8217;t<br />
think it will be as hard as you think it will be to understand the<br />
code.  JitterGuiSlider is a really simple wrapper around<br />
JitterGuiSliderElement which extends JitterGuiElement. Go through the<br />
methods carefully and feel free to post any specific questions you<br />
have to the forum.</p>
<p>Ben</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98964</guid>
					<title><![CDATA[Re: JitterGUI Family Documentation]]></title>
					<link>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98964</link>
					<pubDate>Sat, 02 Jun 2007 14:15:45 +0000</pubDate>
					<dc:creator>jbm</dc:creator>

					<description>
						<![CDATA[
						<p>Hello Ben,</p>
<p>I&#8217;ve been trying to wrap my head around gui stuff for the last couple of weeks, and it&#8217;s giving me a really hard time. I&#8217;m sure most of this is simply due to the fact that graphics programming is *very* different from audio/midi &#8211; at least to my mind&#8230; Anyway, in poking around with your java-jitter gui stuff, I think I&#8217;ve managed to kind of get a sense of what&#8217;s going on, but I&#8217;m still really unclear on how to do the things I need to do. What I want to do is &#8220;add&#8221; new objects to existing objects, and have those new objects &#8220;stick&#8221; to the existing (parent) objects, while maintaining the functionality of both child and parent. <br />
In messing around with this, I&#8217;ve been trying to add a &#8220;nested&#8221; slider to one of your JitterGuiSliders, to make a kind of &#8220;bank&#8221;. <br />
I&#8217;ve done some hacking, but it&#8217;s really not working:</p>
<p>// Created on 3-Sep-2005<br />
import com.cycling74.max.*;<br />
import java.util.*;</p>
<p>/**<br />
 * @author bbn, @destroyed_by jbm<br />
 *<br />
 * Max object container for a single slider<br />
 */<br />
public class JitterGuiSliderBank extends MaxObject {</p>
<p>	private JitterGuiSliderElement s = null;<br />
	private ArrayList<jitterguisliderelement> Sliders = null;<br />
	private String context;</jitterguisliderelement></p>
<p>	public JitterGuiSliderBank(Atom args[])	// initialize with one slider<br />
	{	<br />
		if (args.length == 0)<br />
			bail(&#8220;gui.slider: need a context argument&#8221;);<br />
		context = args[0].toString();<br />
		Sliders = new ArrayList<jitterguisliderelement>();<br />
		s = new JitterGuiSliderElement(this, new Callback(this, &#8220;out&#8221;));<br />
		s.init(context);<br />
		Sliders.add(s);<br />
		declareAttribute(&#8220;color&#8221;, null, &#8220;setColor&#8221;);<br />
		declareAttribute(&#8220;rotate&#8221;, null, &#8220;setRotate&#8221;);<br />
		declareAttribute(&#8220;position&#8221;, null, &#8220;setPosition&#8221;);<br />
		declareAttribute(&#8220;scale&#8221;, null, &#8220;setScale&#8221;);<br />
	}</jitterguisliderelement></p>
<p>	public void nestSlider()<br />
	{<br />
	JitterGuiSliderElement sliderOne = Sliders.get(0);<br />
	float homePositionX = sliderOne.position[0];<br />
	float homePositionY = sliderOne.position[1];<br />
	float homePositionZ = sliderOne.position[2];<br />
	post(&#8220;home position x: &#8221; +homePositionX);<br />
	JitterGuiSliderElement slider = new JitterGuiSliderElement(this, new Callback(this, &#8220;out&#8221;));<br />
	Atom[] setup = new Atom[]{Atom.newAtom((float)homePositionX + 0.4f),<br />
				Atom.newAtom((float)homePositionY + 0.6f), Atom.newAtom((float)homePositionZ)};<br />
	slider.init(context);<br />
	slider.setPosition(setup);<br />
	Sliders.add(slider);<br />
	}</p>
<p>	public void out()<br />
	{<br />
		for(int i=0;i < Sliders.size();i++)<br />
		{<br />
			JitterGuiSliderElement slider = Sliders.get(i);<br />
			outlet(0, slider.val);<br />
		}<br />
	}</p>
<p>	public void notifyDeleted()<br />
	{<br />
		for(int i=0;i < Sliders.size();i++)<br />
		{<br />
			JitterGuiSliderElement slider = Sliders.get(i);<br />
			slider.free();<br />
		}<br />
	}</p>
<p>	public void setColor(Atom a[]) {s.setColor(a);}<br />
	public void setRotate(Atom a[]) {s.setRotate(a);}<br />
	public void setPosition(Atom a[]) {s.setPosition(a);}<br />
	public void setScale(Atom a[]) {s.setScale(a);}<br />
}</p>
<p>
It does create a new, functioning slider. But it then loses the ability to detect the old one with the mouse. Also, the nested slider doesn&#8217;t move with the initial one. Is there any chance you could give me a quick run-down of how to best manage this? I&#8217;d thought about perhaps adding code to JitterGuiElement which would allow the creation of nested objects, but I&#8217;m not at all sure how I&#8217;d go about doing that. Even if you could outline for me how your js-based sliderrow would work with your java gui classes, that would be awesome. This is doing my head in right now, but I&#8217;m sure once I can get a model of it in my head, I&#8217;ll be able to go from there.</p>
<p>Thanks in advance,</p>
<p>J.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98965</guid>
					<title><![CDATA[Re: JitterGUI Family Documentation]]></title>
					<link>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98965</link>
					<pubDate>Sat, 02 Jun 2007 15:14:58 +0000</pubDate>
					<dc:creator>jbm</dc:creator>

					<description>
						<![CDATA[
						<p>okay, so with a little observation I got them to move together (just x, y at the moment, but that&#8217;s fine for now). Just added some offsets:</p>
<p>	public void nestSlider()<br />
	{<br />
	JitterGuiSliderElement sliderOne = Sliders.get(0);<br />
	float homePositionX = sliderOne.position[0];<br />
	float homePositionY = sliderOne.position[1];<br />
	float homePositionZ = sliderOne.position[2];<br />
	post(&#8220;home position x: &#8221; +homePositionX);<br />
	JitterGuiSliderElement slider = new JitterGuiSliderElement(this, new Callback(this, &#8220;out&#8221;));<br />
	Atom[] setup = new Atom[]{Atom.newAtom((float)homePositionX + 0.4f),<br />
				Atom.newAtom((float)homePositionY + 0.6f), Atom.newAtom((float)homePositionZ)};<br />
	slider.init(context);<br />
	slider.setUniqueIndex(Sliders.size());<br />
	slider.setPosition(setup);<br />
	Sliders.add(slider);<br />
	// set up offsets for positioning later<br />
	sX = s.position[0];<br />
	sY = s.position[1];<br />
	float sliderX = slider.position[0];<br />
	xoffset = sliderX &#8211; sX;<br />
	float sliderY = slider.position[1];<br />
	yoffset = sliderY &#8211; sY;<br />
	}</p>
<p>then looped through the children in setPosition():</p>
<p>	public void setPosition(Atom a[]) <br />
	{<br />
		s.setPosition(a);<br />
		sX = s.position[0];<br />
		sY = s.position[1];<br />
		for(int i=1;i < Sliders.size();i++)<br />
			{<br />
			float sliderZ = Sliders.get(i).position[2];<br />
			JitterGuiSliderElement slider = Sliders.get(i);<br />
			Atom[] shift = new Atom[]{Atom.newAtom((float)sX + xoffset), Atom.newAtom((float)sY + yoffset),<br />
							Atom.newAtom((float)sliderZ)};<br />
			slider.setPosition(shift);<br />
			}<br />
	}</p>
<p>The focus/selection thing is more mysterious to me, though&#8230;</p>
<p>J.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98966</guid>
					<title><![CDATA[Re: JitterGUI Family Documentation]]></title>
					<link>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98966</link>
					<pubDate>Sat, 02 Jun 2007 15:19:27 +0000</pubDate>
					<dc:creator>jbm</dc:creator>

					<description>
						<![CDATA[
						<p>oh! I just noticed that if I add more than one nested slider, the two children are able to negotiate focus/selection properly. hmm. This may put me closer than I thought I was&#8230;</p>
<p>apologies to all those who still use the mailing list. I&#8217;m strictly forum-based these days, so I don&#8217;t get spammy posts by goofballs like myself. ;-)</p>
<p>J.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98967</guid>
					<title><![CDATA[Re: JitterGUI Family Documentation]]></title>
					<link>http://cycling74.com/forums/topic/jittergui-family-documentation/#post-98967</link>
					<pubDate>Sat, 02 Jun 2007 15:29:10 +0000</pubDate>
					<dc:creator>jbm</dc:creator>

					<description>
						<![CDATA[
						<p>aha! Got it. setUniqueIndex on the parent can&#8217;t be zero (which I&#8217;d set it to before)&#8230;</p>
<p>Here&#8217;s the current code. Ben, if you find this laughably goofy, please point out where, and why.</p>
<p>// Created on 3-Sep-2005<br />
import com.cycling74.max.*;<br />
import java.util.*;</p>
<p>/**<br />
 * @author bbn<br />
 *<br />
 * Max object container for a single slider<br />
 */<br />
public class JitterGuiSliderBank extends MaxObject {</p>
<p>	private JitterGuiSliderElement s = null;<br />
	private ArrayList<jitterguisliderelement> Sliders = null;<br />
	private String context;<br />
	private float sX, sY, xoffset, yoffset;		<br />
	public JitterGuiSliderBank(Atom args[])	// initialize with one slider<br />
	{	<br />
		if (args.length == 0)<br />
			bail(&#8220;gui.slider: need a context argument&#8221;);<br />
		context = args[0].toString();<br />
		Sliders = new ArrayList</jitterguisliderelement><jitterguisliderelement>();<br />
		s = new JitterGuiSliderElement(this, new Callback(this, &#8220;out&#8221;));<br />
		s.init(context);<br />
		s.setUniqueIndex(1);<br />
		Sliders.add(s);<br />
		declareAttribute(&#8220;color&#8221;, null, &#8220;setColor&#8221;);<br />
		declareAttribute(&#8220;rotate&#8221;, null, &#8220;setRotate&#8221;);<br />
		declareAttribute(&#8220;position&#8221;, null, &#8220;setPosition&#8221;);<br />
		declareAttribute(&#8220;scale&#8221;, null, &#8220;setScale&#8221;);<br />
	}</jitterguisliderelement></p>
<p>	public void nestSlider()<br />
	{<br />
	JitterGuiSliderElement sliderOne = Sliders.get(0);<br />
	float homePositionX = sliderOne.position[0];<br />
	float homePositionY = sliderOne.position[1];<br />
	float homePositionZ = sliderOne.position[2];<br />
	post(&#8220;home position x: &#8221; +homePositionX);<br />
	JitterGuiSliderElement slider = new JitterGuiSliderElement(this, new Callback(this, &#8220;out&#8221;));<br />
	Atom[] setup = new Atom[]{Atom.newAtom((float)homePositionX + 0.4f),<br />
				Atom.newAtom((float)homePositionY + 0.6f), Atom.newAtom((float)homePositionZ)};<br />
	slider.init(context);<br />
	slider.setUniqueIndex(Sliders.size() + 1);<br />
	slider.setPosition(setup);<br />
	Sliders.add(slider);<br />
	// set up offsets for positioning later<br />
	sX = s.position[0];<br />
	sY = s.position[1];<br />
	float sliderX = slider.position[0];<br />
	xoffset = sliderX &#8211; sX;<br />
	float sliderY = slider.position[1];<br />
	yoffset = sliderY &#8211; sY;<br />
	}</p>
<p>	public void out()<br />
	{<br />
		for(int i=0;i < Sliders.size();i++)<br />
		{<br />
			JitterGuiSliderElement slider = Sliders.get(i);<br />
			outlet(0, slider.val);<br />
		}<br />
	}</p>
<p>	public void notifyDeleted()<br />
	{<br />
		for(int i=0;i < Sliders.size();i++)<br />
		{<br />
			JitterGuiSliderElement slider = Sliders.get(i);<br />
			slider.free();<br />
		}<br />
	}</p>
<p>	public void setColor(Atom a[]) {s.setColor(a);}<br />
	public void setRotate(Atom a[]) {s.setRotate(a);}<br />
	public void setPosition(Atom a[]) <br />
	{<br />
		s.setPosition(a);<br />
		sX = s.position[0];<br />
		sY = s.position[1];<br />
		for(int i=1;i < Sliders.size();i++)<br />
			{<br />
			float sliderZ = Sliders.get(i).position[2];<br />
			JitterGuiSliderElement slider = Sliders.get(i);<br />
			Atom[] shift = new Atom[]{Atom.newAtom((float)sX + xoffset), Atom.newAtom((float)sY + yoffset),<br />
							Atom.newAtom((float)sliderZ)};<br />
			slider.setPosition(shift);<br />
			}<br />
	}<br />
	public void setScale(Atom a[]) {s.setScale(a);}<br />
}</p>
<p>cheers,</p>
<p>J.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

