OBEROn SDK

com.oberon.client
Class HTMLUtil

java.lang.Object
  extended by com.oberon.client.HTMLUtil

public class HTMLUtil
extends java.lang.Object

HTML utility static methods

Version:
5.0

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

ALICEBLUE

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

ANTIQUEWHITE

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

AQUA

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

AQUAMARINE

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

AZURE

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

BEIGE

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

BISQUE

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

BLACK

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

BLANCHEDALMOND

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

BLUE

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

BLUEVIOLET

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

BROWN

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

BURLYWOOD

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

CADETBLUE

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

CHARTREUSE

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

CHOCOLATE

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

CORAL

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

CORNFLOWERBLUE

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

CORNSILK

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

CRIMSON

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

CYAN

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

DARKBLUE

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

DARKCYAN

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

DARKGOLDENROD

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

DARKGRAY

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

DARKGREEN

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

DARKGREY

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

DARKKHAKI

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

DARKMAGENTA

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

DARKOLIVEGREEN

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

DARKORANGE

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

DARKORCHID

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

DARKRED

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

DARKSALMON

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

DARKSEAGREEN

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

DARKSLATEBLUE

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

DARKSLATEGRAY

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

DARKSLATEGREY

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

DARKTURQUOISE

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

DARKVIOLET

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

DEEPPINK

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

DEEPSKYBLUE

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

DIMGRAY

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

DIMGREY

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

DODGERBLUE

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

FIREBRICK

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

FLORALWHITE

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

FORESTGREEN

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

FUCHSIA

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

GAINSBORO

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

GHOSTWHITE

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

GOLD

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

GOLDENROD

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

GRAY

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

GREEN

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

GREENYELLOW

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

GREY

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

HONEYDEW

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

HOTPINK

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

INDIANRED

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

INDIGO

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

IVORY

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

KHAKI

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

LAVENDER

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

LAVENDERBLUSH

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

LAWNGREEN

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

LEMONCHIFFON

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

LIGHTBLUE

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

LIGHTCORAL

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

LIGHTCYAN

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

LIGHTGOLDENRODYELLOW

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

LIGHTGRAY

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

LIGHTGREEN

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

LIGHTGREY

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

LIGHTPINK

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

LIGHTSALMON

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

LIGHTSEAGREEN

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

LIGHTSKYBLUE

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

LIGHTSLATEGRAY

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

LIGHTSLATEGREY

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

LIGHTSTEELBLUE

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

LIGHTYELLOW

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

LIME

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

LIMEGREEN

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

LINEN

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

MAGENTA

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

MAROON

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

MEDIUMAQUAMARINE

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

MEDIUMBLUE

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

MEDIUMORCHID

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

MEDIUMPURPLE

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

MEDIUMSEAGREEN

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

MEDIUMSLATEBLUE

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

MEDIUMSPRINGGREEN

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

MEDIUMTURQUOISE

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

MEDIUMVIOLETRED

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

MIDNIGHTBLUE

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

MINTCREAM

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

MISTYROSE

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

MOCCASIN

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

NAVAJOWHITE

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

NAVY

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

OLDLACE

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

OLIVE

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

OLIVEDRAB

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

ORANGE

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

ORANGERED

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

ORCHID

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

PALEGOLDENROD

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

PALEGREEN

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

PALETURQUOISE

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

PALEVIOLETRED

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

PAPAYAWHIP

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

PEACHPUFF

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

PERU

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

PINK

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

PLUM

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

POWDERBLUE

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

PURPLE

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

RED

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

ROSYBROWN

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

ROYALBLUE

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

SADDLEBROWN

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

SALMON

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

SANDYBROWN

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

SEAGREEN

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

SEASHELL

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

SIENNA

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

SILVER

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

SKYBLUE

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

SLATEBLUE

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

SLATEGRAY

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

SLATEGREY

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

SNOW

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

SPRINGGREEN

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

STEELBLUE

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

TAN

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

TEAL

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

THISTLE

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

TOMATO

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

TURQUOISE

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

VIOLET

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

WHEAT

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

WHITE

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

WHITESMOKE

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

YELLOW

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

YELLOWGREEN

public static final java.lang.String YELLOWGREEN
See Also:
Constant Field Values
Constructor Detail

HTMLUtil

public HTMLUtil()
Method Detail

getPageURL

public static java.lang.String getPageURL(java.lang.String url)
Remove GET parameters from url


getParameters

public static java.util.Hashtable<java.lang.String,java.lang.String> getParameters(java.lang.String url)
Extract GET parameters from url


getInputParameter

public static java.lang.String getInputParameter(java.lang.String parameterName,
                                                 ApplicationRequest request)
Retrieves a parameter value from an Application request

Parameters:
parameterName - the parameter name
request - the Application request
Returns:
empty string if the parameter is not defined inside the request

unescapeHTML

public static final java.lang.String unescapeHTML(java.lang.String source)
Convert HTML escape characters to UTF-8 characters

Parameters:
source - the text to convert

unescapeHTML

public static final java.lang.String unescapeHTML(java.lang.String source,
                                                  int start)
Convert HTML escape characters to UTF-8 characters

Parameters:
source - the text to convert
start - the start position inside the text

convertHTMLColor

public static org.eclipse.swt.graphics.Color convertHTMLColor(java.lang.String CSScolor)
                                                       throws java.lang.Exception
Convert HTML/CSS color to SWT Color

Parameters:
CSScolor - [ Color RGB: rgb(r,g,b) / Color HexValue: #RRGGBB / ColorName: red,yellow... ]
Throws:
java.lang.Exception

setFormat

public 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

Parameters:
widget - the SWT widget
format - 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 , vspace

setStyle

public 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

Parameters:
widget - the SWT widget
style - 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-style

setClass

public 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

Parameters:
widget - the SWT widget
classname - the CSS style class
session - current Application session

setClass

public 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

Parameters:
widget - the SWT widget
classname - the CSS style class
bar - if true ignore the text-alignment value
session - current Application session

addCSSStyle

public static void addCSSStyle(CSSStyle style)
Add a CSS style to the style-sheet


getCSSStyle

public static CSSStyle getCSSStyle(java.lang.String stylename)
Get a CSS style from the style-sheet


openURL

public static void openURL(java.lang.String url)
Open a URL link in a WEB browser

Parameters:
url - the Web link

getLocalURL

public static java.lang.String getLocalURL(java.lang.String url)
Convert local file URL (file://) to absolute file path

Parameters:
url - the local file URL Note: local files must be included inside the "resources" folder ant its sub-folders

getImage

public 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

Parameters:
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.

getImage

public 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

Parameters:
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.

createImage

public static org.eclipse.swt.graphics.Image createImage(int width,
                                                         int height,
                                                         org.eclipse.swt.graphics.Color color)

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.