[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Feature request: t:scheduleitem header  XML
Forum Index -> Development
Author Message
mreich

Power User
[Avatar]

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
[Thumb - schedule.jpg]
 Filename schedule.jpg [Disk] Download
 Description
 Filesize 12 Kbytes
 Downloaded:  336 time(s)

[WWW]
CaptainCasa

Power User
[Avatar]

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; }
 
 }
 
 
 
[Thumb - schedule.png]
 Filename schedule.png [Disk] Download
 Description
 Filesize 3 Kbytes
 Downloaded:  361 time(s)


Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

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
mreich

Power User
[Avatar]

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
[WWW]
CaptainCasa

Power User
[Avatar]

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
mreich

Power User
[Avatar]

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?
[WWW]
CaptainCasa

Power User
[Avatar]

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
mreich

Power User
[Avatar]

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 ;-)
[WWW]
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team