How to define upskin and downskin

Hai, I need to know how to set upskin and downskin on the list... I tried this

package com.cellapp.list.skin
{
    import flash.display.Sprite;
    import flash.geom.Rectangle;

    import qnx.fuse.ui.display.Image;
    import qnx.fuse.ui.listClasses.CellRenderer;
    import qnx.fuse.ui.text.Label;
    import qnx.fuse.ui.text.TextAlign;
    import qnx.fuse.ui.text.TextFormat;

    public class ListSkin extends CellRenderer
    {
        /*UPSKIN*/
        protected var upSkin:Sprite;

        /*DOWNSKIN*/
        protected var downSkin:Sprite;

        /*SELECTEDSKIN*/
        protected var selectedSKin:Sprite;

        protected var gridRect:Rectangle;

        public function ListSkin ()
        {
            super();

            gridRect = new Rectangle(0,0, 768, 100);

        }

        override public function set data(value:Object):void
        {
            // TODO Auto Generated method stub
            super.data = value.data;
            updateUI();

            try{
                upSkin          =   new Sprite();
                upSkin.graphics.beginFill(0x000000);
                upSkin.graphics.drawRect(0,0,768, 100);
                upSkin.graphics.endFill();
                upSkin.alpha    =   1;
                upSkin.scale9Grid   =   gridRect;

                downSkin            =   new Sprite();
                downSkin.graphics.beginFill(0x000000);
                downSkin.graphics.drawRect(0,0,768, 100);
                downSkin.graphics.endFill();
                downSkin.alpha  =   1;
                downSkin.scale9Grid = gridRect;
            }
            catch(e:Error)
            {
                trace("EEEE : " , e.message);
            }

        }   

        private function updateUI():void
        {
            trace("here");
            var img:Image = new Image();
            img.setImage(data.img);
            img.alpha               =   data.alpha;
            img.x = 568;
            img.y = 20;

            /*var backGround:Image          =   new Image();
            backGround.setImage(data.background);
            backGround.setPosition(0,0);*/

            var textFormat:TextFormat       = new TextFormat();
            textFormat.color                =   0x000000;
            textFormat.align                =   TextAlign.LEFT;
            textFormat.italic               =   true;
            textFormat.size                 =   47;

            var oneLable:Label              =   new Label();
            oneLable.alpha                  =   1;
            oneLable.text                   =   data.text;
            oneLable.x                      =   30;
            oneLable.y                      =   15;
            oneLable.format                 =   textFormat;
            oneLable.width                  =   768;
            oneLable.height                 =   100;            

            //addChild(img1);
        //  addChild(backGround);
            addChild(oneLable);
            addChild(img);

        }       

        override public function set state(value:String):void
        {
            // TODO Auto Generated method stub
            super.state = value;

            try
            {
                trace("VALUE ", value);
                if(value=="up")
                {
                    setSkin(upSkin);
                }
                else
                {
                    if(value=="down")
                    {
                        setSkin(downSkin);
                    }
                    else
                    {

                    }
                }
            }
            catch(e:Error)
            {
                trace("VALERR : ",  e.message);
            }

        }

    }
}

Any help is appreciated

Thanks in advance...

Hello!

«"" You're almost here!»»»

I see that in these two sprites (upSkin and downSkin), the color is black (0x000000) so you will not see the change.

In addition, there is no function setSkin (at least it is not in the latest version of the SDK). So, I used sprites as a backdrop. In the service of the State (that you evaluate correctly), you must add the upSkin sprite when the State is in PLACE (by default) and also you must change for downSkin when the State of the cell is out of SERVICE.

Something like this:

override public function set state(value:String):void
{
    super.state = value;
    if(value=="up")
    {                 upSkin = new Sprite();                 upSkin.graphics.beginFill(0x000000);                 upSkin.graphics.drawRect(0,0,768, 100);                 upSkin.graphics.endFill();                 upSkin.alpha = 1;                 addChild(upSkin);
        }        else if(value=="down")        {                 downSkin = new Sprite();
         downSkin.graphics.beginFill(0x01A8DF);
         downSkin.graphics.drawRect(0,0,768, 100);
         downSkin.graphics.endFill();
         downSkin.alpha = 1;                 addChild(downSkin);       }}

In this way, you will see the background color change when you select a cell in the list.

I hope it will work for you.

Tags: BlackBerry Developers

Similar Questions

  • How to define legend and margins of value (dashes) for the drop?

    I have searched the archives but couldn't find a specific answer.  Could someone show me how to set the indent for the legends and values beneath the pallet section of a drop-down list, please?  Thank you.

    For some reason, they get rid of the ability to edit dashes for the drop-down lists since version 8 of the designer. NO idea why.

    So, here's what you do:

    1) click on your menu drop-down

    2) go to view > Source XML

    (3) by inserting part of field or other length/unit, you need to know. That's the value.

    (4) for the legend, do the same thing under the legend item.

    If the para element already exists (which it should), just add the attribute marginleft = "in 1".

    Here is an example:

             
                 
                
                   
                      
                         
                         
                      
                      
                   
                
                
                
                
                
                    
                   
                      Drop-down List
                   
                
                
                   test
                
                
                   test
                
             
    

    Kyle

  • How to define commands and the default view

    I have Acrobat 9 Standard, and I want to set the default to open files to view full page with one-page-at-a-time of scrolling.  I regularly open multiple PDF files and have to scroll through the entire document.

    I managed to get the full view page to work, but does not scroll the entire page.  Currently, when I open the document, the mouse scroll the document continuously wheel several rows at a time.  What I want is for the mouse wheel to scroll through the document to a full page at a time (page up/page down).  I can manually set it by selecting the 'Full Page' button on the toolbar (the one with the four arrows), but it is another step, I have to every time I open a document.

    Is it possible to put the scrolling in full screen by default?

    You must put once the file PDF is loaded. You may need to edit document properties in some cases (use ctrl-D). I say this, but it seems that using one link to another location in the document resets the display properties based on the document. In this case, you will need to change the properties of the document (if available).

  • How to define me as offline on MSN Messenger and Facebook Messenger?

    I could put myself as it appears offline in MSN Messenger.

    When I login in the Surface with my windows live id I am automatically connected to the MSN Messenger service.   That's fine most of the time, but I want to be able keep connected to windows live using my windows live id but appear offline for my friends in MSN Messenger.

    How to define me as offline on MSN Messenger and Facebook Messenger?

    While in the messaging application, sweep up slightly to the bottom of the screen, this brings up a bar downstairs with three choices. Select the State, choose Invisible. That should make you appear offline. I hope that works, please let us know if it does.

  • How to create user defined groups and users with custom permissions as only open and export in obiee 11 g?

    Hello

    I want to give as open & export to the level of permissions.

    How to create user defined groups and users with custom permissions as only open and export in obiee 11 g?

    For example, if the group permissions, inturn should reflect on the users.

    Please help me.

    Thanks in advance,

    A.Kavya.

    Your question is quite broad and fuzzy then I suggest the security catalog presentation to read documentation: http://docs.oracle.com/middleware/1221/biee/BIESC/mgrgrpsusers.htm#CIHIBJGD

    And I think that you mix you two things which are managed in different places:

    ) an object as read access permissions, write, delete... which control you through the object "Permissions" dialog box

    (b) functional privileges controlled through "Manage privileges" under "Administration".

  • How interrogate the EM repository for a list of targets that have no targets defined properties and therefore will not be members of groups identified by the hierarchy of administration.

    Hello

    Asked me to do in control cloud 12 c,

    ""Repository queries EM to get the list of targets that did not target defined properties and therefore will not be members of groups identified by the hierarchy of administration.".

    and I was looking for more information on how to do it but I can't find anything on the repository tables, and I can't find how to get this cloud control options.

    Thank you

    Matt

    Management Group page, go to the Associations tab and click the target report unassigned

  • How to define an academic style of reference?

    When I put a reference style in 5.6.2 Pages (MacBook Pro, OS X El Capitan 10.11.3), I gives me a choice of font size. When the font size is set, all future references set automatically to the style follow this font size. The problem is, however, that style overrides the parameter exponent of reference numbers, make the reference number and size of text in the Notes section of the page. It is unacceptable for academic writing.

    Please can someone advise me on how to define a functional style of academic reference that keeps the numbers superscript? I can replace the style and restores the Exhibitor by pressing on "ctrl + cmd + shift +" + ", but these manual effort defies the point of having a style...

    Each reference is in its own independent area at the bottom of the document with the paragraph style by default reference initially applied to his text. 11 pt Helvetica regular is in the v5.6.2, Pages. And small enough for notes.

    You can click three times in one of these cells in reference text, select this option and change the attributes of the font for the text and even a reference itself. The latter would be easier to zoom to 200%. Or, you can click on a single reference, or additional reference cells of control + click and then apply the change of police attribute to all notes. If it were a simple font size increase, the exponent, and the reference text would increase proportionally in the selected cells. No need to keyboard shortcuts.

    You can also define your own style of reference section customized to reduce boredom.

    A double click on a reference in the cell reference, followed by a command-right arrow will deposit your beam to insert directly behind this exponent of reference in the body of the document.

  • How to define the rules of navigation in faces - config.xml dynamically?

    In jdev 12.1.2 I am studying and performing the adf faces demo (12.1.2 version).

    I am trying to implement the function of navigation like this:

    1. in the navigation tree in the left panel of the accordion will show the features of an application which is read from database tables;

    2. When you click on a node in the navigation tree, a corresponding function/page will be launched in the Panel to the right of the home page;

    3. the navigation tree nodes display names and information pages target will be resident in the database tables and will be read in my case, the control of data bindings.

    and now I know, the click action was executed in this file in the demo: componentGallerySideBarTree.jsff:

    ->action = "#{stamp.actionOutcome}"

    < af:tree id = "tree" value = "#{attrs.menuModel}" var = "stamp" = "single" rowSelection fetchSize = "200" "

    Summary = "#{uploading." Summary}"disclosedRowKeys =" #{attrs.menuModel.foldersTreeState} "autoHeightRows = '0'"

    displayRow selectedRowKeys = "#{attrs.menuModel.selectionState}" = "selected" "

    contentDelivery = 'immediate' emptyText = "there are no demos for this category.

    styleClass = "AFStretchWidth" >

    < f: facet name = "nodeStamp" >

    < af:panelGroupLayout id = "nodePgl" >

    < af:image source = "#{stamp.ico}" styleClass = "GalleryIcon" shortDesc = "Image of a tree node" "

    ID = "nodeImg" / >

    < af:switcher facetName = "#{stamp.children == null?' leaves ': 'notLeaf'}" id = "nodeSw" > "

    < f: facet = "journal batch name" >

    < af:link id = text = "#{stamp.label"leafLink"} '"

    shortDesc = "#{stamp.label} #{stamp.deprecated eq 'real'?" (not recommended) " :"} »

    action = "#{stamp.actionOutcome}"

    inlineStyle = "#{stamp.deprecated eq 'true'?-style: italic; color: gray':"} ' "

    selected = "true" >

    < af:target execute="@this"/ >

    < / af:link >

    < / f: facet >

    < f: facet name = "notLeaf" >

    < af:outputText id = value = "#{stamp.label"notLeafText"} ' shortDesc =" #{stamp.label} "/ >"

    < / f: facet >

    < / af:switcher >

    < / af:panelGroupLayout >

    < / f: facet >

    < / af:tree >

    and the value of actionOutcome was entered in this file DemoConfusedComponentsMenuModel.java:

    (for the case of the confused component navagation tree folder)

    private TreeModel _initConfusedComponents()

    {

    Confused components

    The list < DemoItemNode > confusedComponentsNodes = new ArrayList < DemoItemNode >)

    {

    {

    ..

    Add (new DemoItemNode ("Tabs", "/ confusedComponents/tabs.jspx","/adfdt/panelTabbed.png","confused.tabs"));

    Add (new DemoItemNode ("iterators","/ confusedComponents/iterators.jspx","/adfdt/iterator.png","confused.iterators" ""));

    }

    };

    DemoItemNode confusedComponentsGroup = new DemoItemNode ("Often confused", "/ images/folder.png", confusedComponentsNodes);

    List ConfusedComponentsList = new ArrayList();
    confusedComponentsList.add (confusedComponentsGroup);

    TreeModel confusedComponents = new ChildPropertyTreeModel (confusedComponentsList, _CHILDREN);
    Return confusedComponents;
    }

    In addition, there are elements in faces-config .xml to define the rules of navigation for the actions 'by clicking on the tree node.

    <>navigation-case

    < from outcome >confused.iterators< / de-results >

    < to view - id > /confusedComponents/iterators.jspx< / to-view-id >

    <!-< redirect / >->

    < / navigation-case >

    So, I can add a new entry in the navigation tree, like this:

    1. in DemoConfusedComponentsMenuModel.javaof the file: Add

    Add (new DemoItemNode ("Iterators", "/confusedComponents/cms.jspx","/ adfdt/iterator.png","confused.cms" ""));

    2. in the file faces - config.xml, add:

    <>navigation-case

    < from outcome >confused.cms< / de-results >

    < to view - id > /confusedComponents/cms.jspx< / to-view-id >

    <!-< redirect / >->

    < / navigation-case >

    and it works!- I have successfully added a new node in the navigation tree, called a new page created by myself cms.jspx.

    If I implement them using database tables (links datacontrols EO/VO),.

    I think I can put action = "#{stamp.actionOutcome}" by links.

    But how can I pay the entry in the faces-config file. XML? -That is to say:

    How to define the rules of navigation in faces - config.xml dynamically?

    Thanks in advance!

    ADF 12 c comes with support for JSF 2.0, you can use the implicit navigation feature.

    In short: you don't need to add case action property, any set of navigation in the name of the page (and include the path if necessary).

    In your case, the name of the action will be: ' / confusedComponents/cms.jspx ' and of course, you can link the action property of method that returns this string.

    If you want to add by the case of navigation program, try ConfigurableNavigationHandler.

    For example:

    Manager of ConfigurableNavigationHandler = (ConfigurableNavigationHandler) FacesContext.getCurrentInstance () .getApplication () .getNavigationHandler ();

    handler.getNavigationCases () .put (...);

    Dario

  • How to define a style class?

    Hello

    I have a selector in my css to look similar to the following file:

    AF | panelHeader {}
    background-image: url("..) /.. (' / images/thanks ");
    background-repeat: no-repeat;
    background-position: center;
    }

    As you know it is applied to each panelHeader component in the application, but I want to apply to one of the components of panelHeader and not others. I know that this could be done using style classes, but I couldn't find how to define a style class. Could you please tell me how to define a style class based on the selector above?

    Kind regards
    Will do

    Hello.
    check this post to Lucas Jellema
    http://technology.AMIS.nl/Blog/5722/using-ADF-faces-11g-skinning-for-setting-the-styles-of-specific-component-instances-or-groups-of-instances

  • How can I find and replace the xml tags?

    Hi, I am using xml in my workflow and want to be able to remove some tags if they contained particular text.

    Here is an example of the xml struct...

    < Entry >

    < name > DEFAULT < / name >

    < such > default < / such >

    DEFAULT < address > < / address >

    < / Entry >

    I use this initial structure to define paragraph styles to follow when you import the xml data.

    This leaves DEFAULT in place everywhere where an entry is not any content of this field.

    I want to be able to import my XML and then run a script that deletes tags that include by DEFAULT, - I need to the xml tag to remove not only the text, if I do a normal find and replace will remove only the text not the tags that is causing problems with style. I also want to remove the end of para/return (^ p) that I placed at the end of the line. So it would be the same opening editor mode and removing content, tags + hard back in there, but I want to automate the process...

    So I think that's what I'm looking for in each case

    "< name > DEFAULT < / name > ^ p.

    and I want to replace it with nothing.

    Is this possible in a script (ideally javascript)?

    I have a little knowledge of javascript, but don't know how to search for and target this kind of string in indesign...

    using indesign cs5

    Thank you very much

    Hello

    Script should do it in two steps:

    1 find all occurrences of that is ' > by DEFAULT.<>

    2 delete the whole paragraph which is a found_text container.

    For example, in this way - JS - (a textFrame filled your text must be selected):

    var mStory = app.selection[0].parentStory;
    app.findTextPreferences =  null;
    app.findTextPreferences.findWhat = ">DEFAULT<";
    var myF = mStory.findText();
    var count = myF.length;
    while (count--)
         myF[count].paragraphs[0].remove();
    

    Rgds

  • How to import xsd and use it in the transformation for mapping

    I built a xsd and you want to use the xsd to the development in BPEL Process.I imported. But I can't figure out how to proceed further. Anyone can suggest me how to import xsd and use it as it must be defined in wsdl using the law. Is it possible, we can use xsd?

    in the left lower structure window, the tree you can import patterns.
    When completed the scheme will get an element import in your wsdl file, so no manual work not needed for that.

    After that you can simply use it to create variables based on it

  • How to define constants predefined through FXML

    Anymode know how to define a constant pre-defined FXML as javafx.scene.control.Control.USE_PREF_SIZE when you create a node?

    Instead of using a fixed value as it
       <Label text="Last Name:" minWidth="100" />
    I would use one of the predefined sentinel values like this.
       <Label text="Last Name:" minWidth="USE_PREF_SIZE" />
    The example above doesn't seem to work, and I feel that it is currently not possible at all.

    Ah, it's true. The JS engine recognizes names beginning with com, org, java and javax default package, but not JavaFX. Try this:

    var USE_PREF_SIZE = Packages.javafx.scene.control.Control.USE_PREF_SIZE;

    G

  • How to create variables and store them?

    How to create variables and store them?

    As someone has already said, we need to learn a little more about what you want to do with these variables, but in general, APEX elements are probably what you want. You can create the elements APEX at the request or Page level. Once you define the value of an element, you can reference anywhere else in the application. So if you have an article on page 1 called P1_ENAME, you can reference it on page 32 using bind variables syntax: P1_ENAME. If you just want to store but not to display certain information, you can use either a hidden page element or an element of Application level. Take a look at day 2 Developers Guide for more information.

    Tyler

  • How to prevent spam and the dating of the queries

    How to prevent spam and dating asking to come in my junk mail too much looking forward this junk e-mail

    If the emails are from the same source or have a constant content, you can write a rule in Mail/preferences/Rules. Example below.

  • How can I open and manipulate files (convert?) a database created on a PC with Corel Paradox 9 on my iMac?

    Hello again once, someone can tell me how I can open and manipulate (convert to Excel?) a database file created on a PC with 9 of paradox to Corel on my iMac?  The answer would be as simple as buying the paradox for Mac?  I don't even know if Paradox is offered for an environment of Apple but if so that could be the way for me to go there, otherwise, I guess that the only other way to use the database would be to convert it to Excel.  Thank you.

    Tony

    Try to export the program PC CSV file or a tab-delimited text files. Both can be imported into Excel and other DB programs. I don't know what kind of Paradox file format uses, but you can try its importation to the module of data in Free agency. It's a free app.

Maybe you are looking for