My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0" encoding="utf-8"?>
<!--
// Copyright 2010 Michael Schmalle - Teoti Graphix, LLC
//
// Licensed 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
//
// Author: Michael Schmalle, Principal Architect
// mschmalle at teotigraphix dot com
-->
<!--
DockBar01_Sample.mxml
-->
<!---
* desc
*
* @author Michael Schmalle
* @copyright Teoti Graphix, LLC
* @productversion 1.0
-->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:tx="http://tx.teotigraphix.org/flex4">
<fx:Script>
<![CDATA[
import org.teotigraphix.ui.skins.DockBarSkin;

import spark.events.IndexChangeEvent;

[Bindable]
[Embed(source="/assets/document-open.png")]
private var theIcon:Class;

protected function placement_changeHandler(event:IndexChangeEvent):void
{
dockBar.placement = placement.selectedItem as String;
}

protected function autoHide_changeHandler(event:Event):void
{
dockBar.autoHide = autoHide.selected;
}

protected function dockBar_changeHandler(event:IndexChangeEvent):void
{
var index:int = event.newIndex;
if (index == -1)
return;

status.text = "Index " + index +
" Label " + dockBar.dataProvider.getItemAt(index).label;
}

]]>
</fx:Script>

<fx:Declarations>
<s:Fade id="showEffect" alphaFrom="0" alphaTo="1" />
<s:Fade id="hideEffect" alphaFrom="1" alphaTo="0" />
</fx:Declarations>

<tx:DockBar id="dockBar"
skinClass="org.teotigraphix.ui.skins.DockBarSkin"
autoHideThickness="10"
showEffect="{showEffect}"
hideEffect="{hideEffect}"
change="dockBar_changeHandler(event)">

<tx:dataProvider>

<s:ArrayList>
<fx:Object label="One" toolTip="ToolTip One" icon="{theIcon}"/>
<fx:Object label="Two" toolTip="ToolTip Two" icon="{theIcon}"/>
<fx:Object label="Three" toolTip="ToolTip Three" icon="{theIcon}"/>
<fx:Object label="Four" toolTip="ToolTip Four" icon="{theIcon}"/>
</s:ArrayList>

</tx:dataProvider>

</tx:DockBar>

<s:Panel title="Properties"
verticalCenter="0" horizontalCenter="0">

<s:layout>
<s:VerticalLayout paddingTop="10" paddingLeft="10"
paddingRight="10" paddingBottom="10"/>
</s:layout>

<mx:Text text="Auto hide the DockBar"/>

<s:ToggleButton id="autoHide"
label="autoHide"
change="autoHide_changeHandler(event)"/>

<mx:Text text="Set the placement of the DockBar"/>

<s:DropDownList id="placement"
selectedIndex="0"
change="placement_changeHandler(event)">

<s:dataProvider>
<s:ArrayList>
<fx:String>top</fx:String>
<fx:String>right</fx:String>
<fx:String>bottom</fx:String>
<fx:String>left</fx:String>
</s:ArrayList>
</s:dataProvider>

</s:DropDownList>

<s:controlBarContent>
<s:HGroup>
<mx:Text id="status"/>
</s:HGroup>
</s:controlBarContent>

</s:Panel>

</s:Application>

Change log

r9 by m...@teotigraphix.com on May 17, 2010   Diff
- updated project's Flex Application list
(All examples will run as applications)
- added namespace mxml declaration in dock
bar example
- added a README file for getting the
applications running
Go to: 
Project members, sign in to write a code review

Older revisions

r8 by m...@teotigraphix.com on May 12, 2010   Diff
- added DockBar01_Sample to bars
package
All revisions of this file

File info

Size: 3638 bytes, 130 lines
Powered by Google Project Hosting