Create a Panel skin (Spark) with a background fill color I can pass as a parameter

Hi,
I'm trying to create a Panel skin (Spark) with a background fill color I can pass as a parameter.
(See in bold:)
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin name="CustomPanelSkin"
                               xmlns:fx="http://ns.adobe.com/mxml/2009"
                               xmlns:s="library://ns.adobe.com/flex/spark"
                               xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                               blendMode="normal">
          <s:states>
                    <s:State name="normal" />
                    <s:State name="disabled" />
                    <s:State name="normalWithControlBar" stateGroups="withControls" />
                    <s:State name="disabledWithControlBar" stateGroups="withControls" />
          </s:states>
          <fx:Metadata>
                    [HostComponent("spark.components.Panel")]
          </fx:Metadata>
          <s:Group left="0" right="0" top="0" bottom="0">
                    <s:Rect
                              left="0" right="0"
                              top="0" bottom="0"
                              radiusX="12" radiusY="12">
                              <s:fill>
                                        <s:SolidColor color="#184c81" />
                              </s:fill>
                    </s:Rect>
                    <s:Group id="contents"
                                         left="1" right="1" top="1" bottom="1">
                              <s:layout>
                                        <s:VerticalLayout gap="0" horizontalAlign="justify" />
                              </s:layout>
                              <s:Group id="contentGroup"
                                                   width="100%" height="100%" minWidth="0" minHeight="0">
                              </s:Group>
                    </s:Group>
          </s:Group>
</s:SparkSkin>
From what I read I should create a subclass, but there is not much material on the subject.
I would later on want to use this skin in many Panel controls I have in my application.
Thanks for the help.

Did you read this?
http://www.adobe.com/devnet/flex/articles/flex4_sparkintro.html

Similar Messages

  • My usual iCloud account has been locked out.  I tried the email link - didn't receive an email.   So I created a new Apple ID with another email but now I can't access my other Apple ID Mail, etc..

    My usual Apple ID/iCloud account has been locked out.  I tried the email link - didn't receive an email.   So I created a new Apple ID with another email but now I can't access my other Apple ID Mail, etc..  How do I get the Apple ID I want to use working again?   Help. 

    Hi JkeeneSoldano,
    Thank you for visiting Apple Support Communities.
    To regain access to your Apple ID, try to reset your password using one of these methods:
    Answer your security questions. Use these steps if you know the answers to your security questions.
    Use email authentication. We'll send you an email that you can use to change your password.
    Use two-step verification. If you set up two-step verification, you can use it to change your password. You just need your recovery key and a trusted device.
    From:
    If you forgot your Apple ID password - Apple Support
    If you need to use the email verification method but don't receive the reset email, see this link for more help:
    If you didn't receive your verification or reset email - Apple Support
    Best Regards,
    Jeremy

  • The Java plugin has created a time unfriendly issue with my e-mail account, I can not open or send any e-mail without using this plugin, how can I eliminate this problem without dropping m. firefox?

    A few days ago I tried to e-mail a friend, when I started A box came up and it required me to add a plugin..Java. I contacted my e-mail courier and microsoft, they told me that is was a plugin from Mozilla Firefox. Since then I must go through Java to send or open an e-mail... this is NOT to my satisfaction, it takes too long for all of this to open and if it is not cleared , I am dropping Mozilla and going elsewhere. Why has this occurred? Is this a result of the last update? If so can I delete the last update and continue on the other version?
    == This happened ==
    Every time Firefox opened
    == last week

    Sorry, I have no idea what you mean by '''"The Java plugin has created a time unfriendly issue with my e-mail account, I can not open or send any e-mail without using this plugin,"'''.
    If you think your problem is caused by the Java plugin, you should visit the Java support forum for assistance.
    http://forum.java.sun.com/index.jspa
    If you could explain what you mean by '''"time unfriendly''' issue with my e-mail account", maybe we'll be able to help you solve that issue.
    It might be helpful for us if we knew exactly which web-mail provider you are using. It seems strange to me that viewing or sending web-mail would actually "need" Java for operation, its more likely that some other item on the web page needs Java to run some advertising or other garbage that isn't a necessary part of the web-mail functionality you want to use.

  • I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".

    Hello,
    I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".
    Suppose , 
    Parameter value : person 1,person2,person3 
    table structure : 
    Project Name | officers 1 | officers 2
    here, officers 1 or officers 2 may contain names of multiple people.
    expected OUTPUT : distinct list(rows) of projects where person 1 or person 2 or person 3 is either officer1 or officer 2. 
    please explain or provide solution in detail 
    - Thanks

    Hi Visakh,
    Thanks for reply.
    But the solution you provided giving me right output only if officer 1 or officer 2 contains single value , not with comma seperated value.
    Your solution is working fine for following scenario : 
    Project 
    Officers 1
    Officers 2
    p1
    of11
    off21
    p2
    of12
    off22
    with parameter : of11,off22 : it will give expected output
    And its not working in case of :
    Project 
    Officers 1
    Officers 2
    p1
    of11,of12
    off21,off23
    p2
    of12,of13
    off22,off24
    with parameter : of11,off22 : it will not give any row in output
    I need patten matching not exact match :) 
    ok
    if thats the case use this modified logic
    CREATE PROC GetProjectDetails
    @PersonList varchar(5000)
    AS
    SELECT p.*
    FROM ProjectTable p
    INNER JOIN dbo.ParseValues(@PersonList,',')f
    ON ',' + p.[officers 1] + ',' LIKE '%,' + f.val + ',%'
    OR ',' + p.[officers 2] + ',' LIKE '%,' + f.val + ',%'
    GO
    Keep in mind that what you've done is a wrong design approach
    You should not be storing multiples values like this as comma separated list in a single column. Learn about normalization . This is in violation of 1st Normal Form
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How can you create a spry menu bar with no background colour?

    How can you create the first level of a spry menu bar to have no colour? I have a coloured background right now and the colour matches when you load the site in Internet explorer but does not match in Firefox. Any suggestions are welcomed on how to fix this.
    Thanks!
    HK

    Here is the site:
    http://partnersnaturally.ca/
    I am learning with code, (obviously) so any feedback would be nice. I use dreamweaver CS4, but when I originally designed the site it was in a much older version of dreamweaver. I wonder if that could also be a cause. (besides human error)
    Thanks again,
    HK

  • Is there an easy way to create 2 page imposed PDFs with a background?

    I have figured out a way to create a suitable imposed single page PDF using the 'import as layer' action, the action only understands a single paged background PDF.
    In other words, I have a PDF that has the suitable marks on it with the pages marked 'Page 1' & 'Page 2'. This is the background PDF.
    I open this PDF in Acrobat and run the action that places another PDF (the 'Source' PDF) on multiple layers with different offsets.
    The original (template) PDF is 2 pages & the Source PDF for imposition is 2 pages, and even though the 'import as layer' understands that the source PDF being imposed is 2 pages, it does not seem to allow the original (template) PDF to be seen as 2 pages.
    There is a 'Target page number' option in the Preview area, but that is grayed out at 1.
    So...other than commercial applications, is there an easy way to build a 2 page PDF imposition file??
    Maybe a script?

    Sabian,
    Yes, the Quite software would be perfect, especially the 'Hot'. Tested & works great for us, but the price tag for the 'Hot' is rather steep for our relatively simple process......background template with a 'step & repeat' of the 'live' document.
    As I mentioned in the original post, to do this with a single page PDF is simple enough using an action that places the 'live' doc multiple times, but the vast majority of our publications are 2 pages.
    Currently runing the action twice for each job. I would save a bit of time if this could be automated to do both sides with one action, or one script.

  • How to create a live trace object with transparent background?

    Hi, I am trying to create a live trace object of my logo in ai. The logo is coming from photoshop on a transperent background, and it is all black. What I want to do is to bring it into ai and make it an object for obvious reasons. The problem I have had is that when I live trace it, the live trace leaves a white background which then overlaps with other objects in my ai file. Is there a way to live trace while preserving the transparent area or possibly better, to not include white space in the live trace? Thanks in advance!

    Yep open the properties for live trace (Object>Live Trace>Tracing options). You will find a checkbox for ignore white.

  • Creating Thumbnail from an Image with transparent background

    Hello,
    I want to create a thumbnail image of size 200 x 200 pixels from an image of any size.
    As the thumbnail is square, I'm centering the image according to size.
    The code I'm using is working fine BUT after centering and resizing original image
    and writing it to output file the remaining area is of black color.
    I want the background should be transparent.
    Code I'm using is not using JAI.
    Please suggest me the solution.
    the code I'm using is as follows:
    public static void makeThumbnail(String inFile, String thumbFile ) throws Exception {
    Image image = Toolkit.getDefaultToolkit().getImage(inFile);
    MediaTracker mediaTracker = new MediaTracker(new Container());
    mediaTracker.addImage(image, 0);
    mediaTracker.waitForID(0);
    int fixedHeight = 200 ;
    int fixedWidth = 200 ;
    int imageWidth = image.getWidth(null);
    int imageHeight = image.getHeight(null);
    double imageRatio = 0.25 ;     
    int thumbHeight = (int)(imageHeight * imageRatio );
    int thumbWidth = (int)(imageWidth * imageRatio );
    int x = ( fixedWidth - thumbWidth )/2 ;
    int y = ( fixedHeight - thumbHeight )/2 ;
    System.out.println(thumbHeight + " - " + y );
    System.out.println(thumbWidth + " - " + x );
    // draw original image to thumbnail image object and
    // scale it to the new size on-the-fly
    BufferedImage thumbImage = new BufferedImage(fixedWidth, fixedHeight, BufferedImage.TYPE_INT_RGB);
    Graphics2D graphics2D = thumbImage.createGraphics();
    graphics2D.setColor( new Color( 255, 255, 255, 0) );
    int rule = AlphaComposite.SRC_IN ;
    AlphaComposite ac = AlphaComposite.getInstance(rule, 0.9f);
    graphics2D.setComposite(ac);
    graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    graphics2D.drawImage(image, x, y, thumbWidth, thumbHeight, null);
    // save thumbnail image to OUTFILE
    BufferedOutputStream out = new BufferedOutputStream(new    FileOutputStream(thumbFile));
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(thumbImage);
    int quality = 60 ;
    quality = Math.max(0, Math.min(quality, 100));
    param.setQuality((float)quality / 100.0f, false);
    encoder.setJPEGEncodeParam(param);
    encoder.encode(thumbImage);
    }

    Change this line
    BufferedImage thumbImage = new BufferedImage(fixedWidth, fixedHeight,
              BufferedImage.TYPE_INT_RGB);
    ...to use a BufferedImage type that supports transparency like TYPE_INT_ARGB or TYBE_4BYTE_ABGR (I would recommend the latter since your saving the image).
    Also, btw, you're not going to like the quality of the thumbnail if the image is reduced by more then half its size.

  • How do I create a pdf in Indesign with 40 file hyperlinks so it can be used on different computers?

    I am creating a document in Indesign CS4 that is to be exported as a pdf.
    Within this one page document, there are approximately 40 listed products, one after the other and each product has been set up to hyperlink to a specific pdf in the same directory.
    This has been no problem.
    Where the problem is, is that it won't work on other computers because it seems to 'hardwire' the hyperlink file address.
    I then went in and set up the hyperlink as a URL.  This worked on any computer, but then the pdf opens in an internet browser.
    I NEED THE LINKED PDF TO OPEN IN ADOBE READER.
    I then opened the one page pdf in Adobe Acrobat Pro.  It brought over no hyperlinks.  So I created the hyperlinks there.  No probs.  It worked.  But if I want to update this one page doc in the future, I'm going to have to create all links again.  I have other docs that I need to create that have hundreds of links.
    Can anyone shed some light on this?  It shouldn't be difficult.  Why won't a linked file just work on any computer?
    Your help will be greatly appreciate.
    Josh

    Josh,
    Got your email with added question related to this user to user forum post. As others might have the same question, answering it here.
    If you want to point to PDFs that are in a subfolder of the root-directory that holds the pdf containing all the links, you'd need to add the subfolder to the path-specification for the link..
    For example:
    root-folder has 'source.pdf' that has a link going to 'desitnation.pdf'
    a 'subfolder' contains 'desitnation.pdf'
    Link path would be '/subfolder/destination.pdf'
    Cheers,
    Cari
    www.twitter.com/carijansen

  • Need help with links and fill color

    Hi all, I just recently discovered liveCycle and am very impressed with it! I have been trying to make myself a homework calendar for a while now, and I have it done mostly, but there are a few more things I'd like to add that I don't know how to do.
    I have some HTML and Java experience, but very little XML or JavaScript experience. I have a feeling that what I am trying to do is relatively simple, but I just can't figure it out! I have spent hours pouring over Google and the help files, and I feel like I have gotten close, but no joy yet.
    I have attached my calendar so far (truncated to fit 5MB max attachment size). I'd like it to do two more things:
    1. Have the background color of the table cells change from white to green when the check box is checked.
    (Alternately, I'd really like to get rid of the check boxes all thogether and just have the background of the table cells turn green with a keyboard shortcut, like "ctrl + D" for 'done'. But if that isn't possible, then the color change with the check box is fine.)
    2. I'd like the button called 'WORD DOC' in the upper right of the form to open a word document on my local computer. Where I just push that button and a work doc opens right up in Word in another window.
    I was able to get .PDF documents to open up with those other two buttons there ('Big Java' and 'Beginning Java II') by adding the script
    app.openDoc("Big Java.pdf");
    and
    app.openDoc("Beginning Java II.pdf");
    to each of the buttons respectively, but those PDFs need to be in the same folder as the calendar for that to work. I tried just altering that script by replacing the name of the PDF file with the name of a Word doc file like this:
    app.openDoc("test.docx");
    but the button doesn’t work at all, it just does nothing.
    So that’s what I am trying to do. I have spent hours messing around with anything I could think of to get this to work, but unfortunately I just don’t know the language well enough to get it to work.
    I would really appreciate any advice on this at all. Thank you very much for your consideration.

    Hi,
    Thanks very much for your response! I was able to use the code to make the box turn green by adding that script to the 'click' event of textbox and changing the language from FormCalc to JavaScript. So what happened was that when I clicked in the textbox, the color turned green.
    I couln't firgure out how to add it to the checkbox though. When I tried, it didn't do anything. The problem now is that when I click in the textbox to add my homework, it turns green. I need it to turn green once I finish my homework.
    This would work great if the texbox turned green when I SHIFT clicked the box. Is there anything I could add to that scipt to do that?

  • Creating a panel with multiple canvasses on it, in complementary colors

        public Dancefloor(Dimension patches, int size, Color color)
            //create JPanel
            super();
            backgroundColor = color;
            numberOfPatches = patches;
            patchSize = size;
            //set Size of Dancefloor, make a conversion because the returned type isn't int but double and the setSize
            //function is only able to handle int
            setSize((new Double( numberOfPatches.getWidth() * patchSize) ).intValue(),
            (new Double( numberOfPatches.getHeight() * patchSize) ).intValue() );
            //set bacground color of the panel
            setBackground(backgroundColor);
            //create a number of patches, as submitted to the constructor(at the moment as Canvas)
            //Create a for loop which will be looped as much times as the number of patches
            for(int d = 0; d < new Double(numberOfPatches.getWidth() * numberOfPatches.getHeight()).intValue(); d++)
                //create a new canvas and set a background for it
                patch = new Canvas[new Double(numberOfPatches.getWidth() * numberOfPatches.getHeight()).intValue()];
                patch[d] = new Canvas();
                patch[d].setBackground(backgroundColor);
                //set another background for the patches that are not even, but have an odd number
                if(d % 2 != 0)
                    float[] colorHSB = color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null);
                    colorHSB[0] += 0.5;
                    if(colorHSB[0] > 1) {
                        colorHSB[0] -= 1;
                    patch[d].setBackground(new Color(Color.HSBtoRGB(colorHSB[0], colorHSB[1], colorHSB[2])));
        }Above is the code of the constructor of my class called Dancefloor, it attempts to create a panel(the 'dancefloor') with multiple canvasses('patches') on it. The even patches should have the color specified in the constructor, the others should have a complementary color as background. this is done using the last if-statement.
    When executing however, all patches have the color specified in the constructur and so you all you can see is a panel with a background instead of a panel with a patchwork of 2 different color canvasses on it
    I hope this explanation was pretty clear, I hope someone is able to help me out
    thomas

    i would suggest if you are going to use a JPanel, simply create an array of Rectangles that represent all of your patches. Then override the paintComponent(Graphics g) method of the JPanel to and use the fillRect(int x, int y, int width, int height) method from the graphics class to draw all of your rectangles something like this
    JPanel floor = new JPanel() {
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              for (int j = 0; j < myRectangles.length; j++){
                    g.setColor(whateverColor)
                    g.fillRect(myRectangles[j].x, myRectangles[j].y,
                                     myRectangle[j].height, myRectangles[j].width);
    }btw, you can use the field values width and height from Dimension class to retrieve an int value, insted of using getWidth() and getHeight just call myDimension.height or myDimension.width

  • Png files with transparent background show black only in firefox for android

    I have a wix created site and png files with transparent backgrounds are showing with a black blackground in Firefox for Android. They show transparent in all other browsers I have tried.
    I have tried saving the file as a gif, as a smaller png, interlaced, not interlaced, png 8, png24. It still shows black in Firefox for Android.

    Hi evelswoman,
    Thank you for your question. This sounds like a good one for the web compatibility team. Currently there are some compatibility documentation for background-image here: [https://developer.mozilla.org/en-US/docs/Web/CSS/background-image] and more details on background: [https://developer.mozilla.org/en-US/docs/Web/CSS/background]
    Filling a bug with webcompat.com with an example url can go a long way as well, I hope this helps.

  • How do i create/combine my mac id with my iPhone id?

    i wanted to download an app form app store and was asked for my id.. apperntly my iPhone id is limited to my country's app store and my email is in use for that id... how do i create/combine my mac id with my iPhone id so i can download apps from appstore?

    The Apple ID for the iTunes stores and for the Mac App Store are the same account. You can only buy from the stores in the countries in which you have the qualifications. You must have a bank card in that country and the bank card must have a valid billing address in that country. Creating more than one Apple ID is a bad idea and will not help you get around the requirements.

  • Can we create the Application name starting with Numerics

    Hi All,
    can we create an application name stating with number like 1234Samsung.
    Also can we use the special characters between them.
    Also are there any rules for creating database names other than maximum 8 characters limit.
    Regards

    Hi,
    1. You can create starting with numerics, 123samsu.
    2. samsung cannot complete ,the know reason is exceeding 8
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • How can I export a file with transparent background?

    Hi all,
    I know InDesign doesn't allow to export a PNG file, but I need my file to be in image file format with transparent background.
    I'm still learning so I am stuck here. How can I export a file with transparent background?

    If you can't get the PNG file export to work, you can export a pdf and open it in Photoshop, from there you can save it as whatever you like.

Maybe you are looking for

  • Aquisição de dados via bluetooth

    Bom dia caros colegas, Estou trabalhando num aplicativo sistema de aquisição de sinais utilizando a LaunchPad com o MSP430G2553 e envio os dados dados pra um computador através de um dispositivo Bluetooth (HC-05 2,4GHz ISM) O sistema deve prover: 4 e

  • Cannot get external display to show image

    Hi, I've just bought a 13" MBP and I'm new to the Apple forums so I apologise if there is already a thread for this (I haven't seen one so far). I bought the MBP from my local Apple Store along with a case and a mini-DVI to VGA adapter to connect the

  • LCD TV

    I have a 44" LCD TV that was purchased in March 2005 and recently everything in the middle of the screen has a greenish yellow tint. Why is this happening?? It is a Zenith and there have never been any gaming systems connected to it.

  • Screen layout for Customer group

    Is there any way we can define a screen layout for a particular customer group(having particular fields mandatory and remaining optional). Any help will be appreciated. Thanks, ALAM.

  • Running Reports in 8IAS

    Can anyone tell me the parameter do be defined in the registry of 8IAS. I am using forms [Run_PRODUCT] to run the report but it gives me 'Error Initializing Printer'. If i run the report thru runreport.htm how can i get the report parameter screen. T