View unanswered posts | View active topics It is currently Sun May 28, 2017 7:42 am



This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
 Crop two shapes to visible bounds 
Author Message

Joined: Wed Jan 05, 2011 4:57 pm
Posts: 4
Post Crop two shapes to visible bounds
Hello,
I have to create a shape with an icon and following text. -> No Problem
But if the activity is longer than one day and I choosed in the day view the second day, only the text will be displayed.

I have used the BeanDemo and seted the folowing shape to the topDayArea.

In this example I used two TextAShapes with the same behavior, only the second text will be displayed at the second day.

Code:
   public static RootAShape createDarkGrayShape()
   {
      TextAShape textAShape = new TextAShape();
      textAShape.setAttribute(AShape.A_TEXT, "Test");
      textAShape.setAttribute(TextAShape.A_FONT, new Font("SansSerif", Font.PLAIN, 11));
      textAShape.setAttribute(TextAShape.A_PAINT, Color.BLACK);
      textAShape.setAttribute(AShape.A_CLIP_TYPE, AShape.CLIP_PARENT_BOUNDS);

      TextAShape textAShape2 = new TextAShape();
      textAShape2.setAttribute(AShape.A_TEXT, "blabla");
      textAShape2.setAttribute(TextAShape.A_FONT, new Font("SansSerif", Font.PLAIN, 11));
      textAShape2.setAttribute(TextAShape.A_PAINT, Color.BLACK);
      textAShape2.setAttribute(AShape.A_CLIP_TYPE, AShape.CLIP_PARENT_BOUNDS);
      
      FillAShape background = new FillAShape();
      background.setAttribute(AShape.A_PAINT, Color.GREEN);
      background.setAttribute(AShape.A_SHAPE, new RoundRectangle(0, 0, 1, 1, 5, 5));
      background.setAttribute(AShape.A_CROP_TO_VISIBILITY_BOUNDS, Boolean.TRUE);

      AtRefNumber[] hSizes = new AtRefNumber[] {new AtFixed(30f), new AtFraction(1), new AtFixed(12)};
      RowAShapeLayout vRowLayout = new RowAShapeLayout(SwingConstants.HORIZONTAL, hSizes);
      background.setAttribute(AShape.A_LAYOUT, vRowLayout);
      
      ContainerAShape container = new ContainerAShape();

      background.addSubShape(textAShape);
      background.addSubShape(textAShape2);

      container.addSubShape(background);
      
      RootAShape root = new RootAShape(container);
      return root;
}


Tue Apr 12, 2011 12:33 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Crop two shapes to visible bounds
Hello,

Please submit a support ticket if you want support for MiG Calendar.

Thanks,


Tue Apr 12, 2011 3:03 pm
Profile WWW

Joined: Wed Jan 05, 2011 4:57 pm
Posts: 4
Post Re: Crop two shapes to visible bounds
the ticket system is not reachable!!


Tue Apr 12, 2011 3:06 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Crop two shapes to visible bounds
Ooops, that should not be. I'll check it asap.


Tue Apr 12, 2011 3:08 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Crop two shapes to visible bounds
Hello again,

It is working now.

Thanks,


Tue Apr 12, 2011 3:32 pm
Profile WWW

Joined: Wed Jan 05, 2011 4:57 pm
Posts: 4
Post Re: Crop two shapes to visible bounds
Ticket submitted


Tue Apr 12, 2011 3:37 pm
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 6 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.