Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Creative Suite Developer Center / Creative Suite Extension Builder /

Skinning Creative Suite extensions

by Lea Savage

Lea Savage

Content

  • Creative Suite extension theme
  • Retrieving host application skinning information
  • Loading style sheets at run time
  • Where to go from here

Created

10 May 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
CS Extension Builder extensibility skinning

Requirements

Prerequisite knowledge

You should be familiar with developing Creative Suite extensions and using Creative Suite Extension Builder. It is also beneficial to have some understanding of the current skinning capabilities in Flex.

 

Additional required product

  •  At least one Creative Suite 5 (or later) product

User level

Beginning

Required products

  • Flash Builder 4.5 Standard (Download trial)
  • CS Extension Builder (Download trial)

If you have an extension that runs in a number of Creative Suite applications and works cross-platform, you might notice that the appearance of the application UI differs and the extension can seem a little out of place in different products and platforms. This article outlines some of the ways that you can apply skinning to your extension using data returned by the host application.

Creative Suite extension theme

CS Extension Builder includes a CS theme that you can apply to your extension. The theme uses some of the common Creative Suite UI properties and helps provide a consistent look for the extension in each CS application, regardless of platform.

To apply this theme to your extension, select the project in CS Extension Builder, and choose Project > Properties > Flex Theme > Adobe Themes – Creative Suite Extension Builder > Creative_Suite_CS5. Here's an example of how the CS theme looks.

Figure 1. HelloWorld extension
Figure 1. HelloWorld extension

Retrieving host application skinning information

The AppSkinInfo class in the CSXSLibrary provides UI information about a Creative Suite application. When you call this class, the information returned can vary between applications and platforms. By retrieving the AppSkinInfo object, you can adjust the UI properties at run time.

To add the CSXSLibrary to your project in CS Extension Builder select Project > Properties > CS Extension Builder Libraries > and select Adobe CSXS SWC.

For example, this code allows you to apply a different font family to text, depending on whether the extension is running in Mac OS or in Windows:

Figure 2. HelloWorld running in Illustrator CS5.5 on Mac OS
Figure 2. HelloWorld running in Illustrator CS5.5 on Mac OS
Figure 3. HelloWorld running in Illustrator CS5.5 on Windows
Figure 3. HelloWorld running in Illustrator CS5.5 on Windows

The sample CSExtBasics further demonstrates how to apply style properties to your extension using the data returned from AppSkinInfo. To access this sample in CS Extension Builder, choose File > Import > Adobe Creative Suite Extension Builder > Remote Creative Suite SDK Examples.

Loading style sheets at run time

In Flex, you can apply style sheets, which Flex refers to as skins, to a Flash panel. This section outlines how to apply a Flex skin to a Creative Suite extension.

Flex allows you to load style sheets at run time and apply the styles dynamically to your UI; see Loading style sheets at run time in Flex documentation for further information. Each style sheet is a compiled Flash file (SWF).

To apply a style sheet as a skin to an extension's panel, first you have to load it into your extension. Here is a loadStyleSheet() function that retrieves a given style-sheet SWF: 

private function loadStyleSheet(stylesheet:String):void { var path:String = CSXSInterface.getInstance(). getSystemPath(SystemPath.APPLICATION).data + stylesheet; var f:File = new File(path); StyleManager.loadStyleDeclarations("app://" + f.nativePath); }

Each skin is represented by a different style-sheet SWF. For example, you might have a skin to use in Windows and another to use in Mac OS; or you might have different skins for different target products. You can load the style sheet you need based on the product and platform.

For example, here's a code snippet that loads platform-specific versions of a style sheet for Photoshop, and a third version for any other target product:

if (hostName.indexOf('photoshop') > -1) { var os:String = Capabilities.os.toLowerCase(); if (os.indexOf("windows") > -1) loadStyleSheet("/assets/windowPSStyles.swf"); else loadStyleSheet("/assets/macPSStyles.swf"); } else { loadStyleSheet("/assets/genericStyles.swf"); }

Figure 4 shows different skins applied to the same extension. The image on the left shows the genericStyles.swf. In the center is an example of the extension running in Photoshop CS5 in Mac OS. The image on the right shows the extension running in Photoshop CS5 in Windows.

Figure 4. Different skins applied to the same extension
Figure 4. Different skins applied to the same extension

Where to go from here

This article shows how you can apply skinning to your Creative Suite extension for a consistent look and feel across platforms and applications. Using a combination of the AppSkinInfo data and Flex skins, you can dynamically change the UI of the extension to support the different CS applications and platforms.

For more information about skinning, refer to the Flex Documentation.

For the Flex skins used in this article, see http://fleksray.org/Flex_skin.html

  • Extension Builder Forum
  • CS SDK Forum

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

More Like This

  • Introducing CS Extension Builder 1.5
  • Developing extensions for multiple versions of the Creative Suite
  • Adobe Creative Suite image conversion utility
  • So you want to sell your Creative Suite extensions?
  • Handling XMP Metadata with Creative Suite Extension Builder
  • Debugging Workflows in Creative Suite Extension Builder
  • Overview of Adobe Creative Suite Extensibility
  • Developing multiple Creative Suite extensions
  • Developing hybrid extensions with Creative Suite Extension Builder

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement