OK Maxim. Will do it like that!

On Tue, Jul 2, 2013 at 2:05 PM, Maxim Solodovnik <[email protected]>wrote:

> I would totally disagree with
> "At the Wicket Java code we save these elements as Java Objecst which
> contains the JSON strings."
>
> Java objects should contain normal fields like "Point center; int radius;"
> and be (de)serialized (from)into JSON if necessary.
>
>
> On Tue, Jul 2, 2013 at 2:27 PM, Andun Sameera <[email protected]> wrote:
>
>> Hi Andrey,
>>
>> Great! If you can give me a example for,
>>
>> collection.onChange(element)
>>
>> it will be highly appreciated.
>>
>> @Maxim,
>>
>> After some thinking I cam across of this idea. Please correct me If I am
>> wrong.
>>
>>    - All the whiteboard elements can be represented as JSON strings
>>    (Have to find a way to add PDF,DOCs, Pictures to whiteboard in this way)
>>    - At the Wicket Java code we save these elements as Java Objecst
>>    which contains the JSON strings.
>>    - To synchronize white board we can send these object to all the
>>    viewers.
>>    - To save/load we can use this already implemented JSON based
>>    serialization and de-serialization.
>>
>> But have to find ways to get all these data from closure implementation
>> to wicket!
>>
>> Thanks!
>> On Tue, Jul 2, 2013 at 11:28 AM, Bogdanov Andrey <[email protected]> wrote:
>>
>>> Hi Andun,
>>>
>>> Whiteboard consists of two main objects: ui-component
>>> "bay.whiteboard.Whiteboard", which contains functionality for user
>>> interaction and collections of objects "bay.whiteboard.Collection" which
>>> contains list of objects and some stuff to manipulate them.
>>> After createing WB with
>>>    whiteboard = bay.whiteboard.Create();
>>> you could access to collection as
>>>   collection = whiteboard.collections.main; or
>>>   collection = whiteboard.getMainCollection(); - i've just added this
>>> method
>>>
>>> After that you could define
>>>    collection.onChange(element) - method wich will be invoked every
>>> time when some drawing elements add or change.
>>> Also you could use methods:
>>>     collection.getJson(element); -  to obtain json code for an element
>>>      collection.jsonCode();   -  to obtain json code for whole
>>> collection
>>>      collection.acceptJsonStr(str); -  to add or change one element
>>> described as json
>>>      collection.parseJson(str); -  to rebuild all from the given json
>>> string
>>>
>>>
>>> As an example you could explore linkWebSocket method in ui.js, which
>>> allows synchronize wb-content through webSocket
>>>
>>> Regards,
>>> Andrey Bogdanov
>>>
>>> Вторник, 2 июля 2013, 1:25 +05:30 от Andun Sameera <[email protected]>:
>>>
>>>   Hi Andrey,
>>>
>>> I am moving in to this new thread to discuss about the clarifications,
>>> improvements and integration of your Whiteboard to wicket. I have looked at
>>> your code which can be found https://github.com/bay73/whiteboard. I
>>> have following questions,
>>>
>>>    - In Wicket, I want map Whiteboard Elements(Rectangle, Circle, Text,
>>>    etc.) to Java objects.
>>>    - Thus we can send those object to all the Whiteboard viewers.
>>>    - Using these objects there Whiteboards will be updated.
>>>    - To do that, can I get some data from your code? which can be later
>>>    used to create elements. I saw there is a serialization methods and
>>>    deserilization method in base.js. If we can extend that mechanism to give
>>>    some data when element is drawn or edited as an event, I can use them to
>>>    create Java objects.
>>>    - Also there should be a mechanism to draw elements on your
>>>    Whiteboard by passing those data.
>>>
>>> Can we do these things?
>>>
>>> Thanks!
>>> --
>>> Regards
>>> Andun S.L. Gunawardana
>>> Undergraduate
>>> Department of Computer Science And Engineering
>>> University of Moratuwa
>>> Sri Lanka
>>>
>>> Blog - http://www.insightforfuture.blogspot.com/
>>> LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
>>> Twitter -http://twitter.com/AndunSLG
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Андрей Богданов
>>>
>>
>>
>>
>> --
>> Regards
>> Andun S.L. Gunawardana
>> Undergraduate
>> Department of Computer Science And Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>> Blog - http://www.insightforfuture.blogspot.com/
>> LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
>> Twitter -http://twitter.com/AndunSLG
>>
>>
>>
>>
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
Regards
Andun S.L. Gunawardana
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka

Blog - http://www.insightforfuture.blogspot.com/
LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
Twitter -http://twitter.com/AndunSLG

Reply via email to