<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright © 2008, FlexDomino.net

Licensed under the Apache License, Version 2.0 (the "License");

You may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and 
limitations under the License.
-->

<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    creationComplete="dApplicationCompletion()"
    autoLayout="true"
    layout="absolute" 
    width="100%" 
    height="100%"  
    horizontalScrollPolicy="off" 
    verticalScrollPolicy="off"
    horizontalAlign="center" 
    verticalAlign="middle"
    paddingBottom="5" 
    paddingRight="5" 
    paddingTop="5" 
    paddingLeft="5" 
    backgroundColor="#ffffff"
    backgroundAlpha="0.0" 
    viewSourceURL="srcview/index.html" 
    xmlns:ns1="bridge.*"> 
    
    <mx:Script source="assets/scripts/FlexDominoViewerAS.as"/>

    <mx:Style>
        @font-face 
        {
            src: local("Impact"); 
            font-family: Impact;
        }

        @font-face 
        {
            src: local("Courier New"); 
            font-family: Courier New;
        }

        @font-face 
        {
            src: local("Webdings");
            font-family: Webdings;
        }

        @font-face 
        {
            src: local("Wingdings");  
            font-family: Wingdings;
        }

        @font-face 
        {
            src: local("Symbol"); 
            font-family: Symbol;
        }
    </mx:Style>
    
    <mx:WebService id="wsrv" service="readdominoview" port="Domino">
        <mx:operation 
            name="VIEW2XML"
            makeObjectsBindable="true"
            result="wsrv_view2xml_Loaded(event)"
            resultFormat="e4x"/>
        <mx:operation
            name="VIEWCOLUMNS"
            makeObjectsBindable="true"
            result="wsrv_viewcolumns_Loaded(event)"
            resultFormat="e4x"/>
        <mx:operation 
            name="DBVIEWS"
            makeObjectsBindable="true"
            result="wsrv_dbviews_Loaded(event)"
            resultFormat="e4x"/>
        <mx:operation
            name="GETPROFILELIST"
            makeObjectsBindable="true"
            result="wsrv_getprofilelist_Loaded(event)"
            resultFormat="e4x"/>
    </mx:WebService>

    <mx:Grid 
        width="100%" 
        height="100%"
        paddingBottom="5" 
        paddingRight="5" 
        paddingTop="5" 
        paddingLeft="5">
         
        <mx:GridRow width="100%" height="100%">
            <mx:GridItem width="100%" height="100%">
                <mx:Grid width="100%" height="100%"> 
                    <mx:GridRow 
                        width="100%"
                        height="60"
                        backgroundColor="#DACDB4" 
                        backgroundAlpha="1.0" 
                        cornerRadius="6" 
                        alpha="1.0" 
                        borderStyle="solid" 
                        borderThickness="8" 
                        borderColor="#DACDB4" 
                        shadowDirection="center" 
                        shadowDistance="1" 
                        dropShadowEnabled="true" 
                        dropShadowColor="#000000">
                        
                        <mx:GridItem width="100%" height="100%">
                            <mx:Grid
                                width="100%"
                                height="43"
                                backgroundColor="#EADDC4" 
                                backgroundAlpha="1.0" 
                                cornerRadius="6" 
                                alpha="1.0" 
                                borderStyle="solid" 
                                borderThickness="8" 
                                borderColor="#EADDC4" 
                                shadowDirection="center" 
                                shadowDistance="1" 
                                dropShadowEnabled="true" 
                                dropShadowColor="#000000">
                                
                                <mx:GridRow width="100%" height="100%">
                                    <mx:GridItem width="100%" height="100%">
                                        <mx:Text width="100%" fontWeight="bold" id="dbTitle" enabled="true" text="Flex Domino Viewer" color="#000000" fontFamily="Verdana" fontSize="18" fontAntiAliasType="advanced" fontGridFitType="none" fontSharpness="1" fontThickness="3"/>
                                    </mx:GridItem>
                                    <mx:GridItem width="100" height="100%">
                                        <mx:Button id="SelProfButton" label="Database" click="selectProfile()" enabled="true" buttonMode="true" fontFamily="Verdana"/>
                                    </mx:GridItem>
                                    <mx:GridItem width="70" height="100%">
                                        <mx:Button label="PgUp" click="previousPage()" enabled="true" buttonMode="true"/>
                                    </mx:GridItem>
                                    <mx:GridItem width="70" height="100%">
                                        <mx:Button label="PgDn" click="nextPage()" enabled="true" buttonMode="true"/>
                                    </mx:GridItem>
                                    <mx:GridItem width="51" height="100%">
                                        <mx:Button label="+" click="expandCategories()" enabled="true" buttonMode="true"/>
                                    </mx:GridItem>
                                    <mx:GridItem width="51" height="100%">
                                        <mx:Button label="-" click="collapseCategories()" enabled="true" buttonMode="true"/>
                                    </mx:GridItem>
                                </mx:GridRow>
                            </mx:Grid>
                        </mx:GridItem>
                    </mx:GridRow>
            
                    <mx:GridRow width="100%" height="100%">
                        <mx:GridItem width="100%" height="100%">
                            <mx:HDividedBox width="100%" height="100%">
                                <mx:Grid width="300" height="100%"> 
                                       <mx:GridRow width="100%" height="100%">
                                            <mx:GridItem id="Navi"
                                                width="100%" 
                                                height="100%" 
                                            horizontalAlign="center"
                                            verticalAlign="middle"
                                                backgroundColor="#DACDB4" 
                                                backgroundAlpha="1" 
                                                cornerRadius="6" 
                                                alpha="1.0" 
                                                borderStyle="solid" 
                                                borderThickness="10" 
                                                borderColor="#DACDB4" 
                                                shadowDirection="center" 
                                                shadowDistance="2" 
                                                dropShadowEnabled="true"
                                                dropShadowColor="#000000">
                        
                                                <mx:Tree id="tree" 
                                                    width="100%" 
                                                    height="100%" 
                                                    labelField="@label"
                                                showRoot="false" 
                                                selectedIndex="0" 
                                                enabled="true" 
                                                borderStyle="solid" 
                                                borderColor="#A6A6A6"
                                                cornerRadius="1" 
                                                folderClosedIcon="{null}" 
                                                folderOpenIcon="{null}"
                                                defaultLeafIcon="{null}"                                    
                                                alternatingItemColors="[#FFFFFF, #FFFFFF]" 
                                                borderThickness="1" 
                                                alpha="1.0"/>
                
                                        </mx:GridItem>
                                    </mx:GridRow>
                                </mx:Grid>
            
                                <mx:Grid width="100%" height="100%"> 
                                       <mx:GridRow width="100%" height="100%">
                                             <mx:GridItem id="View"
                                                width="100%" 
                                                height="100%"
                                            backgroundColor="#FFFFFF" 
                                            backgroundAlpha="1.0" 
                                            cornerRadius="6" 
                                            alpha="1.0" 
                                            borderStyle="solid" 
                                            borderThickness="10" 
                                            borderColor="#DACDB4" 
                                            shadowDirection="center" 
                                            shadowDistance="2" 
                                            dropShadowEnabled="true" 
                                            dropShadowColor="#000000">
                                            
                                            </mx:GridItem>
                                    </mx:GridRow>
                                </mx:Grid>
                            </mx:HDividedBox>
                        </mx:GridItem>
                    </mx:GridRow>
            
                    <mx:GridRow width="100%">
                        <mx:GridItem width="100%" horizontalAlign="left" label="Version: Beta ">
                            <mx:Label id="VersionNo" 
                                text="Version: Beta 2 Build 3"
                                textAlign="left" 
                                width="119" 
                                fontSize="9" 
                                fontFamily="Arial" 
                                enabled="false" 
                                selectable="false" 
                                disabledColor="#000000" 
                                fontGridFitType="subpixel"/>
                            <mx:Label id="MemUsage" 
                                text="0"
                                width="100%"
                                textAlign="right" 
                                fontSize="9" 
                                fontFamily="Arial" 
                                enabled="false" 
                                selectable="false" 
                                disabledColor="#000000" 
                                fontGridFitType="subpixel"/>
                        </mx:GridItem>
                    </mx:GridRow>
                </mx:Grid>
            </mx:GridItem>
        </mx:GridRow>
    </mx:Grid>     
</mx:Application>