Panel Stacker in JavaScript : Nested Layer « Ajax Layer « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Ext JS
10. Form Control
11. GUI Components
12. HTML
13. Javascript Collections
14. Javascript Objects
15. Javascript Properties
16. jQuery
17. Language Basics
18. Mochkit
19. Mootools
20. Node Operation
21. Object Oriented
22. Page Components
23. Rico
24. Scriptaculous
25. Security
26. SmartClient
27. Style Layout
28. Table
29. Utilities
30. Window Browser
31. YUI Library
Java
Java Tutorial
Java Source Code / Java Documentation
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 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
JavaScript DHTML » Ajax Layer » Nested Layer 
Panel Stacker in JavaScript


<html>
    <head>
        <style>
            BODY
            {
              FONT-SIZE: 10px;
              COLOR: white;
              FONT-FAMILY: Verdana;
              TEXT-DECORATION: none
            }
            .csscontent
            {
                BACKGROUND-COLOR: #326597;
              BORDER-RIGHT: #000000 1px solid;
              BORDER-LEFT: #000000 1px solid;
              BORDER-BOTTOM: #000000 1px solid;
              FONT-SIZE: 10px;
              FONT-FAMILY: Verdana;
              TEXT-DECORATION: none
            }
            .cssmenu
            {
                BACKGROUND-COLOR: #30557A;
              BORDER-TOP: #000000 1px solid;
              BORDER-RIGHT: #000000 1px solid;
              BORDER-LEFT: #000000 1px solid;
              BORDER-BOTTOM: #000000 1px solid;
              FONT-SIZE: 10px;
              FONT-FAMILY: Verdana;
              TEXT-DECORATION: none
            }
            td
            {
              FONT-SIZE: 10px;
              FONT-FAMILY: Verdana;
              TEXT-DECORATION: none
            }
        </style>
        <title>DynAPI Examples - PanelBar & Stacker</title>
        <script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
        <script language="Javascript">
            dynapi.library.setPath('./dynapisrc/');
            dynapi.library.include('dynapi.library');
            dynapi.library.include('dynapi.api');
            dynapi.library.include('dynapi.gui.PanelBar');
            dynapi.library.include('dynapi.gui.Stacker');
            dynapi.library.include('dynapi.functions.Image');
            dynapi.library.include('DragEvent');
        </script>
        <script language="JavaScript">
        
            f=dynapi.functions;
            var imgmin=f.getImage('./dynapiexamples/images/win_min.gif',15,16);
            var imgmax=f.getImage('./dynapiexamples/images/win_max.gif',15,16);
            
            var lyrMenu = new DynLayer();
            lyrMenu.setClass ('cssmenu');
            lyrMenu.setHTML('<table width=100% border=ceppadding=cellspacing=0><tr><td>My Menu #1</td><td align=right>{@min}</td></tr></table>')
            var lyrContent = new DynLayer('This PanelBar and the two under are in the stacker, the stacker reacts on sizechanges and moves the layers when the size changes.');
            lyrContent.setClass ('csscontent');
            var lyrPanelBar = new PanelBar(lyrMenu,lyrContent,20,50,50,200,100,false);
            lyrPanelBar.setMinMaxImg(imgmin,imgmax);
            
            var lyrMenu1 = new DynLayer();
            lyrMenu.setClass ('cssmenu');
            lyrMenu1.setClass ('cssmenu');
            lyrMenu1.setHTML('<table width=100% border=ceppadding=cellspacing=0><tr><td>My Menu #2</td><td align=right>{@min}</td></tr></table>')
            var lyrContent1 = new DynLayer('This PanelBar has been created using a layer for the menu and one for the content.');
            lyrContent1.setClass ('csscontent');
            var lyrPanelBar1 = new PanelBar(lyrMenu1,lyrContent1,20,250,50,200,100,true);
            lyrPanelBar1.setMinMaxImg(imgmin,imgmax);
            
            // Create a PanelBar with HTML instead of layers
            var lyrPanelBar2 = new PanelBar(
                '<table width=100% border=ceppadding=cellspacing=0><tr><td>My Menu #3</td><td align=right>{@min}</td></tr></table>',
                'This PanelBar has been created using simply html-text instead of two layers.',
                20,250,50,200,100,false);
            lyrPanelBar2.setMinMaxImg(imgmin,imgmax);
            
            // Manipulate the menu- and contentlayer
            lyrPanelBar2.getContentLayer().setClass ('csscontent');
            lyrPanelBar2.getMenuLayer().setClass ('cssmenu');
            
            // Just test the empty constructor
            // This is important for subclassing
            var constructorTest = new PanelBar();
            
            dynapi.document.addChild(lyrPanelBar);
            dynapi.document.addChild(lyrPanelBar1);
            dynapi.document.addChild(lyrPanelBar2);
            
            var objStacker = new Stacker()
            objStacker.add(lyrPanelBar);
            objStacker.add(lyrPanelBar1);
            objStacker.add(lyrPanelBar2);
        
        </script>
    </head>
    <body>
        <script>
          dynapi.document.insertAllChildren();
        </script>

    </body>
</html>


           
       
dynapi.zip( 791 k)
Related examples in the same category
1. Relative Layers : Nested layers example
2. Dynlayers are nested 10 deep
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.