SlideShare ist ein Scribd-Unternehmen logo
1 von 89
Cross Platform Development ,[object Object],[object Object]
About Me
Topics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Windows Windows have been a part of traditional desktop applications for many years. If you have ever opened a help window or a preferences window of a desktop application, you have most likely experienced a multi- window application.  AIR has given us the ability to create windows as part of AIR desktop applications as well. Each window is a fully-fledged system window and can act independently of the additional windows; it and can even persist after the main application window has been closed.
Create a Window private   function  openSampleWindow(): void { // create the new window and add some properties var  win:Window =  new  Window(); win.width = 200; win.height = 150; win.title =  "SampleWindow" ; win.open(); }
Results on Mac WindowSample1
Results on Windows WindowSample1
NativeMenus AIR has also provided the ability to integrate menus into your applications. However, the implementation is different depending on which operating system your application is currently running on.
Mac OS X Applications that run on Mac OS X like the one I am currently using have the application menu in an upper control bar.
Windows XP, Vista Windows 2000, XP, Vista, etc include menus within the application window as shown in the screen shot of Flex Builder below.
Create a NativeMenu // create main menu var  nativeMenu:NativeMenu =  new  NativeMenu(); // create a few menu items var  menuItem1:NativeMenuItem =  new  NativeMenuItem( "Menu Item 1" ); var  menuItem2:NativeMenuItem =  new  NativeMenuItem( "Menu Item 2" ); // add menu items nativeMenu.addItem(menuItem1); nativeMenu.addItem(menuItem2);
NativeMenu on Mac // if supported, add a menuItem to application if (NativeApplication.supportsMenu){ var  menuItem:NativeMenuItem =  new  NativeMenuItem("Menu Name"); menuItem.submenu = nativeMenu; NativeApplication.nativeApplication.menu.addItem(menuItem); }
Results on Mac WindowSample2
NativeMenu on Windows // if supported, add a nativeMenu to win if (NativeWindow.supportsMenu){ win.nativeWindow.menu = nativeMenu; }
Results on Windows WindowSample3
Dock & SystemTray  Icons The Dock icon on the Mac and the icons that appear in the SystemTray on Windows machines offer insight and alerts to the user of changes within the application.
Set a Dock Or  SystemTray Icon   [ Embed (source= "assets/e16.png" )]   private   var  Icon16:Class;   private   var  bitmap16:Bitmap =  new  Icon16();     [ Embed (source= "assets/e32.png" )]   private   var  Icon32:Class;   private   var  bitmap32:Bitmap =  new  Icon32();     [ Embed (source= "assets/e48.png" )]   private   var  Icon48:Class;   private   var  bitmap48:Bitmap =  new  Icon48();   [ Embed (source= "assets/e128.png" )]   private   var  Icon128:Class;   private   var  bitmap128:Bitmap =  new  Icon128();
Set a Dock Or  SystemTray Icon private   function  setDockIcon(): void { var  icons:Array = [bitmap16.bitmapData, bitmap32.bitmapData, bitmap48.bitmapData, bitmap128.bitmapData] NativeApplication.nativeApplication.icon.bitmaps = icons; }
ResultS Mac Windows DockTrayIcon1
Dock & SystemTray  Tooltips & Menus Only the Windows SystemTray supports icon tooltips. Both Dock & SystemTray icons support menus being attached to them for click and hold on Mac and right click on Windows.
Set a SystemTray  Icon Tooltip private   function  setSystemTrayToolTip(): void { if (NativeApplication.supportsSystemTrayIcon){ SystemTrayIcon(NativeApplication.nativeApplication.icon). tooltip =  "System Tray" ; } }
ResultS Windows DockTrayIcon2
Set a Dock Or SystemTray  Menu // check for support of DockIcon if (NativeApplication.supportsDockIcon) { DockIcon(NativeApplication.nativeApplication.icon). menu = nativeMenu; } // check for support of SystemTrayIcon if (NativeApplication.supportsSystemTrayIcon){ SystemTrayIcon(NativeApplication.nativeApplication.icon). menu = nativeMenu; }
ResultS Mac DockTrayIcon3
ResultS Windows DockTrayIcon3
Context Menus AIR gives developers the ability to create custom Context menus which are right-click on Windows and ctrl-click on Mac. Context menus are created in the same manner as NativeMenus.
Create a context Menu // create main menu var  nativeMenu:NativeMenu =  new  NativeMenu(); // create a few menu items var  menuItem1:NativeMenuItem =  new  NativeMenuItem( "Menu Item 1" ); var  menuItem2:NativeMenuItem =  new  NativeMenuItem( "Menu Item 2" ); // add menu items nativeMenu.addItem(menuItem1); nativeMenu.addItem(menuItem2);  // create a submenu var  subMenu:NativeMenu =  new  NativeMenu(); // create a submenu item var  menuItem3:NativeMenuItem =  new  NativeMenuItem( "Menu Item 3" ); // add item to submenu subMenu.addItem(menuItem3); // set the submenu to menuItem1 menuItem1.submenu = subMenu; // add Context menu to main application window this .contextMenu = nativeMenu;
ResultS Mac ContextMenu1
ResultS Windows ContextMenu1
Context Menus Context Menus can also be assigned per Window within AIR applications.
Context Menus var  win:Window =  new  Window();   win.width = 200;   win.height = 150;   win.title =  "SampleWindow" ;   win.open();   // add context menu to win   win.contextMenu = nativeMenu;
ResultS Mac ContextMenu2
ResultS Windows ContextMenu2
Alerts There is a concept of alerting the user that the application needs attention with AIR on Mac by bouncing the dock icon. On Windows, you can set a window in the task bar to blink.
DockIcon Bounce if (NativeApplication.supportsDockIcon){ DockIcon(NativeApplication.nativeApplication.icon). bounce(NotificationType.CRITICAL); } NotificationType can be CRITICAL which will bounce until a user interaction occurs or INFORMATIONAL which will simply bounce once. DockBounce
Window Notify if (NativeWindow.supportsNotification){ this .nativeWindow.notifyUser(NotificationType.CRITICAL); } NotificationType can be CRITICAL which will blink until a user interaction occurs or INFORMATIONAL which will simply show a highlight on the window in the task bar. WindowNotify
So? Wouldn’t it be great if all of the functionality that I have just shown you was able to be implemented with just a few lines of code?
Good News! The SuperWindow component part of the EverythingFlexAIR1.swc will let you manage menus, icons, icon menus, alerts, and context menus. Plus even more!!
What is SuperWindow? The SuperWindow component was originally created to solve the job of managing NativeMenus. As previously demonstrated NativeMenus function differently on Mac vs Windows.
managing NativeMenus ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
MULTI_MENU_MODE = “true” When MULTI_MENU_MODE=”true” the application will be in multi menu mode. In this mode a new menu will be added to the right of the default AIR menus and will only be removed when the accompanying Window is closed.
MULTI_MENU_MODE = “true” SuperWindows1
MULTI_MENU_MODE = “false” When MULTI_MENU_MODE=”false” the application will be in single menu mode. In this mode one menu will be added to the right of the default AIR menus and will be swapped each time a Window gains focus.
MULTI_MENU_MODE = “false” SuperWindows2
On Windows SuperWindows1
[object Object],[object Object],[object Object],Dock SystemTray Menus
SHOW_SYSDOCK_MENU =”true” SuperWindows3
SuperWindows3 SHOW_SYSDOCK_MENU =”true”
Context Menus ,[object Object],[object Object],[object Object]
showContextMenu=”true” SuperWindows4
showContextMenu=”true” SuperWindows4
Add Window Controls ,[object Object],[object Object],[object Object]
addWindowControls =”true” SuperWindows5
addWindowControls =”true” SuperWindows5
Dock SysTem tray Icons ,[object Object],[object Object],[object Object]
sysDockIconBitmaps SuperWindows6
Alerts Methods ,[object Object],[object Object],[object Object],[object Object],[object Object]
Alert Types SuperWindow supports both NotificationType.CRITICAL and NotificationType.INFORMATIONAL The default is NotificationType.CRITICAL
Native Alerts SuperWindow supports both NotificationType.CRITICAL and NotificationType.INFORMATIONAL The default is NotificationType.CRITICAL
startAlert() To start a SuperWindow alert, a call to the startAlert() method is necessary.  The startAlert() method accepts one argument of type String which is the message the will display as the Icon toolTip or the message within a toast alert. Ex: startAlert(“Something is happening”);
Toast Alert SuperWindows7
What Else? OK, so we have seen the SuperWindow component, but what else is included in the EverythingFlexAIR1.swc component library?
EverythingFlexAIR1.SWC ,[object Object],[object Object],[object Object],[object Object],[object Object]
ContextWindow The ContextWindow component was created to easily add the “close”, “minimixe”, “maximize”, and ‘restore” functionality to AIR windows. The functionality of the ContextWindow component is included within the SuperWindow component.
ContextWindow private   function  createContextWindow(): void { var  w:ContextWindow =  new  ContextWindow(); w.width=300; w.height=200; w.open(); } The ContextWindow works exactly the same as mx.core.Window in that you simply create an instance, set properties, and call the open() method.
ContextWindow <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <ContextWindow  xmlns=&quot; com.everythingflex.air.components.* &quot;  layout=&quot; absolute &quot;  xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot;  width=&quot; 300 &quot; height=&quot; 150 &quot; > <mx:Label  text=&quot; This is a ContextWindow &quot;  horizontalCenter=&quot; 0 &quot; verticalCenter=&quot; 0 &quot;  /> </ContextWindow> You could also create an MXML component from the ContextWindow
ContextWindow ContextWindow1
AlertWindow The AlertWindow component was created to add cross platform “toast” style alerts to AIR applications. The functionality of the AlertWindow component is included within the SuperWindow component.
AlertWindow In additional to all of the properties of mx.core.Window, AlertWindow has two optional properties. ,[object Object],[object Object],[object Object],[object Object]
AlertWindow Create with ActionScript. private   function  createAlertWithAS(): void { var  a:AlertWindow =  new  AlertWindow(); a.title =  &quot;My Alert Title&quot; ; a.height = 100; a.width = 200; a.open(); }
AlertWindow <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <AlertWindow   xmlns=&quot; com.everythingflex.air.components.* &quot; xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; layout=&quot; absolute &quot; title=&quot; My Window &quot; delayTime=&quot; 5 &quot; width=&quot; 300 &quot; height=&quot; 100 &quot; > <mx:Button  label=&quot; Button &quot; x=&quot; 116.5 &quot; y=&quot; 10 &quot; /> <mx:ColorPicker  x=&quot; 10 &quot; y=&quot; 10 &quot; /> <mx:ComboBox  x=&quot; 69 &quot; y=&quot; 40 &quot; /> </AlertWindow> You could also create an MXML component from the AlertWindow
AlertWindow AlertWindow1
ConnectionManager If your application requires an Internet connection, the ConnectionManager class is the easiest way to create a connection test.
ConnectionManager In ConnectionManager’s constructor can accept 3 optional arguments. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ConnectionManager private   var  cm:ConnectionManager =  new  ConnectionManager(); private   var  cm:ConnectionManager =  new  ConnectionManager( true , &quot; http://adobe.com &quot; , &quot;Get Online!&quot; ); Basic Custom Settings
ConnectionManager Properties ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ConnectionManager CM
ConnectionManager CMToast
UpdateManager I built this very simple UpdateManager to make it easy to keep your applications up up to date once they have been distributed to your clients.
UpdateManager In UpdateManager’s constructor requires one argument and has an additional optional argument. ,[object Object],[object Object],[object Object],[object Object]
private   var  cm:ConnectionManager =  new  ConnectionManager(); private   var  cm:ConnectionManager =  new  ConnectionManager( true , &quot; http://adobe.com &quot; , &quot;Get Online!&quot; ); Basic Custom Settings UpdateManager
Properties ,[object Object],[object Object],UpdateManager
version.xml properties UpdateManager ,[object Object],[object Object],[object Object],[object Object]
version.xml sample UpdateManager <?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?><currentVersion version=&quot;1.1&quot;  downloadLocation=&quot; http://www.everythingflex.com/AIR/UM/UM.air &quot;  forceUpdate=&quot;false&quot;  message=&quot;Added new features&quot;/>
UM UpdateManager
EverythingFlexAIR1.SWC 100% FREE! http://blog.everythingflex.com/apollo/components-air
Questions & Contact Info [email_address] http://blog.everythingf lex.com [email_address] http://www.InsideRIA .com
Extras startAtLogin=true allowBrowserInvocation localConnection

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (16)

Android ui menu
Android ui menuAndroid ui menu
Android ui menu
 
Action Bar in Android
Action Bar in AndroidAction Bar in Android
Action Bar in Android
 
Chapt 04 user interaction
Chapt 04 user interactionChapt 04 user interaction
Chapt 04 user interaction
 
Java Swing Custom GUI MVC Component Tutorial
Java Swing Custom GUI MVC Component TutorialJava Swing Custom GUI MVC Component Tutorial
Java Swing Custom GUI MVC Component Tutorial
 
Family Tree Explorer Manual
Family Tree Explorer ManualFamily Tree Explorer Manual
Family Tree Explorer Manual
 
Manual Voyage 200
Manual Voyage 200Manual Voyage 200
Manual Voyage 200
 
Android App Dev Manual-1.doc
Android App Dev Manual-1.docAndroid App Dev Manual-1.doc
Android App Dev Manual-1.doc
 
Android menus in android-chapter15
Android menus in android-chapter15Android menus in android-chapter15
Android menus in android-chapter15
 
Ingles 2do parcial
Ingles   2do parcialIngles   2do parcial
Ingles 2do parcial
 
Family Tree Explorer 9 Premium Manual
Family Tree Explorer 9 Premium ManualFamily Tree Explorer 9 Premium Manual
Family Tree Explorer 9 Premium Manual
 
android menus
android menusandroid menus
android menus
 
Java Event Handling
Java Event HandlingJava Event Handling
Java Event Handling
 
Modelling with uml
Modelling with umlModelling with uml
Modelling with uml
 
JAVA GUI PART III
JAVA GUI PART IIIJAVA GUI PART III
JAVA GUI PART III
 
Java GUI PART II
Java GUI PART IIJava GUI PART II
Java GUI PART II
 
Advance JFACE
Advance JFACEAdvance JFACE
Advance JFACE
 

Andere mochten auch

Cross platform mobile developement introduction
Cross platform mobile developement   introductionCross platform mobile developement   introduction
Cross platform mobile developement introduction
Marcel de Vries
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
bryan costanich
 
Cross Platform, Native Mobile Application Development Using Xamarin and C#
Cross Platform, Native Mobile Application Development Using Xamarin and C#Cross Platform, Native Mobile Application Development Using Xamarin and C#
Cross Platform, Native Mobile Application Development Using Xamarin and C#
Shravan Kumar Kasagoni
 
Cross-platform mobile development: choices and limitations [IndicThreads Mob...
Cross-platform mobile development: choices and limitations  [IndicThreads Mob...Cross-platform mobile development: choices and limitations  [IndicThreads Mob...
Cross-platform mobile development: choices and limitations [IndicThreads Mob...
IndicThreads
 

Andere mochten auch (16)

03 cross platform design
03 cross platform design03 cross platform design
03 cross platform design
 
Cross platform mobile developement introduction
Cross platform mobile developement   introductionCross platform mobile developement   introduction
Cross platform mobile developement introduction
 
Cross Platform Mobile Application Development Using Xamarin and C#
Cross Platform Mobile Application Development Using Xamarin and C#Cross Platform Mobile Application Development Using Xamarin and C#
Cross Platform Mobile Application Development Using Xamarin and C#
 
Synapse india reviews on mobile application development
Synapse india reviews on mobile application developmentSynapse india reviews on mobile application development
Synapse india reviews on mobile application development
 
IBM MobileFirst - Hybrid App Development
IBM MobileFirst - Hybrid App DevelopmentIBM MobileFirst - Hybrid App Development
IBM MobileFirst - Hybrid App Development
 
Most Popular Cross Platform Mobile Development Tools
Most Popular Cross Platform Mobile Development ToolsMost Popular Cross Platform Mobile Development Tools
Most Popular Cross Platform Mobile Development Tools
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
 
Amsterdam HTML5 Game Developement Meetup - ThreeDee Media presentation
Amsterdam HTML5 Game Developement Meetup - ThreeDee Media presentationAmsterdam HTML5 Game Developement Meetup - ThreeDee Media presentation
Amsterdam HTML5 Game Developement Meetup - ThreeDee Media presentation
 
Cross platform mobile application development
Cross platform mobile application developmentCross platform mobile application development
Cross platform mobile application development
 
Cross Platform, Native Mobile Application Development Using Xamarin and C#
Cross Platform, Native Mobile Application Development Using Xamarin and C#Cross Platform, Native Mobile Application Development Using Xamarin and C#
Cross Platform, Native Mobile Application Development Using Xamarin and C#
 
Cross Platform Mobile Application Development
Cross Platform Mobile Application DevelopmentCross Platform Mobile Application Development
Cross Platform Mobile Application Development
 
Cross-platform mobile development: choices and limitations [IndicThreads Mob...
Cross-platform mobile development: choices and limitations  [IndicThreads Mob...Cross-platform mobile development: choices and limitations  [IndicThreads Mob...
Cross-platform mobile development: choices and limitations [IndicThreads Mob...
 
Cross platform web app development
Cross platform web app developmentCross platform web app development
Cross platform web app development
 
Rares Serban, Sr. Mobile Developer at Soft to you - cross-platform development
Rares Serban, Sr. Mobile Developer at Soft to you - cross-platform developmentRares Serban, Sr. Mobile Developer at Soft to you - cross-platform development
Rares Serban, Sr. Mobile Developer at Soft to you - cross-platform development
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Hybrid Mobile App Development - Xamarin
Hybrid Mobile App Development - XamarinHybrid Mobile App Development - Xamarin
Hybrid Mobile App Development - Xamarin
 

Ähnlich wie 360 Flex Atlanta

Writing native Mac apps in C# with Xamarin.Mac - Aaron Bockover
Writing native Mac apps in C# with Xamarin.Mac - Aaron BockoverWriting native Mac apps in C# with Xamarin.Mac - Aaron Bockover
Writing native Mac apps in C# with Xamarin.Mac - Aaron Bockover
Xamarin
 
Menu bars and menus
Menu bars and menusMenu bars and menus
Menu bars and menus
myrajendra
 
Creating a windowed program
Creating a windowed programCreating a windowed program
Creating a windowed program
myrajendra
 
Event handling63
Event handling63Event handling63
Event handling63
myrajendra
 

Ähnlich wie 360 Flex Atlanta (20)

Writing native Mac apps in C# with Xamarin.Mac - Aaron Bockover
Writing native Mac apps in C# with Xamarin.Mac - Aaron BockoverWriting native Mac apps in C# with Xamarin.Mac - Aaron Bockover
Writing native Mac apps in C# with Xamarin.Mac - Aaron Bockover
 
The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.3 book - Part 81 of 184
 
Advance UIAutomator : Documentaion
Advance UIAutomator : DocumentaionAdvance UIAutomator : Documentaion
Advance UIAutomator : Documentaion
 
Menu bars and menus
Menu bars and menusMenu bars and menus
Menu bars and menus
 
Android action bar and notifications-chapter16
Android action bar and notifications-chapter16Android action bar and notifications-chapter16
Android action bar and notifications-chapter16
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
Creating a windowed program
Creating a windowed programCreating a windowed program
Creating a windowed program
 
engineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.pptengineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.ppt
 
Unit 1 informatica en ingles
Unit 1 informatica en inglesUnit 1 informatica en ingles
Unit 1 informatica en ingles
 
Unit i informatica en ingles
Unit i informatica en inglesUnit i informatica en ingles
Unit i informatica en ingles
 
Abstract Window Toolkit
Abstract Window ToolkitAbstract Window Toolkit
Abstract Window Toolkit
 
Swingpre 150616004959-lva1-app6892
Swingpre 150616004959-lva1-app6892Swingpre 150616004959-lva1-app6892
Swingpre 150616004959-lva1-app6892
 
Swing and AWT in java
Swing and AWT in javaSwing and AWT in java
Swing and AWT in java
 
Event handling63
Event handling63Event handling63
Event handling63
 
Intake 38 8
Intake 38 8Intake 38 8
Intake 38 8
 
IOS- Designing with ui tool bar in ios
IOS-  Designing with ui tool bar in iosIOS-  Designing with ui tool bar in ios
IOS- Designing with ui tool bar in ios
 
UNIT-2-AJAVA.pdf
UNIT-2-AJAVA.pdfUNIT-2-AJAVA.pdf
UNIT-2-AJAVA.pdf
 
Web Server Controls CS Set
Web Server Controls CS Set Web Server Controls CS Set
Web Server Controls CS Set
 
Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...
 
UIAutomator
UIAutomatorUIAutomator
UIAutomator
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

360 Flex Atlanta

  • 1.
  • 3.
  • 4. Windows Windows have been a part of traditional desktop applications for many years. If you have ever opened a help window or a preferences window of a desktop application, you have most likely experienced a multi- window application. AIR has given us the ability to create windows as part of AIR desktop applications as well. Each window is a fully-fledged system window and can act independently of the additional windows; it and can even persist after the main application window has been closed.
  • 5. Create a Window private function openSampleWindow(): void { // create the new window and add some properties var win:Window = new Window(); win.width = 200; win.height = 150; win.title = &quot;SampleWindow&quot; ; win.open(); }
  • 6. Results on Mac WindowSample1
  • 7. Results on Windows WindowSample1
  • 8. NativeMenus AIR has also provided the ability to integrate menus into your applications. However, the implementation is different depending on which operating system your application is currently running on.
  • 9. Mac OS X Applications that run on Mac OS X like the one I am currently using have the application menu in an upper control bar.
  • 10. Windows XP, Vista Windows 2000, XP, Vista, etc include menus within the application window as shown in the screen shot of Flex Builder below.
  • 11. Create a NativeMenu // create main menu var nativeMenu:NativeMenu = new NativeMenu(); // create a few menu items var menuItem1:NativeMenuItem = new NativeMenuItem( &quot;Menu Item 1&quot; ); var menuItem2:NativeMenuItem = new NativeMenuItem( &quot;Menu Item 2&quot; ); // add menu items nativeMenu.addItem(menuItem1); nativeMenu.addItem(menuItem2);
  • 12. NativeMenu on Mac // if supported, add a menuItem to application if (NativeApplication.supportsMenu){ var menuItem:NativeMenuItem = new NativeMenuItem(&quot;Menu Name&quot;); menuItem.submenu = nativeMenu; NativeApplication.nativeApplication.menu.addItem(menuItem); }
  • 13. Results on Mac WindowSample2
  • 14. NativeMenu on Windows // if supported, add a nativeMenu to win if (NativeWindow.supportsMenu){ win.nativeWindow.menu = nativeMenu; }
  • 15. Results on Windows WindowSample3
  • 16. Dock & SystemTray Icons The Dock icon on the Mac and the icons that appear in the SystemTray on Windows machines offer insight and alerts to the user of changes within the application.
  • 17. Set a Dock Or SystemTray Icon [ Embed (source= &quot;assets/e16.png&quot; )] private var Icon16:Class; private var bitmap16:Bitmap = new Icon16(); [ Embed (source= &quot;assets/e32.png&quot; )] private var Icon32:Class; private var bitmap32:Bitmap = new Icon32(); [ Embed (source= &quot;assets/e48.png&quot; )] private var Icon48:Class; private var bitmap48:Bitmap = new Icon48(); [ Embed (source= &quot;assets/e128.png&quot; )] private var Icon128:Class; private var bitmap128:Bitmap = new Icon128();
  • 18. Set a Dock Or SystemTray Icon private function setDockIcon(): void { var icons:Array = [bitmap16.bitmapData, bitmap32.bitmapData, bitmap48.bitmapData, bitmap128.bitmapData] NativeApplication.nativeApplication.icon.bitmaps = icons; }
  • 19. ResultS Mac Windows DockTrayIcon1
  • 20. Dock & SystemTray Tooltips & Menus Only the Windows SystemTray supports icon tooltips. Both Dock & SystemTray icons support menus being attached to them for click and hold on Mac and right click on Windows.
  • 21. Set a SystemTray Icon Tooltip private function setSystemTrayToolTip(): void { if (NativeApplication.supportsSystemTrayIcon){ SystemTrayIcon(NativeApplication.nativeApplication.icon). tooltip = &quot;System Tray&quot; ; } }
  • 23. Set a Dock Or SystemTray Menu // check for support of DockIcon if (NativeApplication.supportsDockIcon) { DockIcon(NativeApplication.nativeApplication.icon). menu = nativeMenu; } // check for support of SystemTrayIcon if (NativeApplication.supportsSystemTrayIcon){ SystemTrayIcon(NativeApplication.nativeApplication.icon). menu = nativeMenu; }
  • 26. Context Menus AIR gives developers the ability to create custom Context menus which are right-click on Windows and ctrl-click on Mac. Context menus are created in the same manner as NativeMenus.
  • 27. Create a context Menu // create main menu var nativeMenu:NativeMenu = new NativeMenu(); // create a few menu items var menuItem1:NativeMenuItem = new NativeMenuItem( &quot;Menu Item 1&quot; ); var menuItem2:NativeMenuItem = new NativeMenuItem( &quot;Menu Item 2&quot; ); // add menu items nativeMenu.addItem(menuItem1); nativeMenu.addItem(menuItem2); // create a submenu var subMenu:NativeMenu = new NativeMenu(); // create a submenu item var menuItem3:NativeMenuItem = new NativeMenuItem( &quot;Menu Item 3&quot; ); // add item to submenu subMenu.addItem(menuItem3); // set the submenu to menuItem1 menuItem1.submenu = subMenu; // add Context menu to main application window this .contextMenu = nativeMenu;
  • 30. Context Menus Context Menus can also be assigned per Window within AIR applications.
  • 31. Context Menus var win:Window = new Window(); win.width = 200; win.height = 150; win.title = &quot;SampleWindow&quot; ; win.open(); // add context menu to win win.contextMenu = nativeMenu;
  • 34. Alerts There is a concept of alerting the user that the application needs attention with AIR on Mac by bouncing the dock icon. On Windows, you can set a window in the task bar to blink.
  • 35. DockIcon Bounce if (NativeApplication.supportsDockIcon){ DockIcon(NativeApplication.nativeApplication.icon). bounce(NotificationType.CRITICAL); } NotificationType can be CRITICAL which will bounce until a user interaction occurs or INFORMATIONAL which will simply bounce once. DockBounce
  • 36. Window Notify if (NativeWindow.supportsNotification){ this .nativeWindow.notifyUser(NotificationType.CRITICAL); } NotificationType can be CRITICAL which will blink until a user interaction occurs or INFORMATIONAL which will simply show a highlight on the window in the task bar. WindowNotify
  • 37. So? Wouldn’t it be great if all of the functionality that I have just shown you was able to be implemented with just a few lines of code?
  • 38. Good News! The SuperWindow component part of the EverythingFlexAIR1.swc will let you manage menus, icons, icon menus, alerts, and context menus. Plus even more!!
  • 39. What is SuperWindow? The SuperWindow component was originally created to solve the job of managing NativeMenus. As previously demonstrated NativeMenus function differently on Mac vs Windows.
  • 40.
  • 41.
  • 42. MULTI_MENU_MODE = “true” When MULTI_MENU_MODE=”true” the application will be in multi menu mode. In this mode a new menu will be added to the right of the default AIR menus and will only be removed when the accompanying Window is closed.
  • 44. MULTI_MENU_MODE = “false” When MULTI_MENU_MODE=”false” the application will be in single menu mode. In this mode one menu will be added to the right of the default AIR menus and will be swapped each time a Window gains focus.
  • 47.
  • 50.
  • 53.
  • 56.
  • 58.
  • 59. Alert Types SuperWindow supports both NotificationType.CRITICAL and NotificationType.INFORMATIONAL The default is NotificationType.CRITICAL
  • 60. Native Alerts SuperWindow supports both NotificationType.CRITICAL and NotificationType.INFORMATIONAL The default is NotificationType.CRITICAL
  • 61. startAlert() To start a SuperWindow alert, a call to the startAlert() method is necessary. The startAlert() method accepts one argument of type String which is the message the will display as the Icon toolTip or the message within a toast alert. Ex: startAlert(“Something is happening”);
  • 63. What Else? OK, so we have seen the SuperWindow component, but what else is included in the EverythingFlexAIR1.swc component library?
  • 64.
  • 65. ContextWindow The ContextWindow component was created to easily add the “close”, “minimixe”, “maximize”, and ‘restore” functionality to AIR windows. The functionality of the ContextWindow component is included within the SuperWindow component.
  • 66. ContextWindow private function createContextWindow(): void { var w:ContextWindow = new ContextWindow(); w.width=300; w.height=200; w.open(); } The ContextWindow works exactly the same as mx.core.Window in that you simply create an instance, set properties, and call the open() method.
  • 67. ContextWindow <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <ContextWindow xmlns=&quot; com.everythingflex.air.components.* &quot; layout=&quot; absolute &quot; xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; width=&quot; 300 &quot; height=&quot; 150 &quot; > <mx:Label text=&quot; This is a ContextWindow &quot; horizontalCenter=&quot; 0 &quot; verticalCenter=&quot; 0 &quot; /> </ContextWindow> You could also create an MXML component from the ContextWindow
  • 69. AlertWindow The AlertWindow component was created to add cross platform “toast” style alerts to AIR applications. The functionality of the AlertWindow component is included within the SuperWindow component.
  • 70.
  • 71. AlertWindow Create with ActionScript. private function createAlertWithAS(): void { var a:AlertWindow = new AlertWindow(); a.title = &quot;My Alert Title&quot; ; a.height = 100; a.width = 200; a.open(); }
  • 72. AlertWindow <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <AlertWindow xmlns=&quot; com.everythingflex.air.components.* &quot; xmlns:mx=&quot; http://www.adobe.com/2006/mxml &quot; layout=&quot; absolute &quot; title=&quot; My Window &quot; delayTime=&quot; 5 &quot; width=&quot; 300 &quot; height=&quot; 100 &quot; > <mx:Button label=&quot; Button &quot; x=&quot; 116.5 &quot; y=&quot; 10 &quot; /> <mx:ColorPicker x=&quot; 10 &quot; y=&quot; 10 &quot; /> <mx:ComboBox x=&quot; 69 &quot; y=&quot; 40 &quot; /> </AlertWindow> You could also create an MXML component from the AlertWindow
  • 74. ConnectionManager If your application requires an Internet connection, the ConnectionManager class is the easiest way to create a connection test.
  • 75.
  • 76. ConnectionManager private var cm:ConnectionManager = new ConnectionManager(); private var cm:ConnectionManager = new ConnectionManager( true , &quot; http://adobe.com &quot; , &quot;Get Online!&quot; ); Basic Custom Settings
  • 77.
  • 80. UpdateManager I built this very simple UpdateManager to make it easy to keep your applications up up to date once they have been distributed to your clients.
  • 81.
  • 82. private var cm:ConnectionManager = new ConnectionManager(); private var cm:ConnectionManager = new ConnectionManager( true , &quot; http://adobe.com &quot; , &quot;Get Online!&quot; ); Basic Custom Settings UpdateManager
  • 83.
  • 84.
  • 85. version.xml sample UpdateManager <?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?><currentVersion version=&quot;1.1&quot; downloadLocation=&quot; http://www.everythingflex.com/AIR/UM/UM.air &quot; forceUpdate=&quot;false&quot; message=&quot;Added new features&quot;/>
  • 87. EverythingFlexAIR1.SWC 100% FREE! http://blog.everythingflex.com/apollo/components-air
  • 88. Questions & Contact Info [email_address] http://blog.everythingf lex.com [email_address] http://www.InsideRIA .com