blob: e73c38f6154f2a79067f68fa5da9ddfe6d03d9a6 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
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 bxml:id="window" title="Alert/Prompt Test" maximized="true"
xmlns:bxml="http://pivot.apache.org/bxml"
xmlns:collections="org.apache.pivot.collections"
xmlns:content="org.apache.pivot.wtk.content"
xmlns="org.apache.pivot.wtk">
<bxml:define>
<Alert bxml:id="alert" title="My Alert" message="Hello World!">
<options>
<collections:ArrayList>
<content:ButtonData icon="@bell.png" text="Bell"/>
<content:ButtonData icon="@clock.png" text="Clock"/>
<content:ButtonData icon="@cup.png" text="Cup"/>
</collections:ArrayList>
</options>
<TextArea text="This is a text area." editable="false"/>
</Alert>
<Prompt bxml:id="prompt" title="My Prompt" message="Hello World!"
options="['One', 'Two', 'Three']">
<TextArea text="This is a text area." editable="false"/>
</Prompt>
</bxml:define>
<FlowPane>
<PushButton buttonData="Stock Alert"
ButtonPressListener.buttonPressed="org.apache.pivot.wtk.Alert.alert('Hello World!', window);"/>
<PushButton buttonData="Stock Prompt"
ButtonPressListener.buttonPressed="org.apache.pivot.wtk.Prompt.prompt('Hello World!', window);"/>
<PushButton buttonData="Custom Alert"
ButtonPressListener.buttonPressed="alert.open(window);"/>
<PushButton buttonData="Custom Prompt"
ButtonPressListener.buttonPressed="prompt.open(window);"/>
</FlowPane>
</Window>