<div dir="ltr"><span style="font-size:12.8px">Hi Clément</span><br style="font-size:12.8px"><span style="font-size:12.8px">I am sorry I had my mid semester examinations due to which I was unable to work on this bug for a while.</span><br style="font-size:12.8px"><span style="font-size:12.8px">I have a few questions-</span><br style="font-size:12.8px"><span style="font-size:12.8px">Uicontrol.java- line 1231 - this function sets the string of all the uicontrol styles.</span><br style="font-size:12.8px"><span style="font-size:12.8px"> SwingScilabPushButton.java line 107 - Function SetText.</span><br style="font-size:12.8px"><span style="font-size:12.8px">This function is implementing the LaTeX in pushbutton. If I remove this, the latex string disappears and $/alpha$ appears.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">When I try to use a similar function in Checkbox/RadioButton, the LaTeX string appears but the white portion of the checkbox/radiobutton disappears.</span><br style="font-size:12.8px"><span style="font-size:12.8px"> I am unable to understand what is causing the checkbox/radiobutton to break.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Also in ScilabSwingPushButton.java setText function line 117. If i remove this line/change the text inside it, the latex is still being implemented. Does this mean this line is just updating the text?</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">If I remove majority of the code of ScilabSwingPushButton, the PushButton/checkbox/</span><span style="font-size:12.8px">radiobutto<wbr>n is still working, which means that most of the code is setting properties of pushbutton/checkbox/</span><span style="font-size:12.8px">radiobutto<wbr>n.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Draw function is the rendering function so removing it removes the entire PushButton/checkbox/</span><span style="font-size:12.8px">radiobutto<wbr>n.</span><br style="font-size:12.8px"><span style="font-size:12.8px">But I am not able to find why the checkbox/radiobutton is breaking.</span><br style="font-size:12.8px"><span style="font-size:12.8px">I am unable to understand what is rendering the white box of checkbox/radiobutton.</span><br style="font-size:12.8px"><span style="font-size:12.8px">Can you please help me figure this out?</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Thanking you in anticipation</span><br><div><span style="font-size:12.8px">Nikhil</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 12, 2017 at 1:52 PM, nikhil goel <span dir="ltr"><<a href="mailto:nikhilgoel199797@gmail.com" target="_blank">nikhilgoel199797@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Hi Clément</span><br style="font-size:12.8px"><span style="font-size:12.8px">I am sorry I had my mid semester examinations due to which I was unable to work on this bug for a while.</span><br style="font-size:12.8px"><span style="font-size:12.8px">I have a few questions-</span><br style="font-size:12.8px"><span style="font-size:12.8px">Uicontrol.java- line 1231 - this function sets the string of all the uicontrol styles.</span><br style="font-size:12.8px"><span style="font-size:12.8px"> SwingScilabPushButton.java line 107 - Function SetText.</span><br style="font-size:12.8px"><span style="font-size:12.8px">This function is implementing the LaTeX in pushbutton. If I remove this, the latex string disappears and $/alpha$ appears.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">When I try to use a similar function in Checkbox/RadioButton, the LaTeX string appears but the white portion of the checkbox/radiobutton disappears.</span><br style="font-size:12.8px"><span style="font-size:12.8px"> I am unable to understand what is causing the checkbox/radiobutton to break.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Also in ScilabSwingPushButton.java setText function line 117. If i remove this line/change the text inside it, the latex is still being implemented. Does this mean this line is just updating the text?</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">If I remove majority of the code of ScilabSwingPushButton, the PushButton/checkbox/</span><span style="font-size:12.8px">radiobutto<wbr>n is still working, which means that most of the code is setting properties of pushbutton/checkbox/</span><span style="font-size:12.8px">radiobutto<wbr>n.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Draw function is the rendering function so removing it removes the entire PushButton/checkbox/</span><span style="font-size:12.8px">radiobutto<wbr>n.</span><br style="font-size:12.8px"><span style="font-size:12.8px">But I am not able to find why the checkbox/radiobutton is breaking.</span><br style="font-size:12.8px"><span style="font-size:12.8px">I am unable to understand what is rendering the white box of checkbox/radiobutton.</span><br style="font-size:12.8px"><span style="font-size:12.8px">Can you please help me figure this out?</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Thanking you in anticipation</span><span class="HOEnZb"><font color="#888888"><br style="font-size:12.8px"><span style="font-size:12.8px">Nikhil</span></font></span><div><div class="h5"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 24, 2017 at 1:21 PM, Clément David <span dir="ltr"><<a href="mailto:clement.david@scilab-enterprises.com" target="_blank">clement.david@scilab-<wbr>enterprises.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nikhil,<br>
<span><br>
> I tried to overload the setText method in ScilabSpecialTextUtilities so that SwingScilabListBox<br>
> type variable could be passed to it but this also resulted in the same error. <br>
>    I think that the compatibility error is because SwingScilabListBox is not a part of the<br>
> hierarchy of JComponent class.<br>
><br>
> [javac]<br>
> /home/nikhil/scilab_master/sci<wbr>lab/modules/gui/src/java/org/<wbr>scilab/modules/gui/bridge/list<wbr>box/Swing<br>
> ScilabListBox.java:112: error: incompatible types: <anonymous ListCellRenderer> cannot be<br>
> converted to JComponent<br>
><br>
>    Am I proceeding in the right direction or am I doing something wrong? Is there any other way to<br>
> do this?<br>
<br>
</span>Yep you find the more complex part of Scilab GUI, Scilab components (within the bridge package) are<br>
not directly mapped to the Java ones but instead has an indirection (using the composition pattern)<br>
to them. For exemple :<br>
<br>
SwingScilabListBox class as an associated JList class stored in the 'list' field. If you want the<br>
rendering of an item of the list, take a look at SwingScilabListBox.java line 107 where JList<br>
default renderer is changed to a Scilab specific one.<br>
<br>
Thanks for you involvement, do not hesitate to ask questions,<br>
<br>
--<br>
Clément<br>
______________________________<wbr>_________________<br>
dev mailing list<br>
<a href="mailto:dev@lists.scilab.org" target="_blank">dev@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">http://lists.scilab.org/mailma<wbr>n/listinfo/dev</a><br>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>