de.hs_rm.cs.lecturenotes.client.core.presentation.ui
Class IconHTML

java.lang.Object
  extended by de.hs_rm.cs.lecturenotes.client.core.presentation.ui.IconHTML

public final class IconHTML
extends java.lang.Object

Holds some predefined HTML targets.

Version:
$LastChangedRevision: 242 $
Author:
Enrico Homann

Field Summary
static java.lang.String ANNOTATION_DOCENT
          Docent Annotation Image.
static java.lang.String[] MONSTERS
          Some monsters.
static java.lang.String PATH_ROOTSRC
          Root Path for HTTP access.
 
Method Summary
static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler, IconHTMLEnum key, java.lang.String title)
          Will return a HTML object with the given picture specified by IconHTMLEnum key that can be seen as a link button in HTML.
static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler, IconHTMLEnum key, java.lang.String title, java.lang.String anchorLabel)
          Will return a HTML object with the given picture specified by IconHTMLEnum key that can be seen as a link button in HTML.
static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler, IconHTMLEnum key, java.lang.String title, java.lang.String anchorLabel, java.lang.String imgAttributes)
          Will return a HTML object with the given picture specified by IconHTMLEnum key that can be seen as a link button in HTML.
static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler, java.lang.String anchorLabel, boolean showBrackets)
          Will return a HTML object with no image at all but a ClickHandler.
static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler, java.lang.String anchorLabel, java.lang.String prefix, java.lang.String appendix)
          Will return a HTML object with no image at all but a ClickHandler.
static java.lang.String getIconHTML(IconHTMLEnum key, java.lang.String title)
          Will return a Html img tag String related to the given Parameters.
static java.lang.String getIconHTML(IconHTMLEnum key, java.lang.String title, java.lang.String attributes)
          Will return a Html img tag String related to the given Parameters.
static java.lang.String getIconSrc(IconHTMLEnum key)
          Will return the related filename to the image specified by IconHTMLEnum key.
static java.lang.String getRandomMonsterFilename()
          Will return the filename (including relative path) of a random monster.
static void preloadIcons()
          Preloads all defined images into the browser cache.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_ROOTSRC

public static final java.lang.String PATH_ROOTSRC
Root Path for HTTP access. Need to have a slash / appended.

See Also:
Constant Field Values

ANNOTATION_DOCENT

public static final java.lang.String ANNOTATION_DOCENT
Docent Annotation Image.

See Also:
Constant Field Values

MONSTERS

public static final java.lang.String[] MONSTERS
Some monsters.

Method Detail

getIconSrc

public static java.lang.String getIconSrc(IconHTMLEnum key)
Will return the related filename to the image specified by IconHTMLEnum key.

Parameters:
key - IconHTMLEnum
Returns:
String

getRandomMonsterFilename

public static java.lang.String getRandomMonsterFilename()
Will return the filename (including relative path) of a random monster.

Returns:
String.

getIconHTML

public static java.lang.String getIconHTML(IconHTMLEnum key,
                                           java.lang.String title,
                                           java.lang.String attributes)
Will return a Html img tag String related to the given Parameters.

Parameters:
key - IconHTMLEnum
title - String to be shown in tag
attributes - String Additional HTML attributes
Returns:
String

getIconHTML

public static java.lang.String getIconHTML(IconHTMLEnum key,
                                           java.lang.String title)
Will return a Html img tag String related to the given Parameters.

Parameters:
key - IconHTMLEnum
title - String
Returns:
String

getButtonHTML

public static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler,
                                                               IconHTMLEnum key,
                                                               java.lang.String title)
Will return a HTML object with the given picture specified by IconHTMLEnum key that can be seen as a link button in HTML.

Parameters:
clickHandler - ClickHanlder Will be called upon click on the DOM element
key - IconHTMLEnum
title - Stringimg title tag
Returns:
HTML

getButtonHTML

public static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler,
                                                               IconHTMLEnum key,
                                                               java.lang.String title,
                                                               java.lang.String anchorLabel)
Will return a HTML object with the given picture specified by IconHTMLEnum key that can be seen as a link button in HTML.

Parameters:
clickHandler - ClickHanlder Will be called upon click on the DOM element
key - IconHTMLEnum
title - Stringimg title ta
anchorLabel - String Label to be shown within the A anchor.
Returns:
HTML

getButtonHTML

public static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler,
                                                               IconHTMLEnum key,
                                                               java.lang.String title,
                                                               java.lang.String anchorLabel,
                                                               java.lang.String imgAttributes)
Will return a HTML object with the given picture specified by IconHTMLEnum key that can be seen as a link button in HTML.

Parameters:
clickHandler - ClickHanlder Will be called upon click on the DOM element
key - IconHTMLEnum
title - Stringimg title ta
anchorLabel - String Label to be shown within the A anchor.
imgAttributes - Stringy Additional attributes for the img element
Returns:
HTML

getButtonHTML

public static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler,
                                                               java.lang.String anchorLabel,
                                                               java.lang.String prefix,
                                                               java.lang.String appendix)
Will return a HTML object with no image at all but a ClickHandler.

Parameters:
clickHandler - ClickHanlder Will be called upon click on the DOM element
anchorLabel - String Label to be shown within the A anchor.
prefix - String the HTML text before the text link button
appendix - String the HTML text after the text link button
Returns:
HTML

getButtonHTML

public static com.google.gwt.user.client.ui.HTML getButtonHTML(com.google.gwt.event.dom.client.ClickHandler clickHandler,
                                                               java.lang.String anchorLabel,
                                                               boolean showBrackets)
Will return a HTML object with no image at all but a ClickHandler.

Parameters:
clickHandler - ClickHanlder Will be called upon click on the DOM element
anchorLabel - String Label to be shown within the A anchor.
showBrackets - boolean indicates whether the anchorLabel shall be made to parenthesis, bracketed by [ and ]
Returns:
HTML

preloadIcons

public static void preloadIcons()
Preloads all defined images into the browser cache.(synchronous).