Thursday 30 June 2016

Strings Update

A bit late

These are new update as per guidance.



As shown in the above figure , When the user does not mention any column headers or row headers then a default value is assigned. For column headers its from A-Z continuing from AA-ZZ and for row header its from 1-n where n is number of rows.

As shown in the below figure if the column headers are already provided then the values of the column headers are taken as it is and if the row headers are not provided then the row headers are set to default value from 1-N Where N is number of rows.




RJ

Monday 13 June 2016

End of 3rd Week: Strings and Tooltips

Hi all,

Posting after almost 2 weeks. 3rd Week of GSoC has passed and everyone are working on full potential.

In the second week I was working on Tool-tips but had few confusions regarding what exactly is needed or would be accepted by user. After a brief discussion with mentors I got a clear Idea and I implemented the required tweaks.

Starting with Strings:



This is the initial state of the table

After moving a column and then checking the string/data of the table:



On changing the the column position, the position of data in the string also changes.

Moving on to Tool-tips:

Simply assigning tooltip to the each cell by passing a matrix of String values.



On changing the column position the tooltip assigned to particular cell remains intact with that cell.




As per discussion on passing the value->"values": the value of data in each cell becomes the value of tooltip for that cell. This also stand for column header and each cell in the main table


Note: For now I have not implemented tooltips for rowheader because I need to provide a functionality where user can decide whether table should have rowheader or not. So I will provide the tooltips for rowheader when I work on that functionality.

To pass tooltip for column header one has to pass a flag at the beginning of the tooltip matrix to assign tooltips to the column header. On changing the position of column the tooltips remain intact with the cell they were assigned to.


On passing the  flag columnheader-values the values of data of each cell becomes the tooltips of that cell.



These are some the tweaks I have been working on lately. Some other functionality that I have already implemented are sorting which I will demonstrate in the next blog

Thanks for reading, stay tuned :)

RJ

Thursday 2 June 2016

Tooltips

  Hi again,

Welcome to the era of tooltips, this post is in regard to the discussion on the developer mailing list.

As per my understanding of the advice given by mentors I produced the following result.

Case 1: When no string is passed:

                                   

                               

During the Creation of uicontrol object tooltipstring is initialized to default "";

                                 

No tooltip is displayed.

Case 2:  Special character is passed, instead of passing all the data I have used a special character "~"

so if "~" is passed like var.tooltipstring="~" then the tooltip will display the value in that cell as the tooltip.


TooltipString is set to the special charater;

David suggested to pass the complete matrix of data that is passed for the table, but it may lead to some futile computation and as java provides direct method of setting the tooltip to the value of cell I just used this to my advantage and avoided the computation. I can change the speacial character to any other character.Please suggest if it suits the need.











The Value of Cell is displayed in the tooltip.

Case 3:  When a matrix is passed

Since the function TooltipText excepts only Strings so anything passed to the TooltipString is considered as string and hence I use deliminator to separate each value,

ut.tooltipstring="[a,b,c,d]"
or
ut.tooltipstring="[a,,c,d]"

in the second case, the value of cell will only be displayed as a tooltip for that particular cell.


David suggested

ut.tooltipstring=["a" "b" "c" "d"]

So I have added the functionality where one can also input data in this fashion.

                              

I hope this post might make the discussion easier.

RJ