?? splitpanetest.xml
字號:
<?xml version="1.0"?><!-- Test case for the split pane--><application> <window caption="SplitPaneTest" width="600" height="600" centered="true"/> <resources> <script><![CDATA[function SplitPaneTest() { var appWin = application.getWindow(); var l1 = new BiLabel("Left Label. Min Height = 100\nRight click to change" + " orientation\nUse UP and DOWN keys to change divider size\nUse" + " '1' / '2' to toggle the visibility of the left / right components."); var l2 = new BiLabel("Right Label. Min width = 100\nDouble click to change" + " continuousLayout"); var b = new BiBorder(1, "solid", "ThreeDShadow"); l1.setBorder(b); l2.setBorder(b); l1.setPadding(4); l2.setPadding(4); l1.setBackColor("window"); l2.setBackColor("window"); l1.setMinimumHeight(100); l2.setMinimumWidth(100); l1.setWrap(true); l2.setWrap(true); l1.setOverflow("auto"); l2.setOverflow("auto"); var sp = new BiSplitPane("horizontal", l1, l2); appWin.add(sp); sp.setLocation(5,5); sp.setRight(5); sp.setBottom(5); //sp.setContinuousLayout(false); sp.setOrientation("horizontal"); appWin.addEventListener("contextmenu", function (e) { sp.setOrientation( sp.getOrientation() == "horizontal" ? "vertical" : "horizontal"); }); appWin.addEventListener("dblclick", function (e) { sp.setContinuousLayout( !sp.getContinuousLayout() ); }); appWin.addEventListener("keydown", function (e) { var kc = e.getKeyCode(); switch (kc) { case BiKeyboardEvent.DOWN: var s = sp.getDividerSize(); s = Math.max(2, s - 2); sp.setDividerSize(s); break; case BiKeyboardEvent.UP: var s = sp.getDividerSize(); s = Math.max(2, s + 2); sp.setDividerSize(s); break; case "1".charCodeAt(0): sp.setLeftVisible( !sp.getLeftVisible() ); //alert("leftVisible: " + sp.getLeftVisible() + "\n" + // "rightVisible: " + sp.getRightVisible()) break; case "2".charCodeAt(0): sp.setRightVisible( !sp.getRightVisible() ); //alert("leftVisible: " + sp.getLeftVisible() + "\n" + // "rightVisible: " + sp.getRightVisible()) break; } });}SplitPaneTest.main = function () { new SplitPaneTest; }; ]]></script> </resources></application>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -