Java Doc for Box.java in  » Ajax » zk » org » zkoss » zul » 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 » Ajax » zk » org.zkoss.zul 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.zkoss.zul.impl.XulElement
   org.zkoss.zul.Box

All known Subclasses:   org.zkoss.zul.Hbox,  org.zkoss.zul.Vbox,
Box
public class Box extends XulElement (Code)
A box.
author:
   tomyeh



Constructor Summary
public  Box()
     Default: vertical ( Vbox ).
public  Box(String orient)
    
public  Box(Component[] children)
     Constructor a box by assigning an array of children.
public  Box(String orient, Component[] children)
     Constructor a box by assigning an array of children.

Method Summary
public  StringgetAlign()
     Returns the alignment of cells of a box in the 'opposite' direction (null, start, center, end).

Default: start

The align attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children.

public  StringgetCaveAttrs()
     Returns the attributes used by the 'cave' element (never null).
public  StringgetChildInnerAttrs(Component child)
     Returns the inner attributes used to wrap the children (never null).
public  StringgetChildOuterAttrs(Component child)
     Returns the outer attributes used to wrap the children (never null).
public  StringgetHeights()
     Returns the heights/widths, which is a list of numbers separated by comma to denote the height/width of each cell in a box.
public  StringgetOrient()
     Returns the orient (the same as Box.getMold ).
public  StringgetPack()
     Returns the alignment of cells of this box (null, start, center, end).

Default: null.

The pack attribute specifies where child elements of the box are placed when the box is larger that the size of the children.

public  StringgetSpacing()
     Returns the spacing between adjacent children, or null if the default spacing is used.
public  StringgetValign()
     Returns the vertical alignment of the adjacent cells of a box (top, middle or bottom).
public  StringgetWidths()
     Returns the widths/heights, which is a list of numbers separated by comma to denote the width/height of each cell in a box.
public  booleaninsertBefore(Component newChild, Component refChild)
    
public  booleanisHorizontal()
     Returns whether it is a horizontal box.
public  booleanisVertical()
     Returns whether it is a vertical box.
public  voidonChildRemoved(Component child)
    
public  voidonDrawNewChild(Component child, StringBuffer out)
    
public  voidsetAlign(String align)
     Sets the alignment of cells of this box in the 'opposite' direction (null, start, center, end).
public  voidsetHeights(String heights)
     Sets the widths/heights, which is a list of numbers separated by comma to denote the width/height of each cell in a box.
public  voidsetOrient(String orient)
     Sets the orient.
public  voidsetPack(String pack)
     Sets the alignment of cells of this box (null, start, center, end).
Parameters:
  pack - the alignment.
public  voidsetSpacing(String spacing)
     Sets the spacing between adjacent children.
public  voidsetValign(String valign)
     Sets the vertical alignment of the adjacent cells of a box.
public  voidsetWidths(String widths)
     Sets the widths/heights, which is a list of numbers separated by comma to denote the width/height of each cell in a box.


Constructor Detail
Box
public Box()(Code)
Default: vertical ( Vbox ).



Box
public Box(String orient)(Code)

Parameters:
  orient - either "horizontal" or "vertical".



Box
public Box(Component[] children)(Code)
Constructor a box by assigning an array of children.
Parameters:
  children - an array of children to be added
since:
   2.4.0



Box
public Box(String orient, Component[] children)(Code)
Constructor a box by assigning an array of children.
Parameters:
  children - an array of children to be added
since:
   2.4.0




Method Detail
getAlign
public String getAlign()(Code)
Returns the alignment of cells of a box in the 'opposite' direction (null, start, center, end).

Default: start

The align attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children. For boxes that have horizontal orientation, it specifies how its children will be aligned vertically. For boxes that have vertical orientation, it is used to specify how its children are algined horizontally. The pack attribute ( Box.getPack ) is related to the alignment but is used to specify the position in the opposite direction.

start
Child elements are aligned starting from the left or top edge of the box. If the box is larger than the total size of the children, the extra space is placed on the right or bottom side.
center
Extra space is split equally along each side of the child elements, resulting in the children being placed in the center of the box.
end
Child elements are placed on the right or bottom edge of the box. If the box is larger than the total size of the children, the extra space is placed on the left or top side.

since:
   3.0.0



getCaveAttrs
public String getCaveAttrs()(Code)
Returns the attributes used by the 'cave' element (never null). Used only by component development to generate HTML tags.
since:
   3.0.0



getChildInnerAttrs
public String getChildInnerAttrs(Component child)(Code)
Returns the inner attributes used to wrap the children (never null). Used only by component development to generate HTML tags.



getChildOuterAttrs
public String getChildOuterAttrs(Component child)(Code)
Returns the outer attributes used to wrap the children (never null). It is used only for the vertical layout.



getHeights
public String getHeights()(Code)
Returns the heights/widths, which is a list of numbers separated by comma to denote the height/width of each cell in a box. If Hbox (i.e., Box.getOrient is horizontal), it is a list of widths. If Vbox (i.e., Box.getOrient is vertical), it is a list of heights.

It is the same as Box.getWidths .

Default: empty.




getOrient
public String getOrient()(Code)
Returns the orient (the same as Box.getMold ).

Default: "vertical".




getPack
public String getPack()(Code)
Returns the alignment of cells of this box (null, start, center, end).

Default: null.

The pack attribute specifies where child elements of the box are placed when the box is larger that the size of the children. For boxes with horizontal orientation, it is used to indicate the position of children horizontally. For boxes with vertical orientation, it is used to indicate the position of children vertically. The align attribute ( Box.getAlign )is used to specify the position in the opposite direction.

start
Child elements are aligned starting from the left or top edge of the box. If the box is larger than the total size of the children, the extra space is placed on the right or bottom side.
center
Extra space is split equally along each side of the child elements, resulting in the children being placed in the center of the box.
end
Child elements are placed on the right or bottom edge of the box. If the box is larger than the total size of the children, the extra space is placed on the left or top side.

since:
   3.0.0



getSpacing
public String getSpacing()(Code)
Returns the spacing between adjacent children, or null if the default spacing is used.

The default spacing depends on the definition of the style class called "xxx-sp", where xxx is

  1. Box.getSclass if it is not null.
  2. hbox if Box.getSclass is null and it is a horizontal box.
  3. vbox if Box.getSclass is null and it is a vertical box.

Default: null (means to use the default spacing).




getValign
public String getValign()(Code)
Returns the vertical alignment of the adjacent cells of a box (top, middle or bottom).

Default: null (i.e., use the browser default, usually middle). Box.getAlignBox.getPack




getWidths
public String getWidths()(Code)
Returns the widths/heights, which is a list of numbers separated by comma to denote the width/height of each cell in a box. If Hbox (i.e., Box.getOrient is horizontal), it is a list of widths. If Vbox (i.e., Box.getOrient is vertical), it is a list of heights.

It is the same as Box.getHeights .

Default: empty.




insertBefore
public boolean insertBefore(Component newChild, Component refChild)(Code)



isHorizontal
public boolean isHorizontal()(Code)
Returns whether it is a horizontal box.
since:
   3.0.0



isVertical
public boolean isVertical()(Code)
Returns whether it is a vertical box.
since:
   3.0.0



onChildRemoved
public void onChildRemoved(Component child)(Code)



onDrawNewChild
public void onDrawNewChild(Component child, StringBuffer out) throws IOException(Code)



setAlign
public void setAlign(String align)(Code)
Sets the alignment of cells of this box in the 'opposite' direction (null, start, center, end).
Parameters:
  align - the alignment in the 'opposite' direction.Allowed values: start, center, end.If empty or null, the browser's default is used(IE center and FF left, if vertical).
since:
   3.0.0



setHeights
public void setHeights(String heights) throws WrongValueException(Code)
Sets the widths/heights, which is a list of numbers separated by comma to denote the width/height of each cell in a box.

It is the same as Box.setWidths .




setOrient
public void setOrient(String orient) throws WrongValueException(Code)
Sets the orient.
Parameters:
  orient - either "horizontal" or "vertical".



setPack
public void setPack(String pack)(Code)
Sets the alignment of cells of this box (null, start, center, end).
Parameters:
  pack - the alignment. Allowed values: start, center, end.If empty or null, the browser's default is used.
since:
   3.0.0



setSpacing
public void setSpacing(String spacing)(Code)
Sets the spacing between adjacent children.
Parameters:
  spacing - the spacing (such as "0", "5px", "3pt" or "1em"),or null to use the default spacing
See Also:   Box.getSpacing



setValign
public void setValign(String valign)(Code)
Sets the vertical alignment of the adjacent cells of a box.
Parameters:
  valign - the vertical alignment: top, middle and bottom.Box.setAlignBox.setPack



setWidths
public void setWidths(String widths) throws WrongValueException(Code)
Sets the widths/heights, which is a list of numbers separated by comma to denote the width/height of each cell in a box.

It is the same as Box.setHeights .

For example, "10%,20%,30%" means the second cell shall occupy 10% width, the second cell 20%, the third cell 30%, and the following cells don't specify any width.

Note: the splitters are ignored, i.e., they are not cells.

Another example, ",,30%" means the third cell shall occupy 30% width, and the rest of cells don't specify any width. Of course, the real widths depend on the interpretation of the browser.




Methods inherited from org.zkoss.zul.impl.XulElement
public String getAction()(Code)(Java Doc)
public String getActionAttrs()(Code)(Java Doc)
protected String getAllOnClickAttrs(boolean ignoreOnClick)(Code)(Java Doc)
public String getContext()(Code)(Java Doc)
public String getInnerAttrs()(Code)(Java Doc)
public String getOuterAttrs()(Code)(Java Doc)
public String getPopup()(Code)(Java Doc)
public String getTooltip()(Code)(Java Doc)
public void setAction(String action)(Code)(Java Doc)
public void setContext(String context)(Code)(Java Doc)
public void setContext(Popup popup)(Code)(Java Doc)
public void setPopup(String popup)(Code)(Java Doc)
public void setPopup(Popup popup)(Code)(Java Doc)
public void setTooltip(String tooltip)(Code)(Java Doc)
public void setTooltip(Popup popup)(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.