01: // @@
02: // @@
03: /*
04: * Wi.Ser Framework
05: *
06: * Version: 1.8.1, 20-September-2007
07: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
08: *
09: * This library is free software; you can redistribute it and/or
10: * modify it under the terms of the GNU Lesser General Public
11: * License as published by the Free Software Foundation; either
12: * version 2 of the License, or (at your option) any later version.
13: *
14: * This library is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17: * Lesser General Public License for more details.
18: *
19: * You should have received a copy of the GNU Lesser General Public
20: * License along with this library located in LGPL.txt in the
21: * license directory; if not, write to the
22: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23: * Boston, MA 02111-1307, USA.
24: *
25: * If this agreement does not cover your requirements, please contact us
26: * via email to get detailed information about the commercial license
27: * or our service offerings!
28: *
29: */
30: // @@
31: package de.ug2t.channel.markup.html;
32:
33: public class HtmlTools {
34: public static String pcmf_getAlignCssText(String xAlign) {
35: if (xAlign.equalsIgnoreCase("WEST"))
36: return ("left");
37: else if (xAlign.equalsIgnoreCase("EAST"))
38: return ("right");
39: else if (xAlign.equalsIgnoreCase("NORTH"))
40: return ("center");
41: else if (xAlign.equalsIgnoreCase("SOUTH"))
42: return ("center");
43: else if (xAlign.equalsIgnoreCase("CENTER"))
44: return ("center");
45: else if (xAlign.equalsIgnoreCase("NORTHWEST"))
46: return ("left");
47: else if (xAlign.equalsIgnoreCase("NORTHEAST"))
48: return ("right");
49: else if (xAlign.equalsIgnoreCase("SOUTHWEST"))
50: return ("left");
51: else if (xAlign.equalsIgnoreCase("SOUTHEAST"))
52: return ("right");
53:
54: return ("center");
55: };
56:
57: public static String pcmf_getAlignCssVertical(String xAlign) {
58: if (xAlign.equalsIgnoreCase("WEST"))
59: return ("middle");
60: else if (xAlign.equalsIgnoreCase("EAST"))
61: return ("middle");
62: else if (xAlign.equalsIgnoreCase("NORTH"))
63: return ("top");
64: else if (xAlign.equalsIgnoreCase("SOUTH"))
65: return ("bottom");
66: else if (xAlign.equalsIgnoreCase("CENTER"))
67: return ("middle");
68: else if (xAlign.equalsIgnoreCase("NORTHWEST"))
69: return ("top");
70: else if (xAlign.equalsIgnoreCase("NORTHEAST"))
71: return ("top");
72: else if (xAlign.equalsIgnoreCase("SOUTHWEST"))
73: return ("bottom");
74: else if (xAlign.equalsIgnoreCase("SOUTHEAST"))
75: return ("bottom");
76:
77: return ("middle");
78: };
79: }
|