Java Doc for Utils.java in  » Swing-Library » wings3 » org » wings » plaf » css » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » wings3 » org.wings.plaf.css 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.wings.plaf.css.Utils

Utils
final public class Utils (Code)
Utils.java

Helper class that collects static methods usable from CGs.
author:
   Michael Reinsch



Field Summary
final public static  StringCSS_DEBUG_FIREBUGLITE
    
final public static  StringCSS_YUI_ASSETS_CALENDAR
    
final public static  StringCSS_YUI_ASSETS_CONTAINER
    
final public static  String[]EXCLUDE_ON_CLICK
    
final public static  StringHEADER_LOADED_CALLBACK
    
final public static  StringHTML_DEBUG_FIREBUGLITE
    
final public static  StringIMG_DEBUG_FIREBUGLITE_ERROR
    
final public static  StringIMG_DEBUG_FIREBUGLITE_INFO
    
final public static  StringIMG_DEBUG_FIREBUGLITE_WARN
    
final public static  StringIMG_YUI_ASSETS_SPRITE
    
final public static  StringJS_DEBUG_FIREBUGLITE
    
final public static  StringJS_ETC_MENU
    
final public static  StringJS_ETC_POPUP
    
final public static  StringJS_ETC_WZ_TOOLTIP
    
final public static  StringJS_WINGS_ALL
    
final public static  StringJS_WINGS_ALL_DEBUG
    
final public static  StringJS_YUI_ANIMATION
    
final public static  StringJS_YUI_ANIMATION_DEBUG
    
final public static  StringJS_YUI_AUTOCOMPLETE
    
final public static  StringJS_YUI_BUTTON
    
final public static  StringJS_YUI_CALENDAR
    
final public static  StringJS_YUI_COLORPICKER
    
final public static  StringJS_YUI_CONNECTION
    
final public static  StringJS_YUI_CONNECTION_DEBUG
    
final public static  StringJS_YUI_CONTAINER
    
final public static  StringJS_YUI_CONTAINER_CORE
    
final public static  StringJS_YUI_CONTAINER_DEBUG
    
final public static  StringJS_YUI_DOM
    
final public static  StringJS_YUI_DOM_DEBUG
    
final public static  StringJS_YUI_DRAGDROP
    
final public static  StringJS_YUI_DRAGDROP_DEBUG
    
final public static  StringJS_YUI_ELEMENT_DEBUG
    
final public static  StringJS_YUI_EVENT
    
final public static  StringJS_YUI_EVENT_DEBUG
    
final public static  StringJS_YUI_GET
    
final public static  StringJS_YUI_HISTORY
    
final public static  StringJS_YUI_IMAGELOADER
    
final public static  StringJS_YUI_JSON
    
final public static  StringJS_YUI_LOGGER
    
final public static  StringJS_YUI_MENU
    
final public static  StringJS_YUI_SLIDER
    
final public static  StringJS_YUI_TABVIEW
    
final public static  StringJS_YUI_TEST
    
final public static  StringJS_YUI_TEST_CORE
    
final public static  StringJS_YUI_TREEVIEW
    
final public static  StringJS_YUI_UTILITIES
    
final public static  StringJS_YUI_YAHOO
    
final public static  StringJS_YUI_YAHOO_DEBUG
    
final public static  StringJS_YUI_YAHOO_DOM_EVENT
    
final public static  StringJS_YUI_YUILOADER_DOM_EVENT
    
final public static  booleanPRINT_DEBUG
    
final public static  booleanPRINT_PRETTY
    
final protected static  char[]hexDigits
    


Method Summary
public static  SStringBuilderappendCSSComponentInlineColorStyle(SStringBuilder styleString, SComponent component)
     Append a inline CSS style definition for the passed component of the aspect foreground- and background color.
public static  SStringBuilderappendCSSComponentInlineFontStyle(SStringBuilder styleString, SComponent component)
     Append a inline CSS style definition for the passed component of the aspect font properties.
public static  voidappendCSSInlineFullSize(SStringBuilder pSStringBuilder, SComponent pComponent)
     Prints a HTML style attribute with widht/height of 100% if the passed dimension defines a height or width..

Sample: style="width:100%;"

This is typicall needed to stretch inner HTML element to expand to the full dimenstion defined on an outer, sized HTML element.

public static  SStringBuilderappendCSSInlineSize(SStringBuilder styleString, SComponent component)
     Appends a CSS inline style string for the preferred size of the passed component to the passed stringbuffer.
public static  StringappendSuffixesToWords(String words, String wordSuffix)
     Takes a string, tokenizes it and appends the wordSuffix on each word.
Parameters:
  words - A list of words, may be null.
Parameters:
  wordSuffix - A suffix string to append to each word modified string (i.e.
public static  voidattribute(Device d, String attr, String value)
     Prints an mandatory attribute.
public static  intcalculateHorizontalOversize(SComponent component, boolean percentageUnitOnly)
    
public static  intcalculateVerticalOversize(SComponent component, boolean percentageUnitOnly)
    
public static  StringcollectJavaScriptListenerCode(SComponent component, String javascriptEventType)
     Renders inline the javascript code attached to the passed javascipt event type on the component.
public static  LinkcreateExternalizedCSSHeader(String cssClassPath)
     Load a Stylesheet document from the classpath.
public static  LinkcreateExternalizedCSSHeaderFromProperty(String cssResourceProperty)
     Load a Stylesheet document that comes with wingS by a property.
public static  ScriptcreateExternalizedJSHeader(String jsClassPath)
     Load a Javascript library from the classpath.
public static  ScriptcreateExternalizedJSHeaderFromProperty(String jsResourceProperty)
     Load a Javascript library that comes with wingS by a property.
public static  SStringBuildercreateInlineStylesForInsets(Insets insets)
     Converts a hgap/vgap in according inline css padding style.
public static  SStringBuildercreateInlineStylesForInsets(SStringBuilder styles, Insets insets)
     Converts a hgap/vgap in according inline css padding style.
public static  voidencodeJS(Device d, Object o)
    
public static  Stringevent(SComponent component)
     Returns the according event ID for the given component.
public static  SStringBuildergenerateCSSComponentInlineStyle(SComponent component)
    
public static  SStringBuildergenerateCSSInlineBorder(SStringBuilder styles, int borderSize)
    
public static  StringgetInlineStyles(SComponent component)
    
final public static  booleanhasDimension(SComponent component)
    
public static  booleanhasInsets(Insets insets)
    
public static  SStringBuilderinlineStyles(Style tabAreaStyle)
    
public static  booleanisMSIE(SComponent component)
    
public static  booleanisMSIE()
    
public static  SStringBuilderjoinStyles(SComponent component, SStringBuilder styleString)
     Prepends the component style class set on the component to the existing style string.
public static  StringjoinStyles(SComponent component, String styleString)
     Prepends the component style class set on the component to the existing style string.
public static  RenderablelistToJsArray(List list)
    
public static  StringloadScript(String path)
     loads a script from disk through the classloader.
public static  voidmain(String argv)
    
public static  RenderablemapToJsObject(Map map)
    
public static  StringnonBreakingSpaces(String text)
     prints a String.
public static  voidoptAttribute(Device d, String attr, SStringBuilder value)
     Prints an optional attribute.
public static  voidoptAttribute(Device d, char[] attributeName, String value)
     Prints an optional attribute.
public static  voidoptAttribute(Device d, String attributeName, String value)
     Prints an optional attribute.
public static  voidoptAttribute(Device d, String attr, Color value)
     Prints an optional attribute.
public static  voidoptAttribute(Device d, String attr, Renderable r)
     Prints an optional, renderable attribute.
public static  voidoptAttribute(Device d, char[] attributeName, int value)
     Prints an optional attribute.
public static  voidoptAttribute(Device d, String attributeName, int value)
     Prints an optional attribute.
public static  voidoptAttribute(Device d, String attr, SDimension value)
     Prints an optional attribute.
public static  voidoptAttributes(Device d, Map attributes)
     Prints all optional attributes that are contained in the Map.
public static  voidoptFullSize(Device device, SComponent component)
    
public static  voidprintButtonEnd(Device device, boolean enabled)
    
public static  voidprintButtonStart(Device device, SComponent eventTarget, String eventValue, boolean b, boolean showAsFormComponent)
    
public static  voidprintButtonStart(Device device, SComponent component, String eventValue, boolean enabled, boolean formComponent, String cssClassName)
    
public static  voidprintCSSInlineFullSize(Device device, SDimension preferredSize)
     Prints a HTML style attribute with widht/height of 100% if the passed dimension defines a height or width..

Sample: style="width:100%;"

This is typicall needed to stretch inner HTML element to expand to the full dimenstion defined on an outer, sized HTML element.

public static  voidprintClickability(Device device, SComponent component, String eventValue, boolean enabled, boolean formComponent)
    
public static  DeviceprintDebug(Device d, char[] s)
     Helper method for CGs to print out debug information in output stream.
public static  DeviceprintDebug(Device d, String s)
     Helper method for CGs to print out debug information in output stream.
public static  DeviceprintDebugNewline(Device d, SComponent currentComponent)
     Prints a hierarchical idented newline if debug mode is enabled.
public static  voidprintDivHorizontalAlignment(Device d, int align)
     HTML allows 4 values for the horizontal align property of a div element.
public static  voidprintDivVerticalAlignment(Device d, int align)
     HTML allows 4 values for the vertical align property of a div element.
public static  DeviceprintInlineStylesForInsets(Device device, Insets insets)
     Converts a hgap/vgap in according inline css padding style.
public static  DeviceprintNewline(Device d, SComponent currentComponent)
     Prints a hierarchical idented newline.
public static  DeviceprintNewline(Device d, SComponent currentComponent, int offset)
     Prints a hierarchical idented newline.
public static  voidprintTableCellAlignment(Device d, SComponent c, int defaultHorizontal, int defaultVertical)
     Renders the alignment commands for a table cell (horzontal and vertical).
public static  voidquote(Device d, String s, boolean quoteNewline, boolean quoteSpaces, boolean quoteApostroph)
     Writes an {X|HT}ML quoted string according to RFC 1866.
public static  voidrenderContainer(Device d, SContainer c)
     Renders a container using its Layout manager or fallback just one after another.
public static  StringtoColorString(int rgb)
    
public static  StringtoColorString(java.awt.Color c)
    
public static  voidwrite(Device d, String s)
     writes the given String to the device.
public static  voidwrite(Device d, Color c)
     writes the given java.awt.Color to the device.
public static  voidwrite(Device d, Renderable r)
    
public static  voidwriteAllAttributes(Device device, SComponent component)
    
public static  voidwriteContextMenu(Device device, SComponent component)
     Write JS code for context menus.
public static  voidwriteEvents(Device device, SComponent c, String[] suppressScriptListenerTypes)
     Render inline event listeners attached to the passed component exlucding types of suppressed listeners
Parameters:
  device - output device
Parameters:
  c - component to retrieve listeners from
Parameters:
  suppressScriptListenerTypes - Array of String i.e.
public static  voidwriteQuoted(Device d, String s, boolean quoteNewline)
     writes the given String to the device.
public static  voidwriteRaw(Device d, String s)
    
public static  voidwriteTooltipMouseOver(Device device, SComponent component)
     Write Tooltip code.
public static  intwriteWithoutHTML(Device device, String htmlWrappedText)
     Writes text to the device without any HTML tag content.
Parameters:
  device - The output device to use for quoting
Parameters:
  htmlWrappedText - The text which may contain HTML to strip.

Field Detail
CSS_DEBUG_FIREBUGLITE
final public static String CSS_DEBUG_FIREBUGLITE(Code)



CSS_YUI_ASSETS_CALENDAR
final public static String CSS_YUI_ASSETS_CALENDAR(Code)



CSS_YUI_ASSETS_CONTAINER
final public static String CSS_YUI_ASSETS_CONTAINER(Code)



EXCLUDE_ON_CLICK
final public static String[] EXCLUDE_ON_CLICK(Code)
Default list of javascript events to exlcude in Utils.writeEvents(org.wings.io.Device,org.wings.SComponent,String[])



HEADER_LOADED_CALLBACK
final public static String HEADER_LOADED_CALLBACK(Code)



HTML_DEBUG_FIREBUGLITE
final public static String HTML_DEBUG_FIREBUGLITE(Code)



IMG_DEBUG_FIREBUGLITE_ERROR
final public static String IMG_DEBUG_FIREBUGLITE_ERROR(Code)



IMG_DEBUG_FIREBUGLITE_INFO
final public static String IMG_DEBUG_FIREBUGLITE_INFO(Code)



IMG_DEBUG_FIREBUGLITE_WARN
final public static String IMG_DEBUG_FIREBUGLITE_WARN(Code)



IMG_YUI_ASSETS_SPRITE
final public static String IMG_YUI_ASSETS_SPRITE(Code)



JS_DEBUG_FIREBUGLITE
final public static String JS_DEBUG_FIREBUGLITE(Code)



JS_ETC_MENU
final public static String JS_ETC_MENU(Code)
Lookup keys for other resources



JS_ETC_POPUP
final public static String JS_ETC_POPUP(Code)



JS_ETC_WZ_TOOLTIP
final public static String JS_ETC_WZ_TOOLTIP(Code)



JS_WINGS_ALL
final public static String JS_WINGS_ALL(Code)
Lookup keys for wings resources



JS_WINGS_ALL_DEBUG
final public static String JS_WINGS_ALL_DEBUG(Code)



JS_YUI_ANIMATION
final public static String JS_YUI_ANIMATION(Code)
Lookup keys for yui resources



JS_YUI_ANIMATION_DEBUG
final public static String JS_YUI_ANIMATION_DEBUG(Code)



JS_YUI_AUTOCOMPLETE
final public static String JS_YUI_AUTOCOMPLETE(Code)



JS_YUI_BUTTON
final public static String JS_YUI_BUTTON(Code)



JS_YUI_CALENDAR
final public static String JS_YUI_CALENDAR(Code)



JS_YUI_COLORPICKER
final public static String JS_YUI_COLORPICKER(Code)



JS_YUI_CONNECTION
final public static String JS_YUI_CONNECTION(Code)



JS_YUI_CONNECTION_DEBUG
final public static String JS_YUI_CONNECTION_DEBUG(Code)



JS_YUI_CONTAINER
final public static String JS_YUI_CONTAINER(Code)



JS_YUI_CONTAINER_CORE
final public static String JS_YUI_CONTAINER_CORE(Code)



JS_YUI_CONTAINER_DEBUG
final public static String JS_YUI_CONTAINER_DEBUG(Code)



JS_YUI_DOM
final public static String JS_YUI_DOM(Code)



JS_YUI_DOM_DEBUG
final public static String JS_YUI_DOM_DEBUG(Code)



JS_YUI_DRAGDROP
final public static String JS_YUI_DRAGDROP(Code)



JS_YUI_DRAGDROP_DEBUG
final public static String JS_YUI_DRAGDROP_DEBUG(Code)



JS_YUI_ELEMENT_DEBUG
final public static String JS_YUI_ELEMENT_DEBUG(Code)



JS_YUI_EVENT
final public static String JS_YUI_EVENT(Code)



JS_YUI_EVENT_DEBUG
final public static String JS_YUI_EVENT_DEBUG(Code)



JS_YUI_GET
final public static String JS_YUI_GET(Code)



JS_YUI_HISTORY
final public static String JS_YUI_HISTORY(Code)



JS_YUI_IMAGELOADER
final public static String JS_YUI_IMAGELOADER(Code)



JS_YUI_JSON
final public static String JS_YUI_JSON(Code)



JS_YUI_LOGGER
final public static String JS_YUI_LOGGER(Code)



JS_YUI_MENU
final public static String JS_YUI_MENU(Code)



JS_YUI_SLIDER
final public static String JS_YUI_SLIDER(Code)



JS_YUI_TABVIEW
final public static String JS_YUI_TABVIEW(Code)



JS_YUI_TEST
final public static String JS_YUI_TEST(Code)



JS_YUI_TEST_CORE
final public static String JS_YUI_TEST_CORE(Code)



JS_YUI_TREEVIEW
final public static String JS_YUI_TREEVIEW(Code)



JS_YUI_UTILITIES
final public static String JS_YUI_UTILITIES(Code)



JS_YUI_YAHOO
final public static String JS_YUI_YAHOO(Code)



JS_YUI_YAHOO_DEBUG
final public static String JS_YUI_YAHOO_DEBUG(Code)



JS_YUI_YAHOO_DOM_EVENT
final public static String JS_YUI_YAHOO_DOM_EVENT(Code)



JS_YUI_YUILOADER_DOM_EVENT
final public static String JS_YUI_YUILOADER_DOM_EVENT(Code)



PRINT_DEBUG
final public static boolean PRINT_DEBUG(Code)
Print debug information in generated HTML



PRINT_PRETTY
final public static boolean PRINT_PRETTY(Code)



hexDigits
final protected static char[] hexDigits(Code)





Method Detail
appendCSSComponentInlineColorStyle
public static SStringBuilder appendCSSComponentInlineColorStyle(SStringBuilder styleString, SComponent component)(Code)
Append a inline CSS style definition for the passed component of the aspect foreground- and background color.
Parameters:
  styleString - SStringBuilder to append to
Parameters:
  component - Component to use as style source The passed styleString



appendCSSComponentInlineFontStyle
public static SStringBuilder appendCSSComponentInlineFontStyle(SStringBuilder styleString, SComponent component)(Code)
Append a inline CSS style definition for the passed component of the aspect font properties.
Parameters:
  styleString - SStringBuilder to append to
Parameters:
  component - Component to use as style source The passed styleString



appendCSSInlineFullSize
public static void appendCSSInlineFullSize(SStringBuilder pSStringBuilder, SComponent pComponent)(Code)
Prints a HTML style attribute with widht/height of 100% if the passed dimension defines a height or width..

Sample: style="width:100%;"

This is typicall needed to stretch inner HTML element to expand to the full dimenstion defined on an outer, sized HTML element. Otherwise the component would appear to small (as size is applied only on the invisible outer limiting element)
Parameters:
  pSStringBuilder - buffer to append to
Parameters:
  pComponent - preferredSize trigger dimension




appendCSSInlineSize
public static SStringBuilder appendCSSInlineSize(SStringBuilder styleString, SComponent component)(Code)
Appends a CSS inline style string for the preferred size of the passed component to the passed stringbuffer.

Sample: width:100%;heigth=15px"




appendSuffixesToWords
public static String appendSuffixesToWords(String words, String wordSuffix)(Code)
Takes a string, tokenizes it and appends the wordSuffix on each word.
Parameters:
  words - A list of words, may be null.
Parameters:
  wordSuffix - A suffix string to append to each word modified string (i.e. "slayout myclass","_box" gets "slayout_box myclass_box").



attribute
public static void attribute(Device d, String attr, String value) throws IOException(Code)
Prints an mandatory attribute. If the String value has a content (value != null && value.length > 0), the attrib is added otherwise it is left out



calculateHorizontalOversize
public static int calculateHorizontalOversize(SComponent component, boolean percentageUnitOnly)(Code)



calculateVerticalOversize
public static int calculateVerticalOversize(SComponent component, boolean percentageUnitOnly)(Code)



collectJavaScriptListenerCode
public static String collectJavaScriptListenerCode(SComponent component, String javascriptEventType)(Code)
Renders inline the javascript code attached to the passed javascipt event type on the component. Used to allow usage of javascript events by the framework as well as by the application itself.

For an example: See the wingS.request.sendEvent().
Parameters:
  component - The component wearing the event handler
Parameters:
  javascriptEventType - the event type declared in JavaScriptEvent javascript code fragment n the form of ,new Array(function(){...},function(){...})




createExternalizedCSSHeader
public static Link createExternalizedCSSHeader(String cssClassPath)(Code)
Load a Stylesheet document from the classpath.
Parameters:
  cssClassPath - A classpath to the .css-file A Link reference to the desired stylesheet addable as header



createExternalizedCSSHeaderFromProperty
public static Link createExternalizedCSSHeaderFromProperty(String cssResourceProperty)(Code)
Load a Stylesheet document that comes with wingS by a property. Check CSS_XXX constants.
Parameters:
  cssResourceProperty - A property lookup key, preferably by a constant in this utility class A Link reference to the desired stylesheet addable as header



createExternalizedJSHeader
public static Script createExternalizedJSHeader(String jsClassPath)(Code)
Load a Javascript library from the classpath.
Parameters:
  jsClassPath - A classpath to the .js-file A script reference to the desired script addable as header



createExternalizedJSHeaderFromProperty
public static Script createExternalizedJSHeaderFromProperty(String jsResourceProperty)(Code)
Load a Javascript library that comes with wingS by a property. Check JS_XXX constants.
Parameters:
  jsResourceProperty - A property lookup key, preferably by a constant in this utility class A script reference to the desired script addable as header



createInlineStylesForInsets
public static SStringBuilder createInlineStylesForInsets(Insets insets)(Code)
Converts a hgap/vgap in according inline css padding style.
Parameters:
  insets - The insets to generate CSS padding declaration Empty or filled stringbuffer with padding declaration



createInlineStylesForInsets
public static SStringBuilder createInlineStylesForInsets(SStringBuilder styles, Insets insets)(Code)
Converts a hgap/vgap in according inline css padding style.
Parameters:
  styles - Appender to append inset style.
Parameters:
  insets - The insets to generate CSS padding declaration Empty or filled stringbuffer with padding declaration



encodeJS
public static void encodeJS(Device d, Object o) throws IOException(Code)



event
public static String event(SComponent component)(Code)
Returns the according event ID for the given component.



generateCSSComponentInlineStyle
public static SStringBuilder generateCSSComponentInlineStyle(SComponent component)(Code)
Generates a SStringBuilder containing inlined CSS styles for the following properties of a SComponent:

  • Preffered Size
  • Font
  • Background- and Foregroud color.

Parameters:
  component - Component to grab parameters from.



generateCSSInlineBorder
public static SStringBuilder generateCSSInlineBorder(SStringBuilder styles, int borderSize)(Code)



getInlineStyles
public static String getInlineStyles(SComponent component)(Code)



hasDimension
final public static boolean hasDimension(SComponent component)(Code)



hasInsets
public static boolean hasInsets(Insets insets)(Code)

Parameters:
  insets - The inset param to test true if any valid inset greater zero is set



inlineStyles
public static SStringBuilder inlineStyles(Style tabAreaStyle)(Code)



isMSIE
public static boolean isMSIE(SComponent component)(Code)
true if current browser is microsoft exploder



isMSIE
public static boolean isMSIE()(Code)
true if current browser is microsoft exploder



joinStyles
public static SStringBuilder joinStyles(SComponent component, SStringBuilder styleString)(Code)
Prepends the component style class set on the component to the existing style string.
Parameters:
  component - Component may be null and may have a null style string.
Parameters:
  styleString - The style string to append



joinStyles
public static String joinStyles(SComponent component, String styleString)(Code)
Prepends the component style class set on the component to the existing style string.
Parameters:
  component - Component may be null and may have a null style string.
Parameters:
  styleString - The style string to append



listToJsArray
public static Renderable listToJsArray(List list)(Code)



loadScript
public static String loadScript(String path)(Code)
loads a script from disk through the classloader.
Parameters:
  path - the path where the script can be found the script as a String



main
public static void main(String argv) throws Exception(Code)



mapToJsObject
public static Renderable mapToJsObject(Map map)(Code)



nonBreakingSpaces
public static String nonBreakingSpaces(String text)(Code)
prints a String. Substitutes spaces with nbsp's



optAttribute
public static void optAttribute(Device d, String attr, SStringBuilder value) throws IOException(Code)
Prints an optional attribute. If the String value has a content (value != null && value.length > 0), the attrib is added otherwise it is left out



optAttribute
public static void optAttribute(Device d, char[] attributeName, String value) throws IOException(Code)
Prints an optional attribute. If the String value has a content (value != null && value.length > 0), the attrib is added otherwise it is left out



optAttribute
public static void optAttribute(Device d, String attributeName, String value) throws IOException(Code)
Prints an optional attribute. If the String value has a content (value != null && value.length > 0), the attrib is added otherwise it is left out



optAttribute
public static void optAttribute(Device d, String attr, Color value) throws IOException(Code)
Prints an optional attribute. If the String value has a content (value != null && value.length > 0), the attrib is added otherwise it is left out



optAttribute
public static void optAttribute(Device d, String attr, Renderable r) throws IOException(Code)
Prints an optional, renderable attribute.



optAttribute
public static void optAttribute(Device d, char[] attributeName, int value) throws IOException(Code)
Prints an optional attribute. If the integer value is greater than 0, the attrib is added otherwise it is left out



optAttribute
public static void optAttribute(Device d, String attributeName, int value) throws IOException(Code)
Prints an optional attribute. If the integer value is greater than 0, the attrib is added otherwise it is left out



optAttribute
public static void optAttribute(Device d, String attr, SDimension value) throws IOException(Code)
Prints an optional attribute. If the dimension value not equals null the attrib is added otherwise it is left out



optAttributes
public static void optAttributes(Device d, Map attributes) throws IOException(Code)
Prints all optional attributes that are contained in the Map. The keys of the map should be instances of String and the values one of the following classes.
  • org.wings.util.SStringBuilder
  • java.lang.String
  • java.awt.Color
  • org.wings.Renderable
  • java.lang.Integer
  • org.wings.SDimension

Parameters:
  d - The device to print the optional attributes.
Parameters:
  attributes - The optional attributes. The key is the attributename and the value is the attribute value.
throws:
  IOException - The exception maybe thrown if an error occurswhile trying to write to device.



optFullSize
public static void optFullSize(Device device, SComponent component) throws IOException(Code)



printButtonEnd
public static void printButtonEnd(Device device, boolean enabled) throws IOException(Code)



printButtonStart
public static void printButtonStart(Device device, SComponent eventTarget, String eventValue, boolean b, boolean showAsFormComponent) throws IOException(Code)



printButtonStart
public static void printButtonStart(Device device, SComponent component, String eventValue, boolean enabled, boolean formComponent, String cssClassName) throws IOException(Code)



printCSSInlineFullSize
public static void printCSSInlineFullSize(Device device, SDimension preferredSize) throws IOException(Code)
Prints a HTML style attribute with widht/height of 100% if the passed dimension defines a height or width..

Sample: style="width:100%;"

This is typicall needed to stretch inner HTML element to expand to the full dimenstion defined on an outer, sized HTML element. Otherwise the component would appear to small (as size is applied only on the invisible outer limiting element)
Parameters:
  device - Device to print to
Parameters:
  preferredSize - trigger dimension




printClickability
public static void printClickability(Device device, SComponent component, String eventValue, boolean enabled, boolean formComponent) throws IOException(Code)



printDebug
public static Device printDebug(Device d, char[] s) throws IOException(Code)
Helper method for CGs to print out debug information in output stream. If Utils.PRINT_DEBUG prints the passed string and returns the current Device . In other case omits ouput and returns a NullDevice
Parameters:
  d - The original device The original device or a NullDevice



printDebug
public static Device printDebug(Device d, String s) throws IOException(Code)
Helper method for CGs to print out debug information in output stream. If Utils.PRINT_DEBUG prints the passed string and returns the current Device . In other case omits ouput and returns a NullDevice
Parameters:
  d - The original device The original device or a NullDevice



printDebugNewline
public static Device printDebugNewline(Device d, SComponent currentComponent) throws IOException(Code)
Prints a hierarchical idented newline if debug mode is enabled. Utils.printNewline(org.wings.io.Device,org.wings.SComponent)



printDivHorizontalAlignment
public static void printDivHorizontalAlignment(Device d, int align) throws IOException(Code)
HTML allows 4 values for the horizontal align property of a div element.
Parameters:
  d - Output
Parameters:
  align - Please refer SConstants
throws:
  IOException -



printDivVerticalAlignment
public static void printDivVerticalAlignment(Device d, int align) throws IOException(Code)
HTML allows 4 values for the vertical align property of a div element.
Parameters:
  d - Output
Parameters:
  align - Please refer SConstants
throws:
  IOException -



printInlineStylesForInsets
public static Device printInlineStylesForInsets(Device device, Insets insets) throws IOException(Code)
Converts a hgap/vgap in according inline css padding style.
Parameters:
  device - Appender to append inset style.
Parameters:
  insets - The insets to generate CSS padding declaration Empty or filled stringbuffer with padding declaration



printNewline
public static Device printNewline(Device d, SComponent currentComponent) throws IOException(Code)
Prints a hierarchical idented newline. For each surrounding container of the passed component one ident level.



printNewline
public static Device printNewline(Device d, SComponent currentComponent, int offset) throws IOException(Code)
Prints a hierarchical idented newline. For each surrounding container of the passed component one ident level.



printTableCellAlignment
public static void printTableCellAlignment(Device d, SComponent c, int defaultHorizontal, int defaultVertical) throws IOException(Code)
Renders the alignment commands for a table cell (horzontal and vertical). To ensure a consistent behaviour you have to pass the default alignment applied for SConstants.NO_ALIGN.
Parameters:
  defaultHorizontal - default horizontal alignment to use is not aligned
Parameters:
  defaultVertical - default vertical alignment to use if component is not aligned



quote
public static void quote(Device d, String s, boolean quoteNewline, boolean quoteSpaces, boolean quoteApostroph) throws IOException(Code)
Writes an {X|HT}ML quoted string according to RFC 1866. '"', '<', '>', '&' become '"', '<', '>', '&'
Parameters:
  d - The device to print out on
Parameters:
  s - the String to print
Parameters:
  quoteNewline - should newlines be transformed into <br> tags
Parameters:
  quoteSpaces - should spaces be transformed into &nbsp chars
Parameters:
  quoteApostroph - Quote apostroph ' by \'
throws:
  IOException -



renderContainer
public static void renderContainer(Device d, SContainer c) throws IOException(Code)
Renders a container using its Layout manager or fallback just one after another.



toColorString
public static String toColorString(int rgb)(Code)



toColorString
public static String toColorString(java.awt.Color c)(Code)



write
public static void write(Device d, String s) throws IOException(Code)
writes the given String to the device. The string is quoted, i.e. for all special characters in *ML, their appropriate entity is returned. If the String starts with '', the content is regarded being HTML-code and is written as is (without the tag).



write
public static void write(Device d, Color c) throws IOException(Code)
writes the given java.awt.Color to the device. Speed optimized; character conversion avoided.



write
public static void write(Device d, Renderable r) throws IOException(Code)
writes anything Renderable



writeAllAttributes
public static void writeAllAttributes(Device device, SComponent component) throws IOException(Code)



writeContextMenu
public static void writeContextMenu(Device device, SComponent component) throws IOException(Code)
Write JS code for context menus. Common implementaton for MSIE and gecko.



writeEvents
public static void writeEvents(Device device, SComponent c, String[] suppressScriptListenerTypes) throws IOException(Code)
Render inline event listeners attached to the passed component exlucding types of suppressed listeners
Parameters:
  device - output device
Parameters:
  c - component to retrieve listeners from
Parameters:
  suppressScriptListenerTypes - Array of String i.e. new String[] { JavaScriptEvent.ON_CLICK } )



writeQuoted
public static void writeQuoted(Device d, String s, boolean quoteNewline) throws IOException(Code)
writes the given String to the device. The string is quoted, i.e. for all special characters in *ML, their appropriate entity is returned. If the String starts with '', the content is regarded being HTML-code and is written as is (without the tag). It is possible to define the quoteNewline behavoiur



writeRaw
public static void writeRaw(Device d, String s) throws IOException(Code)
write string as it is
Parameters:
  d -
Parameters:
  s -
throws:
  IOException -



writeTooltipMouseOver
public static void writeTooltipMouseOver(Device device, SComponent component) throws IOException(Code)
Write Tooltip code.



writeWithoutHTML
public static int writeWithoutHTML(Device device, String htmlWrappedText) throws IOException(Code)
Writes text to the device without any HTML tag content.
Parameters:
  device - The output device to use for quoting
Parameters:
  htmlWrappedText - The text which may contain HTML to strip. The amount of characters written to the ouput device
throws:
  IOException -



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.