RTCalendarBuilder example

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RTCalendarBuilder example

Markus Böhm-2

May I ask: I’m trying to understand how to use RTCalendarBuilder in own, adapted calendar visualization, I read the chapter about builders in the book and started to look at:

exampleMonth

| b |

b := RTCalendarBuilder new.

b dates: (Month current to: Month current next).

b build.

^ b view

Is the month layout finally implemented in RTSVGPath in monthShapePath?

How could one change month visualization and:

-   start weeks on Monday instead of Sunday

-    change color of day figure or background color based on criteria (e.g. weekend …)

Only meant as example. Would I need to change SVGPaths or are there higher level methods?

BR Mike


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: RTCalendarBuilder example

akevalion
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: RTCalendarBuilder example

Markus Böhm-2

Hallo Milton, tx, very interesting.

How would I find out best what messages are e.g. supported by “b dateShape”, in order to configure visualization?

Just to understand the way of tackling the API based on this example. Via Spotter or Debugging…

 

Would You have a short example, indicating how to visualize CSV data in a month view (e.g. days with sports activity)?

 

Really cool. Sry for asking beginner questions, but it motivates.

 

BR Mike


Am 07.04.2017 11:10 vorm. schrieb "milton mamani" <[hidden email]>:
Hi Markus,

Is the month layout finally implemented in RTSVGPath in monthShapePath?
- could you please explain it?

How could one change month visualization and:

-   start weeks on Monday instead of Sunday.

---- RTCalendarBuilder uses RTDateLayout, and with this layout change the start of the weeks is not possible, we can improve that

- change color of day figure or background color based on criteria (e.g. weekend …)

---- You can use dateShape

I prepare this example, that I hope can resolve some of your questions.

| b |
b := RTCalendarBuilder new.
b dates: (Month current to: Month current next next).
b dateShape box size: 14.
b dateShape if: [:date | date dayOfWeek = 1 ]color: Color lightBlue .
b dateShape if: [:date | date dayOfWeek = 2 ]color: Color blue.
b monthShape shape: (b monthShapePath: 15.0).
b dateLayout gapSize: 1.
b monthLayout month.
b build.
(b view elements select: [:e | e model isKindOf: Month]) pushFront.
^ b view

Imágenes integradas 3

| b |
b := RTCalendarBuilder new.
b dates: (Month current to: Month current next next).
b dateShape shape: (RTPolygon star size: 20).
b dateShape if: [:date | date dayOfWeek = 1 ]color: Color lightBlue .
b dateShape if: [:date | date dayOfWeek = 2 ]color: Color blue.
b build.
^ b view

Imágenes integradas 2

Milton




Libre de virus. www.avast.com

2017-04-06 9:32 GMT-03:00 Markus Böhm <[hidden email]>:

May I ask: I’m trying to understand how to use RTCalendarBuilder in own, adapted calendar visualization, I read the chapter about builders in the book and started to look at:

exampleMonth

| b |

b := RTCalendarBuilder new.

b dates: (Month current to: Month current next).

b build.

^ b view

Is the month layout finally implemented in RTSVGPath in monthShapePath?

How could one change month visualization and:

-   start weeks on Monday instead of Sunday

-    change color of day figure or background color based on criteria (e.g. weekend …)

Only meant as example. Would I need to change SVGPaths or are there higher level methods?

BR Mike


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: RTCalendarBuilder example

akevalion
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: RTCalendarBuilder example

Ben Coman
In reply to this post by Markus Böhm-2


On Fri, Apr 7, 2017 at 6:48 PM, Markus Böhm <[hidden email]> wrote:

 Sry for asking beginner questions, but it motivates.

The community is not so big.  Every newcomer is valued.
Often newcomer's fresh eyes highlight gaps to improve.
So ask away.

cheers -ben    

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: RTCalendarBuilder example

abergel
In reply to this post by akevalion
Excellent scripts Milton!

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 7, 2017, at 6:10 AM, milton mamani <[hidden email]> wrote:

Hi Markus,

Is the month layout finally implemented in RTSVGPath in monthShapePath?
- could you please explain it?

How could one change month visualization and:

-   start weeks on Monday instead of Sunday.

---- RTCalendarBuilder uses RTDateLayout, and with this layout change the start of the weeks is not possible, we can improve that

- change color of day figure or background color based on criteria (e.g. weekend …)

---- You can use dateShape

I prepare this example, that I hope can resolve some of your questions.

| b |
b := RTCalendarBuilder new.
b dates: (Month current to: Month current next next).
b dateShape box size: 14.
b dateShape if: [:date | date dayOfWeek = 1 ]color: Color lightBlue .
b dateShape if: [:date | date dayOfWeek = 2 ]color: Color blue.
b monthShape shape: (b monthShapePath: 15.0).
b dateLayout gapSize: 1.
b monthLayout month.
b build.
(b view elements select: [:e | e model isKindOf: Month]) pushFront.
^ b view

<fa.png>

| b |
b := RTCalendarBuilder new.
b dates: (Month current to: Month current next next).
b dateShape shape: (RTPolygon star size: 20).
b dateShape if: [:date | date dayOfWeek = 1 ]color: Color lightBlue .
b dateShape if: [:date | date dayOfWeek = 2 ]color: Color blue.
b build.
^ b view

<foo.png>

Milton




Libre de virus. www.avast.com
<a href="x-msg://22/#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1" class="">

2017-04-06 9:32 GMT-03:00 Markus Böhm <[hidden email]>:

May I ask: I’m trying to understand how to use RTCalendarBuilder in own, adapted calendar visualization, I read the chapter about builders in the book and started to look at:

exampleMonth

| b |

b := RTCalendarBuilder new.

b dates: (Month current to: Month current next).

b build.

^ b view

Is the month layout finally implemented in RTSVGPath in monthShapePath?

How could one change month visualization and:

-   start weeks on Monday instead of Sunday

-    change color of day figure or background color based on criteria (e.g. weekend …)

Only meant as example. Would I need to change SVGPaths or are there higher level methods?

BR Mike


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev