[Scilab-Dev] Problem while solving Bug#14709

nikhil goel nikhilgoel199797 at gmail.com
Sun Mar 12 09:22:04 CET 2017


Hi Clément
I am sorry I had my mid semester examinations due to which I was unable to
work on this bug for a while.
I have a few questions-
Uicontrol.java- line 1231 - this function sets the string of all the
uicontrol styles.
 SwingScilabPushButton.java line 107 - Function SetText.
This function is implementing the LaTeX in pushbutton. If I remove this,
the latex string disappears and $/alpha$ appears.

When I try to use a similar function in Checkbox/RadioButton, the LaTeX
string appears but the white portion of the checkbox/radiobutton disappears.
 I am unable to understand what is causing the checkbox/radiobutton to
break.

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?

If I remove majority of the code of ScilabSwingPushButton, the
PushButton/checkbox/radiobutton is still working, which means that most of
the code is setting properties of pushbutton/checkbox/radiobutton.

Draw function is the rendering function so removing it removes the entire
PushButton/checkbox/radiobutton.
But I am not able to find why the checkbox/radiobutton is breaking.
I am unable to understand what is rendering the white box of
checkbox/radiobutton.
Can you please help me figure this out?

Thanking you in anticipation
Nikhil

On Fri, Feb 24, 2017 at 1:21 PM, Clément David <
clement.david at scilab-enterprises.com> wrote:

> Hi Nikhil,
>
> > I tried to overload the setText method in ScilabSpecialTextUtilities so
> that SwingScilabListBox
> > type variable could be passed to it but this also resulted in the same
> error.
> >    I think that the compatibility error is because SwingScilabListBox is
> not a part of the
> > hierarchy of JComponent class.
> >
> > [javac]
> > /home/nikhil/scilab_master/scilab/modules/gui/src/java/
> org/scilab/modules/gui/bridge/listbox/Swing
> > ScilabListBox.java:112: error: incompatible types: <anonymous
> ListCellRenderer> cannot be
> > converted to JComponent
> >
> >    Am I proceeding in the right direction or am I doing something wrong?
> Is there any other way to
> > do this?
>
> Yep you find the more complex part of Scilab GUI, Scilab components
> (within the bridge package) are
> not directly mapped to the Java ones but instead has an indirection (using
> the composition pattern)
> to them. For exemple :
>
> SwingScilabListBox class as an associated JList class stored in the 'list'
> field. If you want the
> rendering of an item of the list, take a look at SwingScilabListBox.java
> line 107 where JList
> default renderer is changed to a Scilab specific one.
>
> Thanks for you involvement, do not hesitate to ask questions,
>
> --
> Clément
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20170312/349584a2/attachment.htm>


More information about the dev mailing list