|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.client.HTMLUtil
public class HTMLUtil
HTML utility static methods
Field Summary | |
---|---|
static java.lang.String |
ALICEBLUE
|
static java.lang.String |
ANTIQUEWHITE
|
static java.lang.String |
AQUA
|
static java.lang.String |
AQUAMARINE
|
static java.lang.String |
AZURE
|
static java.lang.String |
BEIGE
|
static java.lang.String |
BISQUE
|
static java.lang.String |
BLACK
|
static java.lang.String |
BLANCHEDALMOND
|
static java.lang.String |
BLUE
|
static java.lang.String |
BLUEVIOLET
|
static java.lang.String |
BROWN
|
static java.lang.String |
BURLYWOOD
|
static java.lang.String |
CADETBLUE
|
static java.lang.String |
CHARTREUSE
|
static java.lang.String |
CHOCOLATE
|
static java.lang.String |
CORAL
|
static java.lang.String |
CORNFLOWERBLUE
|
static java.lang.String |
CORNSILK
|
static java.lang.String |
CRIMSON
|
static java.lang.String |
CYAN
|
static java.lang.String |
DARKBLUE
|
static java.lang.String |
DARKCYAN
|
static java.lang.String |
DARKGOLDENROD
|
static java.lang.String |
DARKGRAY
|
static java.lang.String |
DARKGREEN
|
static java.lang.String |
DARKGREY
|
static java.lang.String |
DARKKHAKI
|
static java.lang.String |
DARKMAGENTA
|
static java.lang.String |
DARKOLIVEGREEN
|
static java.lang.String |
DARKORANGE
|
static java.lang.String |
DARKORCHID
|
static java.lang.String |
DARKRED
|
static java.lang.String |
DARKSALMON
|
static java.lang.String |
DARKSEAGREEN
|
static java.lang.String |
DARKSLATEBLUE
|
static java.lang.String |
DARKSLATEGRAY
|
static java.lang.String |
DARKSLATEGREY
|
static java.lang.String |
DARKTURQUOISE
|
static java.lang.String |
DARKVIOLET
|
static java.lang.String |
DEEPPINK
|
static java.lang.String |
DEEPSKYBLUE
|
static java.lang.String |
DIMGRAY
|
static java.lang.String |
DIMGREY
|
static java.lang.String |
DODGERBLUE
|
static java.lang.String |
FIREBRICK
|
static java.lang.String |
FLORALWHITE
|
static java.lang.String |
FORESTGREEN
|
static java.lang.String |
FUCHSIA
|
static java.lang.String |
GAINSBORO
|
static java.lang.String |
GHOSTWHITE
|
static java.lang.String |
GOLD
|
static java.lang.String |
GOLDENROD
|
static java.lang.String |
GRAY
|
static java.lang.String |
GREEN
|
static java.lang.String |
GREENYELLOW
|
static java.lang.String |
GREY
|
static java.lang.String |
HONEYDEW
|
static java.lang.String |
HOTPINK
|
static java.lang.String |
INDIANRED
|
static java.lang.String |
INDIGO
|
static java.lang.String |
IVORY
|
static java.lang.String |
KHAKI
|
static java.lang.String |
LAVENDER
|
static java.lang.String |
LAVENDERBLUSH
|
static java.lang.String |
LAWNGREEN
|
static java.lang.String |
LEMONCHIFFON
|
static java.lang.String |
LIGHTBLUE
|
static java.lang.String |
LIGHTCORAL
|
static java.lang.String |
LIGHTCYAN
|
static java.lang.String |
LIGHTGOLDENRODYELLOW
|
static java.lang.String |
LIGHTGRAY
|
static java.lang.String |
LIGHTGREEN
|
static java.lang.String |
LIGHTGREY
|
static java.lang.String |
LIGHTPINK
|
static java.lang.String |
LIGHTSALMON
|
static java.lang.String |
LIGHTSEAGREEN
|
static java.lang.String |
LIGHTSKYBLUE
|
static java.lang.String |
LIGHTSLATEGRAY
|
static java.lang.String |
LIGHTSLATEGREY
|
static java.lang.String |
LIGHTSTEELBLUE
|
static java.lang.String |
LIGHTYELLOW
|
static java.lang.String |
LIME
|
static java.lang.String |
LIMEGREEN
|
static java.lang.String |
LINEN
|
static java.lang.String |
MAGENTA
|
static java.lang.String |
MAROON
|
static java.lang.String |
MEDIUMAQUAMARINE
|
static java.lang.String |
MEDIUMBLUE
|
static java.lang.String |
MEDIUMORCHID
|
static java.lang.String |
MEDIUMPURPLE
|
static java.lang.String |
MEDIUMSEAGREEN
|
static java.lang.String |
MEDIUMSLATEBLUE
|
static java.lang.String |
MEDIUMSPRINGGREEN
|
static java.lang.String |
MEDIUMTURQUOISE
|
static java.lang.String |
MEDIUMVIOLETRED
|
static java.lang.String |
MIDNIGHTBLUE
|
static java.lang.String |
MINTCREAM
|
static java.lang.String |
MISTYROSE
|
static java.lang.String |
MOCCASIN
|
static java.lang.String |
NAVAJOWHITE
|
static java.lang.String |
NAVY
|
static java.lang.String |
OLDLACE
|
static java.lang.String |
OLIVE
|
static java.lang.String |
OLIVEDRAB
|
static java.lang.String |
ORANGE
|
static java.lang.String |
ORANGERED
|
static java.lang.String |
ORCHID
|
static java.lang.String |
PALEGOLDENROD
|
static java.lang.String |
PALEGREEN
|
static java.lang.String |
PALETURQUOISE
|
static java.lang.String |
PALEVIOLETRED
|
static java.lang.String |
PAPAYAWHIP
|
static java.lang.String |
PEACHPUFF
|
static java.lang.String |
PERU
|
static java.lang.String |
PINK
|
static java.lang.String |
PLUM
|
static java.lang.String |
POWDERBLUE
|
static java.lang.String |
PURPLE
|
static java.lang.String |
RED
|
static java.lang.String |
ROSYBROWN
|
static java.lang.String |
ROYALBLUE
|
static java.lang.String |
SADDLEBROWN
|
static java.lang.String |
SALMON
|
static java.lang.String |
SANDYBROWN
|
static java.lang.String |
SEAGREEN
|
static java.lang.String |
SEASHELL
|
static java.lang.String |
SIENNA
|
static java.lang.String |
SILVER
|
static java.lang.String |
SKYBLUE
|
static java.lang.String |
SLATEBLUE
|
static java.lang.String |
SLATEGRAY
|
static java.lang.String |
SLATEGREY
|
static java.lang.String |
SNOW
|
static java.lang.String |
SPRINGGREEN
|
static java.lang.String |
STEELBLUE
|
static java.lang.String |
TAN
|
static java.lang.String |
TEAL
|
static java.lang.String |
THISTLE
|
static java.lang.String |
TOMATO
|
static java.lang.String |
TURQUOISE
|
static java.lang.String |
VIOLET
|
static java.lang.String |
WHEAT
|
static java.lang.String |
WHITE
|
static java.lang.String |
WHITESMOKE
|
static java.lang.String |
YELLOW
|
static java.lang.String |
YELLOWGREEN
|
Constructor Summary | |
---|---|
HTMLUtil()
|
Method Summary | |
---|---|
static void |
addCSSStyle(CSSStyle style)
Add a CSS style to the style-sheet |
static org.eclipse.swt.graphics.Color |
convertHTMLColor(java.lang.String CSScolor)
Convert HTML/CSS color to SWT Color |
static org.eclipse.swt.graphics.Image |
createImage(int width,
int height,
org.eclipse.swt.graphics.Color color)
|
static CSSStyle |
getCSSStyle(java.lang.String stylename)
Get a CSS style from the style-sheet |
static org.eclipse.swt.graphics.Image |
getImage(java.lang.String url,
javax.servlet.http.HttpSession session)
Downloads an image and convert it to SWT Image |
static org.eclipse.swt.graphics.Image |
getImage(java.lang.String url,
int width,
int height,
javax.servlet.http.HttpSession session)
Downloads an image and convert it to SWT Image |
static java.lang.String |
getInputParameter(java.lang.String parameterName,
ApplicationRequest request)
Retrieves a parameter value from an Application request |
static java.lang.String |
getLocalURL(java.lang.String url)
Convert local file URL (file://) to absolute file path |
static java.lang.String |
getPageURL(java.lang.String url)
Remove GET parameters from url |
static java.util.Hashtable<java.lang.String,java.lang.String> |
getParameters(java.lang.String url)
Extract GET parameters from url |
static void |
openURL(java.lang.String url)
Open a URL link in a WEB browser |
static void |
setClass(org.eclipse.swt.widgets.Control widget,
java.lang.String classname,
boolean bar,
javax.servlet.http.HttpSession session)
Apply CSS style class to a SWT widget |
static void |
setClass(org.eclipse.swt.widgets.Control widget,
java.lang.String classname,
javax.servlet.http.HttpSession session)
Apply CSS style class to a SWT widget |
static void |
setFormat(org.eclipse.swt.widgets.Control widget,
java.lang.String format,
javax.servlet.http.HttpSession session)
Apply HTML format attributes to a SWT widget |
static void |
setStyle(org.eclipse.swt.widgets.Control widget,
java.lang.String style,
javax.servlet.http.HttpSession session)
Apply CSS style to a SWT widget |
static java.lang.String |
unescapeHTML(java.lang.String source)
Convert HTML escape characters to UTF-8 characters |
static java.lang.String |
unescapeHTML(java.lang.String source,
int start)
Convert HTML escape characters to UTF-8 characters |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ALICEBLUE
public static final java.lang.String ANTIQUEWHITE
public static final java.lang.String AQUA
public static final java.lang.String AQUAMARINE
public static final java.lang.String AZURE
public static final java.lang.String BEIGE
public static final java.lang.String BISQUE
public static final java.lang.String BLACK
public static final java.lang.String BLANCHEDALMOND
public static final java.lang.String BLUE
public static final java.lang.String BLUEVIOLET
public static final java.lang.String BROWN
public static final java.lang.String BURLYWOOD
public static final java.lang.String CADETBLUE
public static final java.lang.String CHARTREUSE
public static final java.lang.String CHOCOLATE
public static final java.lang.String CORAL
public static final java.lang.String CORNFLOWERBLUE
public static final java.lang.String CORNSILK
public static final java.lang.String CRIMSON
public static final java.lang.String CYAN
public static final java.lang.String DARKBLUE
public static final java.lang.String DARKCYAN
public static final java.lang.String DARKGOLDENROD
public static final java.lang.String DARKGRAY
public static final java.lang.String DARKGREEN
public static final java.lang.String DARKGREY
public static final java.lang.String DARKKHAKI
public static final java.lang.String DARKMAGENTA
public static final java.lang.String DARKOLIVEGREEN
public static final java.lang.String DARKORANGE
public static final java.lang.String DARKORCHID
public static final java.lang.String DARKRED
public static final java.lang.String DARKSALMON
public static final java.lang.String DARKSEAGREEN
public static final java.lang.String DARKSLATEBLUE
public static final java.lang.String DARKSLATEGRAY
public static final java.lang.String DARKSLATEGREY
public static final java.lang.String DARKTURQUOISE
public static final java.lang.String DARKVIOLET
public static final java.lang.String DEEPPINK
public static final java.lang.String DEEPSKYBLUE
public static final java.lang.String DIMGRAY
public static final java.lang.String DIMGREY
public static final java.lang.String DODGERBLUE
public static final java.lang.String FIREBRICK
public static final java.lang.String FLORALWHITE
public static final java.lang.String FORESTGREEN
public static final java.lang.String FUCHSIA
public static final java.lang.String GAINSBORO
public static final java.lang.String GHOSTWHITE
public static final java.lang.String GOLD
public static final java.lang.String GOLDENROD
public static final java.lang.String GRAY
public static final java.lang.String GREEN
public static final java.lang.String GREENYELLOW
public static final java.lang.String GREY
public static final java.lang.String HONEYDEW
public static final java.lang.String HOTPINK
public static final java.lang.String INDIANRED
public static final java.lang.String INDIGO
public static final java.lang.String IVORY
public static final java.lang.String KHAKI
public static final java.lang.String LAVENDER
public static final java.lang.String LAVENDERBLUSH
public static final java.lang.String LAWNGREEN
public static final java.lang.String LEMONCHIFFON
public static final java.lang.String LIGHTBLUE
public static final java.lang.String LIGHTCORAL
public static final java.lang.String LIGHTCYAN
public static final java.lang.String LIGHTGOLDENRODYELLOW
public static final java.lang.String LIGHTGRAY
public static final java.lang.String LIGHTGREEN
public static final java.lang.String LIGHTGREY
public static final java.lang.String LIGHTPINK
public static final java.lang.String LIGHTSALMON
public static final java.lang.String LIGHTSEAGREEN
public static final java.lang.String LIGHTSKYBLUE
public static final java.lang.String LIGHTSLATEGRAY
public static final java.lang.String LIGHTSLATEGREY
public static final java.lang.String LIGHTSTEELBLUE
public static final java.lang.String LIGHTYELLOW
public static final java.lang.String LIME
public static final java.lang.String LIMEGREEN
public static final java.lang.String LINEN
public static final java.lang.String MAGENTA
public static final java.lang.String MAROON
public static final java.lang.String MEDIUMAQUAMARINE
public static final java.lang.String MEDIUMBLUE
public static final java.lang.String MEDIUMORCHID
public static final java.lang.String MEDIUMPURPLE
public static final java.lang.String MEDIUMSEAGREEN
public static final java.lang.String MEDIUMSLATEBLUE
public static final java.lang.String MEDIUMSPRINGGREEN
public static final java.lang.String MEDIUMTURQUOISE
public static final java.lang.String MEDIUMVIOLETRED
public static final java.lang.String MIDNIGHTBLUE
public static final java.lang.String MINTCREAM
public static final java.lang.String MISTYROSE
public static final java.lang.String MOCCASIN
public static final java.lang.String NAVAJOWHITE
public static final java.lang.String NAVY
public static final java.lang.String OLDLACE
public static final java.lang.String OLIVE
public static final java.lang.String OLIVEDRAB
public static final java.lang.String ORANGE
public static final java.lang.String ORANGERED
public static final java.lang.String ORCHID
public static final java.lang.String PALEGOLDENROD
public static final java.lang.String PALEGREEN
public static final java.lang.String PALETURQUOISE
public static final java.lang.String PALEVIOLETRED
public static final java.lang.String PAPAYAWHIP
public static final java.lang.String PEACHPUFF
public static final java.lang.String PERU
public static final java.lang.String PINK
public static final java.lang.String PLUM
public static final java.lang.String POWDERBLUE
public static final java.lang.String PURPLE
public static final java.lang.String RED
public static final java.lang.String ROSYBROWN
public static final java.lang.String ROYALBLUE
public static final java.lang.String SADDLEBROWN
public static final java.lang.String SALMON
public static final java.lang.String SANDYBROWN
public static final java.lang.String SEAGREEN
public static final java.lang.String SEASHELL
public static final java.lang.String SIENNA
public static final java.lang.String SILVER
public static final java.lang.String SKYBLUE
public static final java.lang.String SLATEBLUE
public static final java.lang.String SLATEGRAY
public static final java.lang.String SLATEGREY
public static final java.lang.String SNOW
public static final java.lang.String SPRINGGREEN
public static final java.lang.String STEELBLUE
public static final java.lang.String TAN
public static final java.lang.String TEAL
public static final java.lang.String THISTLE
public static final java.lang.String TOMATO
public static final java.lang.String TURQUOISE
public static final java.lang.String VIOLET
public static final java.lang.String WHEAT
public static final java.lang.String WHITE
public static final java.lang.String WHITESMOKE
public static final java.lang.String YELLOW
public static final java.lang.String YELLOWGREEN
Constructor Detail |
---|
public HTMLUtil()
Method Detail |
---|
public static java.lang.String getPageURL(java.lang.String url)
public static java.util.Hashtable<java.lang.String,java.lang.String> getParameters(java.lang.String url)
public static java.lang.String getInputParameter(java.lang.String parameterName, ApplicationRequest request)
parameterName
- the parameter namerequest
- the Application request
public static final java.lang.String unescapeHTML(java.lang.String source)
source
- the text to convertpublic static final java.lang.String unescapeHTML(java.lang.String source, int start)
source
- the text to convertstart
- the start position inside the textpublic static org.eclipse.swt.graphics.Color convertHTMLColor(java.lang.String CSScolor) throws java.lang.Exception
CSScolor
- [ Color RGB: rgb(r,g,b) / Color HexValue: #RRGGBB / ColorName: red,yellow... ]
java.lang.Exception
public static void setFormat(org.eclipse.swt.widgets.Control widget, java.lang.String format, javax.servlet.http.HttpSession session)
widget
- the SWT widgetformat
- the HTML tag attributes (align="left" bgcolor="#09372A" ... )session
- current Application session
Supported attributes are: class , style , align , color , bgcolor , background , cellpadding , cellspacing , target , face , size , hspace , vspacepublic static void setStyle(org.eclipse.swt.widgets.Control widget, java.lang.String style, javax.servlet.http.HttpSession session)
widget
- the SWT widgetstyle
- the style text (color:#09372A ; padding: 0px 20px 10px 0px ; .... )session
- current Application session
Supported style options are: color , background-color , background , text-align , vertical-align ,
padding , padding-top , padding-right , padding-bottom , padding-left , margin , margin-top ,
margin-right , margin-bottom , margin-left , font-family , font-size , font-weight , font-stylepublic static void setClass(org.eclipse.swt.widgets.Control widget, java.lang.String classname, javax.servlet.http.HttpSession session)
widget
- the SWT widgetclassname
- the CSS style classsession
- current Application sessionpublic static void setClass(org.eclipse.swt.widgets.Control widget, java.lang.String classname, boolean bar, javax.servlet.http.HttpSession session)
widget
- the SWT widgetclassname
- the CSS style classbar
- if true ignore the text-alignment valuesession
- current Application sessionpublic static void addCSSStyle(CSSStyle style)
public static CSSStyle getCSSStyle(java.lang.String stylename)
public static void openURL(java.lang.String url)
url
- the Web linkpublic static java.lang.String getLocalURL(java.lang.String url)
url
- the local file URL
Note: local files must be included inside the "resources" folder ant its sub-folderspublic static org.eclipse.swt.graphics.Image getImage(java.lang.String url, int width, int height, javax.servlet.http.HttpSession session)
url
- the image source URL (protocol can be http://;https//;file://). If the protocol is non specified, the file:// is assumed as default.width
- resize width (if 0 is ignored)height
- resize height (if 0 is ignored)session
- the current Application session
When url include JRImageServlet or JRDrawGraphServlet the image is generated inside OBEROn
using the AdminBase.getImage(String, String)
and the Graph.drawGraph(String, String, Framework)
methods respectively.public static org.eclipse.swt.graphics.Image getImage(java.lang.String url, javax.servlet.http.HttpSession session)
url
- the image source URL (protocol can be http://;https//;file://). If the protocol is non specified, the file:// is assumed as default.session
- the current Application session
When url include JRImageServlet or JRDrawGraphServlet the image is generated inside OBEROn
using the AdminBase.getImage(String, String)
and the Graph.drawGraph(String, String, Framework)
methods respectively.public static org.eclipse.swt.graphics.Image createImage(int width, int height, org.eclipse.swt.graphics.Color color)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |