View Javadoc

1   /*
2    * @(#)$Id: DefaultPanel.java 739 2009-08-14 18:59:10Z 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   * 23.03.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.view.admin.panel;
28  
29  import java.awt.Dimension;
30  import java.net.URL;
31  
32  import org.ximtec.igesture.tool.core.Controller;
33  import org.ximtec.igesture.tool.util.HtmlPanel;
34  import org.ximtec.igesture.tool.util.TitleFactory;
35  import org.ximtec.igesture.tool.view.AbstractPanel;
36  
37  /**
38   * This Panel is used if no panel is set for the given object.
39   *
40   * @author  UeliKurmann
41   * @version 1.0
42   * @since   igesture
43   */
44  public class DefaultPanel extends AbstractPanel {
45  
46     private static final String HTML_FILE = "html/adminTab.html";
47  
48  
49     public DefaultPanel(Controller controller, Object obj) {
50        super(controller);
51        init(obj);
52     }
53  
54     /**
55      * Init the panel
56      * @param obj
57      */
58     private void init(Object obj) {
59        setTitle(TitleFactory.createStaticTitle(obj.toString()));
60  
61        URL path = this.getClass().getClassLoader().getResource(HTML_FILE);
62  
63        HtmlPanel htmlPanel = new HtmlPanel(path, new Dimension(400, 400));
64  
65        setContent(htmlPanel);
66     }
67  
68  
69     @Override
70     public void refreshUILogic() {
71  
72     }
73  }