Java Doc for SplitterLayout.java in  » IDE-Netbeans » xml » org » netbeans » modules » xml » xam » ui » layout » 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 » IDE Netbeans » xml » org.netbeans.modules.xml.xam.ui.layout 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.xml.xam.ui.layout.SplitterLayout

SplitterLayout
public class SplitterLayout implements LayoutManager2,java.io.Serializable(Code)
SplitterLayout is a layout manager that will layout a container holding other components and SplitterBars.

Each component added to a container to be laid out using SplitterLayout must provide a String containing a "weight" for the component. This weight will be used to determine the initial spacing of all components being laid out. The weight numbers are arbitrary integers. The amount of space initially allocated for a component is

 (wc/wt) * (size-insets-splitterSize)
 

where

wc
the weight number for the component
wt
the total weight of all visible components in the container
size
the space free to display the components
insets
space used by insets in the container
splitterSize
amount of space needed to display SplitterBars

If the container being laid out holds no SplitterBars, SplitterLayout acts like a relational-weight layout manager. All components are always laid out based on their proportionate weights.

If the container being laid out holds some SplitterBars, SplitterLayout will initially size all non JSplitterBar components based on their weights. Any succesive layouts are computed strictly on the locations of the SplitterBars.

SplitterLayout can be oriented Horizontally or Vertically. Any SpliterBars placed in the container will automatically be oriented.

If a JSplitterBar has been modified (adding components to it) you will need to add JSplitterSpace components to it. See JSplitterBar for more details.

Known Problems:

  • If there are any SplitterBars contained in the container, it is best to have them between every non-JSplitterBar. Otherwise, once SplitterBars are moved, some components will use their proportional size while others will use the JSplitterBar positions. (Non-Splitterbars will check the next component to see if it's a JSplitterBar. If it's not, it uses its proportional size.) This may eventually be changed...
  • Results of adding new SplitterBars to an existing (and user- interacted) SplitterLayout-laid container might be a bit unpredictable. The safest way to ensure the container is laid out correctly would be to explicitly set all pre-existing JSplitterBar positions to (0,0). This will cause the relational layout algorithm to take effect.

Use this code at your own risk! MageLang Institute is not responsible for any damage caused directly or indirctly through use of this code.

SOFTWARE RIGHTS

MageLang support classes, version 1.0, MageLang Institute

We reserve no legal rights to this code--it is fully in the public domain. An individual or company may do whatever they wish with source code distributed with it, including including the incorporation of it into commerical software.

However, this code cannot be sold as a standalone product.

We encourage users to develop software with this code. However, we do ask that credit is given to us for developing it By "credit", we mean that if you use these components or incorporate any source code into one of your programs (commercial product, research project, or otherwise) that you acknowledge this fact somewhere in the documentation, research report, etc... If you like these components and have developed a nice tool with the output, please mention that you developed it using these components. In addition, we ask that the headers remain intact in our source code. As long as these guidelines are kept, we expect to continue enhancing this system and expect to make other tools available as they are completed.

The MageLang Support Classes Gang:
version:
   MageLang Support Classes 1.0, MageLang Insitute, 1997
author:
   Scott Stanchfield, MageLang Institute
See Also:   JSplitterBar
See Also:   JSplitterSpace
author:
   Jeri Lockhart - jeri.lockhart@sun.com
author:
   Modified for use in the NbColumnView widget.
author:
   When the user moves the splitter bar to the left, the column that is adjacent to the
author:
   left maintains its minimum size.
author:
   When the user moves the splitter bar to the right, the columns to the right of the
author:
   splitter bar, maintain their widths.
author:
   layoutComponent() - can be called when the components in the container
author:
   do not yet have their bounds set. In this case, use the component's
author:
   preferred size. JSplitterBar can set the bounds of the components
author:
   when the user drags a splitter bar. If the bounds for a component
author:
   are set, use this size.
author:
   checkLayoutSize() - is called for both preferredLayoutSize() and
author:
   minimumLayoutSize(). To calculate the width of the layout, uses the
author:
   actual width of the component, if present, or uses the preferred width
author:
   of the component.



Field Summary
final public static  intHORIZONTAL
    
final public static  intVERTICAL
    
static  JSplitterBardragee
    

Constructor Summary
public  SplitterLayout()
    
public  SplitterLayout(boolean fill)
    

Method Summary
final public  voidaddLayoutComponent(Component comp, Object constraints)
     Adds a component w/ constraints to the layout.
final public  voidaddLayoutComponent(String name, Component comp)
     Adds a component w/ a String constraint to the layout.
final public  DimensioncheckLayoutSize(Container target, boolean getPrefSize)
    
public  booleangetFill()
    
final public  floatgetLayoutAlignmentX(Container parent)
    
final public  floatgetLayoutAlignmentY(Container parent)
    
final public  voidinvalidateLayout(Container target)
    
final public  voidlayoutContainer(Container target)
    
final public  DimensionmaximumLayoutSize(Container target)
     Determines the maximum amount of space that could be used when laying out the components in the specified container.
final public  DimensionminimumLayoutSize(Container target)
     Determines the minimum amount of room requested for the layout of components contained in the specified container.
final public  DimensionpreferredLayoutSize(Container target)
     Determines the preferred amount of room requested for the layout of components contained in the specified container.
final public  voidremoveLayoutComponent(Component comp)
     Removes a component from the layout.
public  voidsetFill(boolean fill)
    
final public  StringtoString()
    

Field Detail
HORIZONTAL
final public static int HORIZONTAL(Code)
Aligns components horizontally -- SplitterBars will move left-right



VERTICAL
final public static int VERTICAL(Code)
Aligns components vertically -- SplitterBars will move up/down



dragee
static JSplitterBar dragee(Code)




Constructor Detail
SplitterLayout
public SplitterLayout()(Code)



SplitterLayout
public SplitterLayout(boolean fill)(Code)
Create a new SplitterLayout
Parameters:
  orientation - -- VERTICAL or HORIZONTAL
Parameters:
  fill - - expand to fill target or use preferred size of components




Method Detail
addLayoutComponent
final public void addLayoutComponent(Component comp, Object constraints)(Code)
Adds a component w/ constraints to the layout. This should only be called by java.awt.Container's add method.



addLayoutComponent
final public void addLayoutComponent(String name, Component comp)(Code)
Adds a component w/ a String constraint to the layout. This should only be called by java.awt.Container's add method.



checkLayoutSize
final public Dimension checkLayoutSize(Container target, boolean getPrefSize)(Code)



getFill
public boolean getFill()(Code)



getLayoutAlignmentX
final public float getLayoutAlignmentX(Container parent)(Code)
Tells the caller that we prefer to be centered



getLayoutAlignmentY
final public float getLayoutAlignmentY(Container parent)(Code)
Tells the caller that we prefer to be centered



invalidateLayout
final public void invalidateLayout(Container target)(Code)
Does not have any effect (overridden to null the effect)



layoutContainer
final public void layoutContainer(Container target)(Code)
Lays out the components in the specified container by telling them what their size will be



maximumLayoutSize
final public Dimension maximumLayoutSize(Container target)(Code)
Determines the maximum amount of space that could be used when laying out the components in the specified container. -- the container being laid out



minimumLayoutSize
final public Dimension minimumLayoutSize(Container target)(Code)
Determines the minimum amount of room requested for the layout of components contained in the specified container.
Parameters:
  target - -- the Container being laid out



preferredLayoutSize
final public Dimension preferredLayoutSize(Container target)(Code)
Determines the preferred amount of room requested for the layout of components contained in the specified container.
Parameters:
  target - -- the Container being laid out



removeLayoutComponent
final public void removeLayoutComponent(Component comp)(Code)
Removes a component from the layout. This should only be called by java.awt.Container's remove method.



setFill
public void setFill(boolean fill)(Code)



toString
final public String toString()(Code)
Returns a String representation of the Layout



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.