Home
Categories
Dictionary
Download
Project Details
Changes Log
Who We Are
FAQ
License

Specifying a Superlayer cockpit configuration



This tutorial explains how to specify and use a Superlayer cockpit configuration. We will define the following cockpit configuration for one display (width: 15000, height: 10000):
  • The first layout contain two windows:
    • The first Window (width: 10000, height: 10000) contains two Layouts:
      • The first child layout contains two windows:
        • The first window (width: 10000, height: 5000) contains one Layer 1
        • The second window (width: 10000, height: 5000) contains one Layer 2
      • The second child layout contains only one window with one Layer 3
    • The second window (width: 5000, height: 10000) contains one Layer 4
  • The second layout contain only one window with one Layer 5


superlayertutorial

Specifying the cockpit configuration

Reference the Definition File

We suppose that our Layers 1, 2, 3, 4, 5 are all defined (see the the Definition File).

We will reference our Definition File in our cockpit configuration:
      <cockpit>
         <DFFiles>
            <df path="windowLayoutsLayers.xml" />
         </DFFiles>
      </cockpit>

Specifying the display

We will specify one display with two layouts:
      <cockpit>
         <DFFiles>
            <df path="windowLayoutsLayers.xml" />
         </DFFiles>
         <configs border="255,255,255" borderWidth="3">
            <display id="1" name="display" width="15000" height="10000" defaultLayout="layout1">
               <layout name="layout1"/>
               <layout name="layout2"/>                  
            </display>
         </configs>
      </cockpit>

Specifying the second layout

The second layout only contains one window with one layer 5, so we need to define this window in the windows geometry:
      <cockpit>
         <DFFiles>
            <df path="windowLayoutsLayers.xml" />
         </DFFiles>
         <windows>
           <windowDef name="WindowFull" width="15000" height="10000" x="0" y="0" />       
         </windows>         
         <configs border="255,255,255" borderWidth="3">
            <display id="1" name="display" width="15000" height="10000" defaultLayout="layout1">
               <layout name="layout1"/>
               <layout name="layout2">   
                 <window name="WindowFull" > 
                   <layer layerID="5" />                            
                 </window>                                 
               </layout>                                 
            </display>
         </configs>
      </cockpit>

Specifying the first layout

The first layout contains two windows:
  • The first Window (width: 10000, height: 10000)
  • The second window (width: 5000, height: 10000) contains one Layer 4
      <cockpit>
         <DFFiles>
            <df path="windowLayoutsLayers.xml" />
         </DFFiles>
         <windows>
            <windowDef name="WindowFull" width="15000" height="10000" x="0" y="0" />
            <windowDef name="Window1" width="10000" height="10000" x="0" y="0" />      
            <windowDef name="Window2" width="5000" height="10000" x="10000" y="0" />           
         </windows>
         <configs border="255,255,255" borderWidth="3">
            <display id="1" name="display" width="15000" height="10000" defaultLayout="1">
               <layout name="layout1">
                  <window name="Window1" />
                  <window name="Window2">
                     <layer layerID="4" />                            
                  </window>            
               </layout>
               <layout name="layout2">
                  <window name="WindowFull" >
                     <layer layerID="5" />                           
                  </window>            
               </layout>         
            </display>
         </configs>
      </cockpit>

Specifying the content of the first layout

The first window of the first layout contains two layouts:
  • The first child layout contains two windows:
    • The first window (width: 10000, height: 5000) contains one Layer 1
    • The second window (width: 10000, height: 5000) contains one Layer 2
  • The second child layout contains only one window with one Layer 3
      <cockpit>
         <DFFiles>
            <df path="windowLayoutsLayers.xml" />
         </DFFiles>
         <windows>
            <windowDef name="WindowFull" width="15000" height="10000" x="0" y="0" />
            <windowDef name="Window1" width="10000" height="10000" x="0" y="0" />      
            <windowDef name="Window2" width="5000" height="10000" x="10000" y="0" />  
            <windowDef name="Window3" width="10000" height="5000" x="0" y="0" />      
            <windowDef name="Window4" width="10000" height="5000" x="0" y="5000" />          
         </windows>
         <configs border="255,255,255" borderWidth="3">
            <display id="1" name="display" width="15000" height="10000" defaultLayout="1">
               <layout name="layout1" id="1">
                  <window name="Window1" defaultLayout="childLayout1">
                     <layout name="childLayout1" id="1">
                        <window name="Window3">
                           <layer layerID="1" />
                        </window>
                        <window name="Window4">
                           <layer layerID="2" />
                        </window>                  
                     </layout>               
                     <layout name="childLayout2">
                        <window name="Window1">
                           <layer layerID="3" />
                        </window>                  
                     </layout>                              
                  </window>
                  <window name="Window2">
                     <layer layerID="4" />                            
                  </window>            
               </layout>
               <layout name="layout2">
                  <window name="WindowFull" >
                     <layer layerID="5" />                           
                  </window>            
               </layout>         
            </display>
         </configs>
      </cockpit>

Setting the SuperLayer application ID and Layer ID

To finalize our cockpit specification, we will set the application ID and Layer ID for the SuperLayer:
      <cockpit appliID="1" layerID="10">
         ...
      </cockpit>

Generating the SuperLayer for the Client

We will generate the SuperLayer for the CLient using the Cockpit Plugin.

Setting the Server configuration

We define the Server configuration[1] :
      graphics=DefGraphics.xml
      ui=LookAndFeel.xml
      pictures=DefPictures.xml
      lf=JavaFX
      logServerArea=true
      server.menus=true
      server.uiCombo=true
      logMaximumLines=50
      windowManager=windows
      server.windows=cockpitConf.xml
      server.computeLayerSize=false
      server.superLayer=true            

Start the Server

As we want to use a JavaFX Look and Feel, we will use the JavaFX launcher:
      java -jar jfxServer.jar
As the configuration file is not defined here, the Server will ask for it. Look for the properties File you just defined. Two windows will appear:
The Server Display Window:
superlayerexample

The Server console Window:
tutoserverwindow

Notes

See also


Categories: cockpit | server | tutorials | user

Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence