LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web
Class LyWebDecoration

java.lang.Object
  extended by leon.view.web.LyWebDecoration
Direct Known Subclasses:
LyJQDecoration, LyStrutsDecoration

public class LyWebDecoration
extends java.lang.Object

This class defines static parts of the web decoration switch the choosen skin. It must be inherited in order to generate HTML pages.


Field Summary
static java.lang.String __VERSION
           
static int AREA_BORDER_BEGIN
          Decoration code relative to area border begining.
static int AREA_BORDER_BEGIN_NOT_FULL_HEIGHT
          Decoration code relative to area border begining without a full height.
static int AREA_BORDER_BEGIN_NOT_FULL_WIDTH
          Decoration code relative to area border begining without a full width.
static int AREA_BORDER_BEGIN_NOT_FULL_WIDTH_AND_HEIGHT
          Decoration code relative to area border begining without a full width and height.
static int AREA_BORDER_END
          Decoration code relative to area border end.
static int AREA_BORDER_LEFT
          Decoration code relative to area border left side.
static int AREA_BORDER_LEFT_NOT_FULL_HEIGHT
          Decoration code relative to area border left side without a full height.
static int AREA_BORDER_LEFT_NOT_FULL_WIDTH
          Decoration code relative to area border left side without a full width.
static int AREA_BORDER_LEFT_NOT_FULL_WIDTH_AND_HEIGHT
          Decoration code relative to area border left side without a full width and height.
static int AREA_BORDER_RIGHT
          Decoration code relative to area border right side.
static int CLOSE_ZONE
          Decoration code relative close zone.
static int CONTENT_BEGIN
          Decoration code relative to the content begining.
static int CONTENT_BEGIN_FULL_HEIGHT
          Decoration code relative to the content begining with full height.
static int CONTENT_END
          Decoration code relative to the content end.
static int CONTENT_FOOTER
          Decoration code relative to the content footer.
static int CONTENT_LEFT
          Decoration code relative to the left of the content.
static int CONTENT_RIGHT
          Decoration code relative to the right of the content.
static int CONTENT_TOP
          Decoration code relative to the top of the content.
static int FORM_FIELDS_BEGIN
          Decoration code relative to the form field begining.
static int FORM_FIELDS_END
          Decoration code relative to the form field end.
static int HEADER_BAR_BEGIN
          Decoration code relative to the header bar begining.
static int HEADER_BAR_END
          Decoration code relative to the header bar end.
static int HORIZONTAL_TOOLBAR_BEGIN
          Decoration code relative to horizontal toolbar begining.
static int INNER_WINDOW_BEGIN
          Decoration code relative inner window begining.
static int OPEN_ZONE_1
          Decoration code relative open zone.
static int TOOLBAR_LABEL
          Decoration code relative to the toolbar label.
static int TOOLBAR_LABEL_END
          Decoration code relative to the toolbar end of the label.
static int VERTICAL_TOOLBAR_BEGIN
          Decoration code relative to vertical toolbar begining.
static int VERTICAL_TOOLBAR_END
          Decoration code relative to vertical toolbar end.
static int VERTICAL_TOOLBAR_LEFT
          Decoration code relative to vertical toolbar left side.
static int VERTICAL_TOOLBAR_RIGHT
          Decoration code relative to vertical toolbar right side.
static int WINDOW_BEGIN
          Decoration code relative to the window begining.
static int WINDOW_BEGIN_NOT_FULL_HEIGHT
          Decoration code relative to the window begining without a full height.
static int WINDOW_BOTTOM
          Decoration code relative to the window bottom.
static int WINDOW_END
          Decoration code relative to the window end.
static int WINDOW_HEADER_LEFT
          Decoration code relative to the left window's header side.
static int WINDOW_HEADER_RIGHT
          Decoration code relative to the right window's header side.
static int WINDOW_LEFT
          Decoration code relative to the window left side.
static int WINDOW_RIGHT
          Decoration code relative to the window right side.
static int WINDOW_TOP
          Decoration code relative to the window top.
 
Constructor Summary
LyWebDecoration(LyEnvironment environment)
          Default protected constructor.
 
Method Summary
 java.lang.String getBodyClassString(LyWebPageWriter writer)
          Returns the CSS class string to be used for body tag of a page writer.
 java.lang.String getClassName(LyComponent component, int type, LyWebPageWriter pw)
          Returns the CSS class name to be used for given component and page writer.
 java.lang.String getClassName(LyComponent component, LyWebPageWriter pw)
          Returns the CSS class name to be used for given component and page writer.
static int getClosingDecoration(int whatToShow)
          Method used to get code of the related closing decoration.
static int getOpeningDecoration(int whatToShow)
          Method used to get code of the related opening decoration.
 java.lang.String getPageDecoration(int whatToShow)
          Method used to produce the decoration (skin) as a String.
 java.lang.String getPageDecoration(int whatToShow, java.lang.Object param)
          Method used to produce the decoration (skin) as a String.
 java.lang.String getSkinFile()
          Gets the current skin.
 java.lang.String getSkinPath()
          Gets the path of current skin.
 java.lang.String getSpecificCSSFile()
          Gets the url of the specific CSS file.
 boolean isUsingDefaultBackground()
          Indicates if we may use the default background from ressources (or if it is managed by the skin).
 boolean needPageDecoration(LyWebPageWriter pw, int whatToShow)
          Method used to check if we may apply this decoration or not (avoid duplicate border).
 void setEnvironment(LyEnvironment environment)
          Sets the current environment.
 void setSkinFile(java.lang.String skinFile, LyEnvironment environment)
          Sets the skin and initialize the environment.
 void writePageDecoration(LyWebPageWriter pw, int whatToShow)
          Method used to set the decoration (skin) into the specified writer.
 void writePageDecoration(LyWebPageWriter pw, int whatToShow, java.lang.Object param)
          Method used to set the decoration (skin) into the specified writer.
 void writePageDecoration(java.io.Writer pw, int whatToShow)
          Method used to set the decoration (skin) into the specified writer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

WINDOW_BEGIN

public static final int WINDOW_BEGIN
Decoration code relative to the window begining.

See Also:
Constant Field Values

WINDOW_END

public static final int WINDOW_END
Decoration code relative to the window end.

See Also:
Constant Field Values

WINDOW_LEFT

public static final int WINDOW_LEFT
Decoration code relative to the window left side.

See Also:
Constant Field Values

WINDOW_RIGHT

public static final int WINDOW_RIGHT
Decoration code relative to the window right side.

See Also:
Constant Field Values

WINDOW_TOP

public static final int WINDOW_TOP
Decoration code relative to the window top.

See Also:
Constant Field Values

WINDOW_BOTTOM

public static final int WINDOW_BOTTOM
Decoration code relative to the window bottom.

See Also:
Constant Field Values

WINDOW_HEADER_LEFT

public static final int WINDOW_HEADER_LEFT
Decoration code relative to the left window's header side.

See Also:
Constant Field Values

WINDOW_HEADER_RIGHT

public static final int WINDOW_HEADER_RIGHT
Decoration code relative to the right window's header side.

See Also:
Constant Field Values

HEADER_BAR_BEGIN

public static final int HEADER_BAR_BEGIN
Decoration code relative to the header bar begining.

See Also:
Constant Field Values

HEADER_BAR_END

public static final int HEADER_BAR_END
Decoration code relative to the header bar end.

See Also:
Constant Field Values

CONTENT_BEGIN

public static final int CONTENT_BEGIN
Decoration code relative to the content begining.

See Also:
Constant Field Values

CONTENT_BEGIN_FULL_HEIGHT

public static final int CONTENT_BEGIN_FULL_HEIGHT
Decoration code relative to the content begining with full height.

See Also:
Constant Field Values

CONTENT_TOP

public static final int CONTENT_TOP
Decoration code relative to the top of the content.

See Also:
Constant Field Values

CONTENT_LEFT

public static final int CONTENT_LEFT
Decoration code relative to the left of the content.

See Also:
Constant Field Values

CONTENT_RIGHT

public static final int CONTENT_RIGHT
Decoration code relative to the right of the content.

See Also:
Constant Field Values

CONTENT_FOOTER

public static final int CONTENT_FOOTER
Decoration code relative to the content footer.

See Also:
Constant Field Values

CONTENT_END

public static final int CONTENT_END
Decoration code relative to the content end.

See Also:
Constant Field Values

FORM_FIELDS_BEGIN

public static final int FORM_FIELDS_BEGIN
Decoration code relative to the form field begining.

See Also:
Constant Field Values

FORM_FIELDS_END

public static final int FORM_FIELDS_END
Decoration code relative to the form field end.

See Also:
Constant Field Values

TOOLBAR_LABEL

public static final int TOOLBAR_LABEL
Decoration code relative to the toolbar label.

See Also:
Constant Field Values

TOOLBAR_LABEL_END

public static final int TOOLBAR_LABEL_END
Decoration code relative to the toolbar end of the label.

See Also:
Constant Field Values

WINDOW_BEGIN_NOT_FULL_HEIGHT

public static final int WINDOW_BEGIN_NOT_FULL_HEIGHT
Decoration code relative to the window begining without a full height.

See Also:
Constant Field Values

OPEN_ZONE_1

public static final int OPEN_ZONE_1
Decoration code relative open zone.

See Also:
Constant Field Values

CLOSE_ZONE

public static final int CLOSE_ZONE
Decoration code relative close zone.

See Also:
Constant Field Values

INNER_WINDOW_BEGIN

public static final int INNER_WINDOW_BEGIN
Decoration code relative inner window begining.

See Also:
Constant Field Values

AREA_BORDER_BEGIN

public static final int AREA_BORDER_BEGIN
Decoration code relative to area border begining.

See Also:
Constant Field Values

AREA_BORDER_BEGIN_NOT_FULL_WIDTH

public static final int AREA_BORDER_BEGIN_NOT_FULL_WIDTH
Decoration code relative to area border begining without a full width.

See Also:
Constant Field Values

AREA_BORDER_BEGIN_NOT_FULL_HEIGHT

public static final int AREA_BORDER_BEGIN_NOT_FULL_HEIGHT
Decoration code relative to area border begining without a full height.

See Also:
Constant Field Values

AREA_BORDER_BEGIN_NOT_FULL_WIDTH_AND_HEIGHT

public static final int AREA_BORDER_BEGIN_NOT_FULL_WIDTH_AND_HEIGHT
Decoration code relative to area border begining without a full width and height.

See Also:
Constant Field Values

AREA_BORDER_LEFT

public static final int AREA_BORDER_LEFT
Decoration code relative to area border left side.

See Also:
Constant Field Values

AREA_BORDER_LEFT_NOT_FULL_WIDTH

public static final int AREA_BORDER_LEFT_NOT_FULL_WIDTH
Decoration code relative to area border left side without a full width.

See Also:
Constant Field Values

AREA_BORDER_LEFT_NOT_FULL_HEIGHT

public static final int AREA_BORDER_LEFT_NOT_FULL_HEIGHT
Decoration code relative to area border left side without a full height.

See Also:
Constant Field Values

AREA_BORDER_LEFT_NOT_FULL_WIDTH_AND_HEIGHT

public static final int AREA_BORDER_LEFT_NOT_FULL_WIDTH_AND_HEIGHT
Decoration code relative to area border left side without a full width and height.

See Also:
Constant Field Values

AREA_BORDER_RIGHT

public static final int AREA_BORDER_RIGHT
Decoration code relative to area border right side.

See Also:
Constant Field Values

AREA_BORDER_END

public static final int AREA_BORDER_END
Decoration code relative to area border end.

See Also:
Constant Field Values

VERTICAL_TOOLBAR_BEGIN

public static final int VERTICAL_TOOLBAR_BEGIN
Decoration code relative to vertical toolbar begining.

See Also:
Constant Field Values

VERTICAL_TOOLBAR_LEFT

public static final int VERTICAL_TOOLBAR_LEFT
Decoration code relative to vertical toolbar left side.

See Also:
Constant Field Values

VERTICAL_TOOLBAR_RIGHT

public static final int VERTICAL_TOOLBAR_RIGHT
Decoration code relative to vertical toolbar right side.

See Also:
Constant Field Values

VERTICAL_TOOLBAR_END

public static final int VERTICAL_TOOLBAR_END
Decoration code relative to vertical toolbar end.

See Also:
Constant Field Values

HORIZONTAL_TOOLBAR_BEGIN

public static final int HORIZONTAL_TOOLBAR_BEGIN
Decoration code relative to horizontal toolbar begining.

See Also:
Constant Field Values
Constructor Detail

LyWebDecoration

public LyWebDecoration(LyEnvironment environment)
Default protected constructor. Use getInstance() to acces to this decoration. Sets the environment.

Parameters:
environment - the application environment
Method Detail

getClosingDecoration

public static int getClosingDecoration(int whatToShow)
Method used to get code of the related closing decoration.

Parameters:
whatToShow - the code of the opening decoration
Returns:
the closing decoration code or -1 if no match found

getOpeningDecoration

public static int getOpeningDecoration(int whatToShow)
Method used to get code of the related opening decoration.

Parameters:
whatToShow - the code of the closing decoration
Returns:
the closing decoration code or -1 if no match found

setEnvironment

public void setEnvironment(LyEnvironment environment)
Sets the current environment.

Parameters:
environment - the environment

setSkinFile

public void setSkinFile(java.lang.String skinFile,
                        LyEnvironment environment)
Sets the skin and initialize the environment.

Parameters:
skinFile - the skin
environment - the environment
See Also:
getSkinFile()

writePageDecoration

public void writePageDecoration(LyWebPageWriter pw,
                                int whatToShow)
Method used to set the decoration (skin) into the specified writer.

Parameters:
pw - writer to write piece of decoration to
whatToShow - what part of the decoration shall be written (see static values)

writePageDecoration

public void writePageDecoration(LyWebPageWriter pw,
                                int whatToShow,
                                java.lang.Object param)
Method used to set the decoration (skin) into the specified writer.

Parameters:
pw - writer to write piece of decoration to
whatToShow - what part of the decoration shall be written (see static values)
param - parameter of the decoration to be produced

writePageDecoration

public void writePageDecoration(java.io.Writer pw,
                                int whatToShow)
                         throws java.io.IOException
Method used to set the decoration (skin) into the specified writer.

Parameters:
pw - writer to write piece of decoration to
whatToShow - what part of the decoration shall be written (see static values)
Throws:
java.io.IOException

needPageDecoration

public boolean needPageDecoration(LyWebPageWriter pw,
                                  int whatToShow)
Method used to check if we may apply this decoration or not (avoid duplicate border).

Parameters:
pw - writer to write piece of decoration to
whatToShow - what part of the decoration shall be written (see static values)
Returns:
true if Ok to add decoration

getPageDecoration

public java.lang.String getPageDecoration(int whatToShow)
Method used to produce the decoration (skin) as a String.

Parameters:
whatToShow - decoration code of the part that shall be written (see static values)
Returns:
the HTML result

getPageDecoration

public java.lang.String getPageDecoration(int whatToShow,
                                          java.lang.Object param)
Method used to produce the decoration (skin) as a String.

Parameters:
whatToShow - decoration code of the part that shall be written (see static values)
param - parameter of the decoration to be produced
Returns:
the HTML result

isUsingDefaultBackground

public boolean isUsingDefaultBackground()
Indicates if we may use the default background from ressources (or if it is managed by the skin).

Returns:
usage status

getSkinFile

public java.lang.String getSkinFile()
Gets the current skin.

Returns:
the current skin
See Also:
#setSkin(String, LyEnvironment)

getSkinPath

public java.lang.String getSkinPath()
Gets the path of current skin.

Returns:
the path of current skin

getSpecificCSSFile

public java.lang.String getSpecificCSSFile()
Gets the url of the specific CSS file.

Returns:
the url of the specific CSS file or null if no specific CSS file is used.

getBodyClassString

public java.lang.String getBodyClassString(LyWebPageWriter writer)
Returns the CSS class string to be used for body tag of a page writer.

Parameters:
writer - the page writer generating the body tag.
Returns:
the CSS class string or null if no special class string has to be used.

getClassName

public java.lang.String getClassName(LyComponent component,
                                     LyWebPageWriter pw)
Returns the CSS class name to be used for given component and page writer.

Parameters:
component - the component used to generate HTML code.
pw - current page writer.
Returns:
the name of the CSS class to be used for given component.

getClassName

public java.lang.String getClassName(LyComponent component,
                                     int type,
                                     LyWebPageWriter pw)
Returns the CSS class name to be used for given component and page writer.
This method may be overridden in order to change the CCS class name for a specific component.

Parameters:
component - the component used to generate HTML code.
type - the type of the class to be generated. Depends on the class of the component.
pw - current page writer.
Returns:
the name of the CSS class to be used for given component.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com