Getantialias(), Gettexttemplate(), Settexttemplate(string) – MiG InfoCom MiG Calendar JavaBeans User Manual

Page 18: Getantialias, Gettexttemplate, Settexttemplate

Advertising
background image

(continued from last page)

Property: The template text that will show in the title of the shape. Since the title, or at least parts thereof, is different for
every activity but there is only one bean one has to use a template text that will be expanded for every painted activity.

Normally a template will look something like this:

"$startTime$-$endTimeExcl$ $description$"

however it is better to write it in code something like this:

ActivityInteractor.TEMPL_START_TIME.getName() + "-" +
ActivityInteractor.TEMPL_END_TIME_INCL.getName() + " " +
ActivityInteractor.TEMPL_DESCRIPTION.getName();

since

ActivityInteractor

is where the special templates is located.

If a special template isn't found the text between the

Interactor.TEMPLATE_CHAR ($)

chars will be converted to a

property and fetched from the activity such that:

"$assignedTo$"

will be converted to:

activity.getProperty(PropertyKey.getKey("assignedTo"));

This means that any property of the activity can be expanded with this template system.

Default is:

"$startTime$ - $endTimeExcl$ ($timeZoneShort$)"

.

Parameters:

s

- The new tempalte string.

See Also:

com.miginfocom.calendar.activity.ActivityInteractor

(for instance)

getTextTemplate

public String getTextTemplate()

Property: The template text for the main text. See

getTitleTemplate()

for and explanation of the template system

Default is:

"$summary$"

.

Returns:

The current template.

setTextTemplate

public void setTextTemplate(String s)

Property: The template text for the main text. See

getTitleTemplate()

for and explanation of the template system

Default is:

"$summary$"

.

Parameters:

s

- The new template.

getAntiAlias

public int getAntiAlias()

Property: The anti aliasing hint used when drawing the graphics for the shape. For instance

AA_HINT_ON

.

Returns:

Page 18 of 196

com.miginfocom.beans.ActivityAShapeBean

Advertising