Quantcast

[Gsoc] Problem while solving bug #14709

classic Classic list List threaded Threaded
2 messages Options
nikhil goel nikhil goel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Gsoc] Problem while solving bug #14709

Hello
I am sorry I had my mid semester examinations due to which I was unable to work on this bug for a while.
I sent this mail to dev mailing list a few days ago but got no reply.
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?

Thanks
Nikhil

_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem while solving bug #14709

Hello Nikhil,

> 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.

Exactly, the LaTeX rendering is performed for strings between `$` symbols. The function you commented out is the good one. `ScilabSpecialTextUtilities#setText` convert a text to an image and `setIcon` on the JComponent.

> 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.

You should get into the Checkbox/RadioButton rendering and check that they support an image rendering through `setIcon`. If not (and probably not) you should find another way to render the icon and generate the corresponding HTML code or Java API to use.

> 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?

It is converting the text to a LaTeX image and store this image through JComponent#setIcon on the component. The caller is then free to add text (to have Icon + Text) or not (to only have icon).


> 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.

Yes we just override some methods of the Java components. This is why the code is so simple ! To get the complete view of the method calls you should get into the JDK source code. This is easily feasible on Linux by install the 'jdk source' package and debug the code on any IDE (Eclipse and Netbeans are known to work).

Thanks,

--
Clément


De : gsoc <[hidden email]> de la part de nikhil goel <[hidden email]>
Envoyé : lundi 13 mars 2017 16:53:11
À : [hidden email]
Objet : [Gsoc] Problem while solving bug #14709
 
Hello
I am sorry I had my mid semester examinations due to which I was unable to work on this bug for a while.
I sent this mail to dev mailing list a few days ago but got no reply.
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?

Thanks
Nikhil

_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Loading...