Module: nagvis
Branch: master
Commit: d5210dcded2a27ff1b35d4e428af03395a2212a8
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=d5210dcded2a27ff1b35d4e428af03395a2212a8

Author: Andriy Skuratov <[email protected]>
Date:   Tue Jul 14 19:34:30 2009 +0300

Added the ui for services relation setting

---

 uifx/src/modules/gmap/DialogRelation.mxml |   54 ++++++++++++++++++++++------
 1 files changed, 42 insertions(+), 12 deletions(-)

diff --git a/uifx/src/modules/gmap/DialogRelation.mxml 
b/uifx/src/modules/gmap/DialogRelation.mxml
index 0c11c5a..1c5aa5a 100644
--- a/uifx/src/modules/gmap/DialogRelation.mxml
+++ b/uifx/src/modules/gmap/DialogRelation.mxml
@@ -20,24 +20,54 @@
 <Dialog xmlns="modules.gmap.*" 

        xmlns:mx="http://www.adobe.com/2006/mxml";

        xmlns:flexlib="http://code.google.com/p/flexlib/";

- xmlns:ns1="flexlib.controls.*">

+       creationComplete="init()"

+ >

+       <mx:Script>

+               <![CDATA[

+                       import mx.controls.CheckBox;

+                       import mx.collections.ArrayCollection;

+                       

+                       [Bindable]

+                       private var services:ArrayCollection = new 
ArrayCollection([

+                               {selected:false, name:"ping", host:"procyon"},

+                               {selected:false, name:"vpn", 
host:"gateway.op5.se"},

+                               {selected:false, name:"wiki", host:"polyaris"},

+                               {selected:false, name:"disk", host:"seawolf"},

+                               {selected:false, name:"ping", host:"escolar"}

+                       ]);

+                       

+                       private function init():void

+                       {

+                               services.filterFunction = filterService; 

+                       }

+                       

+                       private function filterService(item:Object):Boolean

+                       {

+                               if(item.name.search(sname.text) < 0)

+                                       return false;

+                               

+                               return true;

+                       }

+               ]]>

+       </mx:Script>

        <flexlib:HAccordion left="10" right="20" top="40" bottom="40" 
styleName="accordion" creationPolicy="all" selectedIndex="1">

                <mx:Canvas label="Hosts" width="100%" height="100%">

                </mx:Canvas>

-               <mx:Canvas label="Services" width="100%" height="100%">

-                       <mx:DataGrid right="0" left="0" bottom="0" top="30" 
showHeaders="false" paddingLeft="2" paddingRight="2" paddingBottom="0" 
paddingTop="0">

+               <mx:Canvas label="Services" x="0" y="0" width="100%" 
height="100%">

+                       <mx:DataGrid id="serviseGrid" dataProvider="{services}" 
verticalGridLines="false" right="2" left="2" bottom="0" top="30" 
showHeaders="false">

                                <mx:columns>

-                                       <mx:DataGridColumn dataField="col1"/>

-                                       <mx:DataGridColumn dataField="col2"/>

-                                       <mx:DataGridColumn dataField="col3"/>

-                                       <mx:DataGridColumn dataField="col4"/>

+                                       <mx:DataGridColumn dataField="selected" 
itemRenderer="mx.controls.CheckBox" width="15"/>

+                                       <mx:DataGridColumn dataField="name"/>

+                                       <mx:DataGridColumn dataField="host"/>

+                                       <mx:DataGridColumn 
dataField="location"/>

+                                       <mx:DataGridColumn dataField="link"/>

                                </mx:columns>

                        </mx:DataGrid>

-                       <mx:HBox y="0" width="100%" horizontalGap="1">

-                               <ns1:PromptingTextInput width="100%" 
prompt="Name"/>

-                               <ns1:PromptingTextInput width="100%" 
prompt="Host"/>

-                               <ns1:PromptingTextInput width="100%" 
prompt="Location"/>

-                               <ns1:PromptingTextInput width="100%" 
prompt="Service"/>

+                       <mx:HBox y="0" right="2" left="15" horizontalGap="1">

+                               <flexlib:PromptingTextInput id="sname" 
width="100%" prompt="Name" change="services.refresh()"/>

+                               <flexlib:PromptingTextInput id="shost" 
width="100%" prompt="Host"/>

+                               <flexlib:PromptingTextInput id="slocation" 
width="100%" prompt="Location"/>

+                               <flexlib:PromptingTextInput id="slink" 
width="100%" prompt="Link"/>

                        </mx:HBox>              

                </mx:Canvas>

                <mx:Canvas label="HostGroups" width="100%" height="100%">



------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to