?? olapgridtest2.xml
字號:
<?xml version="1.0"?><!-- This is OLAP Grid test uses a CSV file as the data model.--><Application xmlns:x="http://www.w3.org/1999/xhtml"> <Window caption="OLAP Grid Test" width="600" height="480" backColor="Window" contextMenu="context-menu"> <Menu id="context-menu"> <MenuItem text="View XML Source" onaction="window.open(application.getAdf().getUri())"/> </Menu> <Image uri="../html/images/infomark.48.png" width="48" height="48" top="20" left="20"/> <Label top="20" right="20" left="80" canSelect="true"> <x:h1 style="font-size: 32px; margin-top: 0;">OLAP Grid</x:h1> <x:p>This OLAP grid is populated from a <x:a href="../test/olapsample.csv">CSV file</x:a></x:p> <x:p>A few things to try out</x:p> <x:ul> <x:li>Resize rows and columns</x:li> <x:li>If text does not fit in the cell a tool tip is shown (IE only)</x:li> <x:li>Double click to start to edit cell (or use F2)</x:li> <x:li>Navigate using arrow keys, enter and tab</x:li> <x:li>Use context menu to make part of the grid fixed</x:li> </x:ul> </Label> <OlapGrid id="g" left="20" top="230" right="20" bottom="20"> <OlapGrid.dataModel> <CsvOlapDataModel uri="olapsample.csv"/> </OlapGrid.dataModel> </OlapGrid> </Window> <Resources> <Package name="OlapGrid"/> <Script src="CsvOlapDataModel.js"/> <Script><![CDATA[function OlapGridTest2(){ var g = application.getComponentById("g"); var dm = g.getDataModel(); var vm = g.getViewManager(); dm.getContextMenu = function ( x, y ) { if ( x == null || y == null ) return null; var m = new BiMenu; var mi = new BiMenuItem( "Set this to the non fixed cell" ); mi.addEventListener( "action", function ( e ) { vm.setNonFixedCell( 0, x ); vm.setNonFixedCell( 1, y ); g.update(); } ); m.add( mi ); mi = new BiCheckBoxMenuItem("Use custom scroll bars", !g.getUseNativeScrollBars()); mi.addEventListener("change", function (e) { g.setUseNativeScrollBars(!e.getTarget().getChecked()); }); m.add(mi); return m; }; // Create and attach an inline editing model var iem = new BiInlineEditModel; iem.addEventListener( "beforeshow", function ( e ) { iem.setValue( dm.getCellText( iem.getColumn(), iem.getRow() ) ); } ); iem.addEventListener( "change", function ( e ) { var v = iem.getValue(); dm.setCellText( iem.getColumn(), iem.getRow(), v ); } ); g.setInlineEditModel( iem );}OlapGridTest2.main = function (){ new OlapGridTest2;}; ]]></Script> </Resources></Application>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -