com.swfit.core.xhtml
Class XHTMLStyle

java.lang.Object
  |
  +--com.swfit.core.xhtml.XHTMLStyle

public final class XHTMLStyle
extends java.lang.Object

A set of three ready made styles based on size, and shorthand methods of rendering them. There are some issues concerning the names of styles:

in CSS1, selectors (element names, classes and IDs) can contain only the characters A-Z, 0-9, and Unicode characters 161-255, plus dash (-); they cannot start with a dash or a digit.

http://www.w3.org/TR/REC-CSS1#forward-compatible-parsing

This means that an underscore (char 95) can not be used, which is kind of tricky, as the underscore is a choice of instinct when naming systems. Why the underscore can't be used, I don't know, but to comply with the rules I have very strict checking, and only let through ascii letters and numbers and the dash.

Since:
SWFIT1.0
Version:
$Revision: 1.1 $ $Date: 2003/02/02 20:47:25 $
Author:
Olaf Havnes

Field Summary
static java.lang.String ARTICLE_IMAGE_TD
           
static java.lang.String ARTICLE_LINK
           
static java.lang.String ARTICLE_PARAGRAPH
           
static java.lang.String ARTICLE_TEXT_TD
           
static java.lang.String AUTHOR_LINK
           
static int DEFAULT_STYLE
           
static java.lang.String[] DESCRIPTIONS
           
static java.lang.String IMAGE_LIST_TD
           
static java.lang.String IMAGE_LIST_TEXT_TD
           
static java.lang.String IMAGE_PARAGRAPH
           
static java.lang.String IMAGE_TD
           
static java.lang.String IMAGE_TEXT_TD
           
static java.lang.String INFO_PARAGRAPH
           
static int LARGE_STYLE
           
static int LARGE_STYLE_IMP
           
static java.lang.String LINK_PARAGRAPH
           
static java.lang.String LINKLIST_ITEM
           
static java.lang.String LINKLIST_LIST
           
static java.lang.String MAIL_SEARCH_HEAD
           
static java.lang.String MAIL_SEARCH_LINK
           
static java.lang.String MAIL_SEARCH_TABLE
           
static java.lang.String MAIL_SEARCH_TD
           
static int NORMAL_STYLE
           
static int NORMAL_STYLE_IMP
           
static int SMALL_STYLE
           
static int SMALL_STYLE_IMP
           
static java.lang.String[] STYLES
           
 
Method Summary
static java.lang.StringBuffer setStyle(java.lang.StringBuffer str_b, java.lang.String style)
          Shorthand - set the class to a given style and check for illegal css1 chars
static java.lang.String style(int style)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL_STYLE

public static final int NORMAL_STYLE

SMALL_STYLE

public static final int SMALL_STYLE

LARGE_STYLE

public static final int LARGE_STYLE

NORMAL_STYLE_IMP

public static final int NORMAL_STYLE_IMP

SMALL_STYLE_IMP

public static final int SMALL_STYLE_IMP

LARGE_STYLE_IMP

public static final int LARGE_STYLE_IMP

DEFAULT_STYLE

public static final int DEFAULT_STYLE

STYLES

public static final java.lang.String[] STYLES

DESCRIPTIONS

public static final java.lang.String[] DESCRIPTIONS

ARTICLE_PARAGRAPH

public static final java.lang.String ARTICLE_PARAGRAPH

ARTICLE_TEXT_TD

public static final java.lang.String ARTICLE_TEXT_TD

ARTICLE_IMAGE_TD

public static final java.lang.String ARTICLE_IMAGE_TD

INFO_PARAGRAPH

public static final java.lang.String INFO_PARAGRAPH

AUTHOR_LINK

public static final java.lang.String AUTHOR_LINK

ARTICLE_LINK

public static final java.lang.String ARTICLE_LINK

LINKLIST_LIST

public static final java.lang.String LINKLIST_LIST

LINK_PARAGRAPH

public static final java.lang.String LINK_PARAGRAPH

LINKLIST_ITEM

public static final java.lang.String LINKLIST_ITEM

IMAGE_PARAGRAPH

public static final java.lang.String IMAGE_PARAGRAPH

IMAGE_TD

public static final java.lang.String IMAGE_TD

IMAGE_TEXT_TD

public static final java.lang.String IMAGE_TEXT_TD

IMAGE_LIST_TD

public static final java.lang.String IMAGE_LIST_TD

IMAGE_LIST_TEXT_TD

public static final java.lang.String IMAGE_LIST_TEXT_TD

MAIL_SEARCH_TABLE

public static final java.lang.String MAIL_SEARCH_TABLE

MAIL_SEARCH_TD

public static final java.lang.String MAIL_SEARCH_TD

MAIL_SEARCH_HEAD

public static final java.lang.String MAIL_SEARCH_HEAD

MAIL_SEARCH_LINK

public static final java.lang.String MAIL_SEARCH_LINK
Method Detail

style

public static final java.lang.String style(int style)

setStyle

public static final java.lang.StringBuffer setStyle(java.lang.StringBuffer str_b,
                                                    java.lang.String style)
Shorthand - set the class to a given style and check for illegal css1 chars


Swfit developer homepage
Copyright © 2003 Orgdot AS. All Rights Reserved.