Java Doc for SDimension.java in  » Swing-Library » wings3 » org » wings » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.wings.SDimension

SDimension
public class SDimension implements Serializable(Code)
Holds preferred component sizes (dimensions).

Web browsers support different notations for sizes. Absolute pixel values, realtive percentages (of the available viewport) and special CSS values as 'inherit' and 'auto' (Default). This class if capable of handling all these cases.



Field Summary
final public static  StringAUTO
     String constant for CSS dimension 'auto'.
final public static  SDimensionAUTOAREA
    
final public static  intAUTO_INT
     Integer constant for CSS dimension 'auto'.
final public static  SDimensionFULLAREA
     Immutable SDimension constants for a component taking up the full available area.
final public static  SDimensionFULLHEIGHT
     Immutable SDimension constants for a component taking up the full available height.
final public static  SDimensionFULLWIDTH
     Immutable SDimension constants for a component taking up the full available width.
final public static  StringINHERIT
     String for CSS dimension 'inherit'.
final public static  intINHERIT_INT
     Integer constant for CSS dimension 'inherit'.

Constructor Summary
public  SDimension()
    
public  SDimension(String width, String height)
    
public  SDimension(int width, int height)
     Construct a new dimension with absolute values. The value is interpreted as absolute pixel values.
Parameters:
  width - the preferred width in pixel.
public  SDimension(Integer width, Integer height)
     Construct a new dimension with absolute values. The value is interpreted as absolute pixel values.
Parameters:
  width - the preferred width in pixel.

Method Summary
public  booleanequals(Object o)
    
protected  intextractNumericValue(String value)
     Extract number from string. extracted integer.
public  StringgetHeight()
     The preferred height i.e.
public  intgetHeightInt()
     Get just the height as number without trailing unit.
public  StringgetHeightUnit()
     The unit of the current height.
protected  intgetIntValue(String sizeString)
     Extract number from string. extracted integer.
public  StringgetWidth()
     The preferred width i.e.
public  intgetWidthInt()
     Get just the width as number without trailing unit.
public  StringgetWidthUnit()
     The unit of the current width.
public  inthashCode()
    
public  voidsetHeight(String height)
     Sets the preferred height via an string.
public  voidsetHeight(int height)
     Set height in pixel.
public  voidsetSize(int width, int height)
     Set the size of this Dimension object to the specified width and height and append "px" to both values.
public  voidsetWidth(String width)
     Sets the preferred width via an string.
public  voidsetWidth(int width)
     Set width in pixel.
public  StringtoString()
    
protected  StringtoString(int size, String unit)
    

Field Detail
AUTO
final public static String AUTO(Code)
String constant for CSS dimension 'auto'. This is the default width used by wings as well as by CSS capable browsers.



AUTOAREA
final public static SDimension AUTOAREA(Code)
Immutable SDimension constants for a component taking up normal space



AUTO_INT
final public static int AUTO_INT(Code)
Integer constant for CSS dimension 'auto'. This is the default width used by wings as well as by CSS capable browsers.



FULLAREA
final public static SDimension FULLAREA(Code)
Immutable SDimension constants for a component taking up the full available area.



FULLHEIGHT
final public static SDimension FULLHEIGHT(Code)
Immutable SDimension constants for a component taking up the full available height.



FULLWIDTH
final public static SDimension FULLWIDTH(Code)
Immutable SDimension constants for a component taking up the full available width.



INHERIT
final public static String INHERIT(Code)
String for CSS dimension 'inherit'. With this value the preferred size is inherited by the surrounding element.



INHERIT_INT
final public static int INHERIT_INT(Code)
Integer constant for CSS dimension 'inherit'. With this value the preferred size is inherited by the surrounding element.




Constructor Detail
SDimension
public SDimension()(Code)



SDimension
public SDimension(String width, String height)(Code)



SDimension
public SDimension(int width, int height)(Code)
Construct a new dimension with absolute values. The value is interpreted as absolute pixel values.
Parameters:
  width - the preferred width in pixel. Use -1 for AUTO.
Parameters:
  height - the preferred height in pixel. Use -1 for AUTO.
See Also:   SDimension.setSize(int,int)



SDimension
public SDimension(Integer width, Integer height)(Code)
Construct a new dimension with absolute values. The value is interpreted as absolute pixel values.
Parameters:
  width - the preferred width in pixel. You may pass null.
Parameters:
  height - the preferred height in pixel. You may pass null.
See Also:   SDimension.setSize(int,int)




Method Detail
equals
public boolean equals(Object o)(Code)



extractNumericValue
protected int extractNumericValue(String value)(Code)
Extract number from string. extracted integer. f.e.: "120px" becomes 120 or SDimension.AUTO_INT if null



getHeight
public String getHeight()(Code)
The preferred height i.e. like 120px or 80% or auto



getHeightInt
public int getHeightInt()(Code)
Get just the height as number without trailing unit.



getHeightUnit
public String getHeightUnit()(Code)
The unit of the current height. Returns null for SDimension.AUTO and SDimension.INHERIT.Otherwise always returns a non-null value!



getIntValue
protected int getIntValue(String sizeString)(Code)
Extract number from string. extracted integer. f.e.: "120px" becomes 120



getWidth
public String getWidth()(Code)
The preferred width i.e. like 120px or 80% or auto



getWidthInt
public int getWidthInt()(Code)
Get just the width as number without trailing unit.



getWidthUnit
public String getWidthUnit()(Code)
The unit of the current width. Returns null for SDimension.AUTO and SDimension.INHERIT.Otherwise always returns a non-null value!



hashCode
public int hashCode()(Code)



setHeight
public void setHeight(String height)(Code)
Sets the preferred height via an string. Expects an dimension/unit compount i.e. "120px" or "80%" but will assume px by default.
Parameters:
  height - A preferred height.



setHeight
public void setHeight(int height)(Code)
Set height in pixel. This appends "px" to the integer value.
Parameters:
  height - if -1 set SDimension.heightInt to null



setSize
public void setSize(int width, int height)(Code)
Set the size of this Dimension object to the specified width and height and append "px" to both values.
See Also:   SDimension.setHeight(int)
See Also:   SDimension.setWidth(int)



setWidth
public void setWidth(String width)(Code)
Sets the preferred width via an string. Expects an dimension/unit compount i.e. "120px" or "80%" but will assume px by default.
Parameters:
  width - A preferred witdth.



setWidth
public void setWidth(int width)(Code)
Set width in pixel. This appends "px" to the integer value.
Parameters:
  width - if -1 set SDimension.widthInt to null



toString
public String toString()(Code)



toString
protected String toString(int size, String unit)(Code)



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.