View Javadoc

1   /*
2    * @(#)$Id: TitleFactory.java 742 2009-08-15 17:15:49Z kurmannu $
3    *
4    * Author		:	Ueli Kurmann, igesture@uelikurmann.ch
5    *                  
6    *
7    * Purpose		: 
8    *
9    * -----------------------------------------------------------------------
10   *
11   * Revision Information:
12   *
13   * Date				Who			Reason
14   *
15   * 08.04.2008			ukurmann	Initial Release
16   *
17   * -----------------------------------------------------------------------
18   *
19   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20   *
21   * This software is the proprietary information of ETH Zurich.
22   * Use is subject to license terms.
23   * 
24   */
25  
26  
27  package org.ximtec.igesture.tool.util;
28  
29  import javax.swing.BorderFactory;
30  import javax.swing.JLabel;
31  
32  import org.ximtec.igesture.core.DataObject;
33  import org.ximtec.igesture.tool.binding.BindingFactory;
34  
35  
36  
37  /**
38   * Comment
39   * @version 1.0 08.04.2008
40   * @author Ueli Kurmann
41   */
42  public class TitleFactory {
43     
44     public static JLabel createStaticTitle(String s){
45        JLabel title = new JLabel(s);
46        title.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
47        title.setFont(FontFactory.getArialBold(24));
48        return title;
49     }
50  
51     public static JLabel createDynamicTitle(DataObject obj, String property){
52        JLabel title = new JLabel();
53        BindingFactory.createInstance(title, obj, property);
54        title.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
55        title.setFont(FontFactory.getArialBold(24));
56        return title;
57     }
58  
59  }