KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openbravo > erpCommon > utility > LeftTabsBar


1 /*
2  *************************************************************************
3  * The contents of this file are subject to the Openbravo Public License
4  * Version 1.0 (the "License"), being the Mozilla Public License
5  * Version 1.1 with a permitted attribution clause; you may not use this
6  * file except in compliance with the License. You may obtain a copy of
7  * the License at http://www.openbravo.com/legal/license.html
8  * Software distributed under the License is distributed on an "AS IS"
9  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
10  * License for the specific language governing rights and limitations
11  * under the License.
12  * The Original Code is Openbravo ERP.
13  * The Initial Developer of the Original Code is Openbravo SL
14  * All portions are Copyright (C) 2001-2006 Openbravo SL
15  * All Rights Reserved.
16  * Contributor(s): ______________________________________.
17  ************************************************************************
18 */

19 package org.openbravo.erpCommon.utility;
20
21 import org.openbravo.database.ConnectionProvider;
22 import org.apache.log4j.Logger ;
23
24 public class LeftTabsBar {
25   static Logger log4j = Logger.getLogger(LeftTabsBar.class);
26   ConnectionProvider conn;
27   String JavaDoc language = "en_US";
28   String JavaDoc servlet_action = "";
29   String JavaDoc base_direction = "";
30
31   public LeftTabsBar(ConnectionProvider _conn, String JavaDoc _language, String JavaDoc _action, String JavaDoc _baseDirection) {
32     this.conn = _conn;
33     this.language = _language;
34     this.servlet_action = _action;
35     this.base_direction = _baseDirection;
36   }
37
38   public String JavaDoc editionTemplate() {
39     StringBuffer JavaDoc text = new StringBuffer JavaDoc();
40     text.append("<table cellpadding=\"0\" cellspacing=\"0\" class=\"Main_ContentPane_LeftTabsBar\" id=\"tdLeftTabsBars\">\n");
41     text.append(" <tr>\n");
42     text.append(" <td class=\"Main_LeftTabsBar_bg_body\">\n");
43     text.append(" <table cellpadding=\"0\" cellspacing=\"0\" class=\"Main_LeftTabsBar\">\n");
44     text.append(" <tr>\n");
45     text.append(" <td class=\"Main_LeftTabsBar_bg_top\">\n");
46     text.append(" </td>\n");
47     text.append(" </tr>\n");
48     text.append(" <tr>\n");
49     text.append(" <td>\n");
50     text.append(" <A class=\"Main_LeftTabsBar_ButtonLeft\" HREF=\"#\" onclick=\"mostrarMenu('buttonMenu');return false;\">\n");
51     text.append(" <IMG class=\"Main_LeftTabsBar_ButtonLeft_Icon Main_LeftTabsBar_ButtonLeft_Icon_arrow_hide\" SRC=\"").append(base_direction).append("/images/blank.gif\" border=\"0\" id=\"buttonMenu\"></IMG>\n");
52     text.append(" </A>\n");
53     text.append(" </td>\n");
54     text.append(" </tr>\n");
55     text.append(" <tr>\n");
56     text.append(" <td class=\"Main_LeftTabsBar_bg_separator_cell\">\n");
57     text.append(" </td>\n");
58     text.append(" </tr>\n");
59     text.append(" <tr>\n");
60     text.append(" <td>\n");
61     text.append(" <DIV class=\"Main_LeftTabsBar_ButtonRight_selected\">\n");
62     text.append(" <IMG class=\"Main_LeftTabsBar_ButtonRight_Icon Main_LeftTabsBar_ButtonRight_Icon_edition_selected\" SRC=\"").append(base_direction).append("/images/blank.gif\" border=\"0\"></IMG>\n");
63     text.append(" </DIV>\n");
64     text.append(" </td>\n");
65     text.append(" </tr>\n");
66     text.append(" <tr>\n");
67     text.append(" <td>\n");
68     text.append(" <A class=\"Main_LeftTabsBar_ButtonRight\" HREF=\"#\" onClick=\"submitCommandForm('RELATION', false, null, '").append(servlet_action).append("', '_self', null, true);return false;\">\n");
69     text.append(" <IMG class=\"Main_LeftTabsBar_ButtonRight_Icon Main_LeftTabsBar_ButtonRight_Icon_relation\" SRC=\"").append(base_direction).append("/images/blank.gif\" border=\"0\"></IMG>\n");
70     text.append(" </A>\n");
71     text.append(" </td>\n");
72     text.append(" </tr>\n");
73     text.append(" <tr>\n");
74     text.append(" <td class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
75     text.append(" </td>\n");
76     text.append(" </tr>\n");
77     text.append(" </table>\n");
78     text.append(" </td>\n");
79     text.append(" </tr>\n");
80     text.append(" <tr class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
81     text.append(" <td class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
82     text.append(" </td>\n");
83     text.append(" </tr>\n");
84     text.append("</table>\n");
85     return text.toString();
86   }
87
88   public String JavaDoc relationTemplate() {
89     StringBuffer JavaDoc text = new StringBuffer JavaDoc();
90     text.append("<table cellpadding=\"0\" cellspacing=\"0\" class=\"Main_ContentPane_LeftTabsBar\" id=\"tdLeftTabsBars\">\n");
91     text.append(" <tr>\n");
92     text.append(" <td class=\"Main_LeftTabsBar_bg_body\">\n");
93     text.append(" <table cellpadding=\"0\" cellspacing=\"0\" class=\"Main_LeftTabsBar\">\n");
94     text.append(" <tr>\n");
95     text.append(" <td class=\"Main_LeftTabsBar_bg_top\">\n");
96     text.append(" </td>\n");
97     text.append(" </tr>\n");
98     text.append(" <tr>\n");
99     text.append(" <td>\n");
100     text.append(" <A class=\"Main_LeftTabsBar_ButtonLeft\" HREF=\"#\" onclick=\"mostrarMenu('buttonMenu');return false;\">\n");
101     text.append(" <IMG class=\"Main_LeftTabsBar_ButtonLeft_Icon Main_LeftTabsBar_ButtonLeft_Icon_arrow_hide\" SRC=\"").append(base_direction).append("/images/blank.gif\" border=\"0\" id=\"buttonMenu\"></IMG>\n");
102     text.append(" </A>\n");
103     text.append(" </td>\n");
104     text.append(" </tr>\n");
105     text.append(" <tr>\n");
106     text.append(" <td class=\"Main_LeftTabsBar_bg_separator_cell\">\n");
107     text.append(" </td>\n");
108     text.append(" </tr>\n");
109     text.append(" <tr>\n");
110     text.append(" <td>\n");
111     text.append(" <A class=\"Main_LeftTabsBar_ButtonRight\" HREF=\"#\" onClick=\"submitCommandForm('EDIT', true, null, '").append(servlet_action).append("', '_self', null, false);return false;\">\n");
112     text.append(" <IMG class=\"Main_LeftTabsBar_ButtonRight_Icon Main_LeftTabsBar_ButtonRight_Icon_edition\" SRC=\"").append(base_direction).append("/images/blank.gif\" border=\"0\"></IMG>\n");
113     text.append(" </A>\n");
114     text.append(" </td>\n");
115     text.append(" </tr>\n");
116     text.append(" <tr>\n");
117     text.append(" <td>\n");
118     text.append(" <DIV class=\"Main_LeftTabsBar_ButtonRight_selected\">\n");
119     text.append(" <IMG class=\"Main_LeftTabsBar_ButtonRight_Icon Main_LeftTabsBar_ButtonRight_Icon_relation_selected\" SRC=\"").append(base_direction).append("/images/blank.gif\" border=\"0\"></IMG>\n");
120     text.append(" </DIV>\n");
121     text.append(" </td>\n");
122     text.append(" </tr>\n");
123     text.append(" <tr>\n");
124     text.append(" <td class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
125     text.append(" </td>\n");
126     text.append(" </tr>\n");
127     text.append(" </table>\n");
128     text.append(" </td>\n");
129     text.append(" </tr>\n");
130     text.append(" <tr class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
131     text.append(" <td class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
132     text.append(" </td>\n");
133     text.append(" </tr>\n");
134     text.append("</table>\n");
135     return text.toString();
136   }
137
138   public String JavaDoc manualTemplate() {
139     StringBuffer JavaDoc text = new StringBuffer JavaDoc();
140     text.append("<table cellpadding=\"0\" cellspacing=\"0\" class=\"Main_ContentPane_LeftTabsBar\" id=\"tdLeftTabsBars\">\n");
141     text.append(" <tr>\n");
142     text.append(" <td class=\"Main_LeftTabsBar_bg_body\">\n");
143     text.append(" <table cellpadding=\"0\" cellspacing=\"0\" class=\"Main_LeftTabsBar\">\n");
144     text.append(" <tr>\n");
145     text.append(" <td class=\"Main_LeftTabsBar_bg_top\">\n");
146     text.append(" </td>\n");
147     text.append(" </tr>\n");
148     text.append(" <tr>\n");
149     text.append(" <td>\n");
150     text.append(" <A class=\"Main_LeftTabsBar_ButtonLeft\" HREF=\"#\" onclick=\"mostrarMenu('buttonMenu');return false;\">\n");
151     text.append(" <IMG class=\"Main_LeftTabsBar_ButtonLeft_Icon Main_LeftTabsBar_ButtonLeft_Icon_arrow_hide\" SRC=\"").append(base_direction).append("/images/blank.gif\" border=\"0\" id=\"buttonMenu\"></IMG>\n");
152     text.append(" </A>\n");
153     text.append(" </td>\n");
154     text.append(" </tr>\n");
155     text.append(" <tr>\n");
156     text.append(" <td class=\"Main_LeftTabsBar_bg_separator_cell\">\n");
157     text.append(" </td>\n");
158     text.append(" </tr>\n");
159     text.append(" <tr>\n");
160     text.append(" <td class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
161     text.append(" </td>\n");
162     text.append(" </tr>\n");
163     text.append(" </table>\n");
164     text.append(" </td>\n");
165     text.append(" </tr>\n");
166     text.append(" <tr class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
167     text.append(" <td class=\"Main_LeftTabsBar_bg_empty_cell\">\n");
168     text.append(" </td>\n");
169     text.append(" </tr>\n");
170     text.append("</table>\n");
171     return text.toString();
172   }
173 }
174
Popular Tags