You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2013/03/12 12:19:25 UTC
svn commit: r1455496 -
/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_901.bxml
Author: smartini
Date: Tue Mar 12 11:19:24 2013
New Revision: 1455496
URL: http://svn.apache.org/r1455496
Log:
PIVOT-901, the test case
Added:
pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_901.bxml
Added: pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_901.bxml
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_901.bxml?rev=1455496&view=auto
==============================================================================
--- pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_901.bxml (added)
+++ pivot/branches/2.0.x/tests/src/org/apache/pivot/tests/issues/pivot_901.bxml Tue Mar 12 11:19:24 2013
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you 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.
+-->
+
+<Window title="List Views [PIVOT-901]" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:app="org.apache.pivot.tests.issues"
+ xmlns:content="org.apache.pivot.wtk.content"
+ xmlns="org.apache.pivot.wtk"
+>
+
+ <bxml:script>
+ <![CDATA[
+ importPackage(java.lang); // required to use System.out and System.err
+ importPackage(org.apache.pivot.util); // required to use Pivot Utility class Console
+ importPackage(org.apache.pivot.wtk); // required to use Pivot WTK classes
+
+ System.out.println("BXML Scripts successfully initialized");
+ ]]>
+ </bxml:script>
+
+
+ <BoxPane orientation="vertical">
+
+ <Border>
+
+ <BoxPane orientation="vertical">
+ <!-- Test empty value as first element in ListView -->
+ <Label text="Select one element (listDataKey not set):"/>
+ <ListButton bxml:id="listButton" buttonData="Number"
+ listData="['', 'One', 'Two', 'Three']"
+ >
+ <listButtonSelectionListeners>
+ function selectedIndexChanged(listButton, previousSelectedIndex) {
+ System.out.println("selectedIndexChanged: was " + previousSelectedIndex + ", now it's " + listButton.selectedIndex);
+ }
+ </listButtonSelectionListeners>
+ </ListButton>
+
+ <PushButton bxml:id="button" buttonData="Log Selected">
+ <buttonPressListeners>
+ function buttonPressed(button) {
+ System.out.println("Select item at index " + listButton.getSelectedIndex() + " in the list, with:"
+ + ", item = { " + listButton.getSelectedItem() + " }"
+ + ", key " + listButton.getSelectedItemKey()
+ + "."
+ );
+ }
+ </buttonPressListeners>
+ </PushButton>
+ </BoxPane>
+
+ </Border>
+
+ </BoxPane>
+
+</Window>