Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/01/2010 16:34:30
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
Hi,
would it be possible to a add a kind of header to t:scheduleitem, where you can define font, foreground, background (maybe through style)?
Markus
|
Filename |
schedule.jpg |
Download
|
Description |
|
Filesize |
12 Kbytes
|
Downloaded: |
336 time(s) |
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/01/2010 17:20:40
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 21/11/2007 12:23:06
Messages: 5542
Offline
|
Hi,
by using bgpaint and text you can do something very similar... (see attached screenshot)
Regards, Björn
Code:
jsp:
<t:schedule id="g_5" background="#f0f0f0" height="100%" numberofblocks="10" orientation="vertical" schedulemax="10" width="200" >
<t:scheduleitem id="g_6" background="#C0FFC0" bgpaint="#{d.Test9UI.scheduleHeadline}" scheduleleft="3" schedulewidth="2" text="#{d.Test9UI.scheduleText}" />
</t:schedule>
java:
public class Test9UI implements Serializable
{
protected String m_scheduleHeadline = "rectangle(0,0,100%,16,#00000080);write(5,0,Headline Text,12,#FFFFFF,lefttop)";
public String getScheduleHeadline() { return m_scheduleHeadline; }
public void setScheduleHeadline(String value) { m_scheduleHeadline = value; }
protected String m_scheduleText = "\nMein Vater erklärt mir jeden Abend unsere neun Planeten.";
public String getScheduleText() { return m_scheduleText; }
public void setScheduleText(String value) { m_scheduleText = value; }
}
|
Filename |
schedule.png |
Download
|
Description |
|
Filesize |
3 Kbytes
|
Downloaded: |
361 time(s) |
|
Björn Müller, CaptainCasa GmbH |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/01/2010 17:21:32
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 21/11/2007 12:23:06
Messages: 5542
Offline
|
...forgot to mention: of course you can add images etc. etc. via bgpaint...
Björn
|
Björn Müller, CaptainCasa GmbH |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/01/2010 17:46:33
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
great, I was on the same trip, but I thought I had to use for normal text bgpaint too, so cr/lf would cause some problems. But using the leading \n didn't come to my mind
This was my horrible construct:
Code:
rectangle(0,0,100,20,#FF0000);rectangle(0,20,100,100,#FF000020);write(5,0,9.00 - 10.00,lefttop);write(5,20,Beschreibung,lefttop)
regards
Markus
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/01/2010 17:52:42
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 21/11/2007 12:23:06
Messages: 5542
Offline
|
Hi,
it's not too horrible!
Please pay attention: when setting the headline bgpaint: any comma in the text needs to be replaced by "\," any semicolon needs to be replace by "\;".
Björn
|
Björn Müller, CaptainCasa GmbH |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/01/2010 17:57:40
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
ok, but using write for the text would mean no auto. wrapping, because the text is created with java graphics, or am I completely wong?
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/01/2010 19:07:11
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 21/11/2007 12:23:06
Messages: 5542
Offline
|
Yes, you are right... this is true for the headline, which is painted by using bgpaint-write...
Björn
PS: Maybe it would be nice one day to provide a second form of SCHEULDITEM which just opens up a container pane, in which you then can arrange sub-components as you like. The only restriction in this case would be rendering performance (in case of manny items...).
|
Björn Müller, CaptainCasa GmbH |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/01/2010 19:12:05
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
ok, this feature would be nice, but with your mentioned solution I think I can fullfill my customers wishlist ;-)
|
|
![](/forum/templates/default/images/spacer.gif) |
|