Question of design architecture: layers of components

I am so confused about how combine components and when I should inherit, and when things go into skins. I have a custom component tile that looks like this:

plaintile.jpg

Source (Simplified) looks like this:

"< s:SkinnableContainer skinClass = 'skins. TileSkin""">

< fx:Script >

          <! [CDATA]

[Bindable] public var tileColor:uint = 0xFF0000;       / / Color of base tile.  The central area will be this color.

[Bindable] public var tileThickness:uint = 4;            / / How high the tile seems to have his Center Party raised.

          ]] >

< / fx:Script >

< / s:SkinnableContainer >

All drawing is found in the skin.  I have a subclass this component to have a LabeledTile:

goldtilex.jpg

Source (Simplified) looks like this:

< components: tile >

< fx:Script >

          <! [CDATA]

protected static const int PADDING = 3;

public function get text1 (): String { return Label1.text ;}

public function set text1 (str:String):void {Label1.text = str ;}

          ]] >

< / fx:Script >

" < s:Label id ="Label1"x =" tileThickness{}"y =" tileThickness{}"

{" height =" {}height - 2 * tileThickness}"width =" {} {width - 2 * tileThickness}"

"" " maxDisplayedLines ="1"textAlign ="center"verticalAlign ="middle"

{' {' paddingLeft = "{}PADDING}" paddingTop ="{} {}PADDING" paddingRight = "{}PADDING}" paddingBottom ="{} {PADDING}"/ >

< / components: tile >

I want to have a subclass of LabeledTile called LabeledTileWithGizmo that looks like this:

goldtile.jpg

I thought this might work:

< components: "" LabeledTile width ="130" height ="32" tileColor = "0x0077EE"

contentCreationComplete = "ContentCreated ()"> "

< fx:Script >

          <! [CDATA]

private function ContentCreated():void

               {

Label1.setStyle ( "fontSize", 14);

Label1.setStyle ( "color", 0xFFFFFF);

Label1.setStyle ( 'fontFamily', '"Trebuchet MS" BOLD, Arial, Helvetica, _without' );

               }

          ]] >

< / fx:Script >

"" < components: Gizmo x = "100" y ="4" height = "24"/ > "

< / components:LabeledTile>

The gizmo appears on the tile, but the label disappears.  If I put the component Gizmo just next to the Label in the LabeldedTile element, they both get drawn.  But I want to have labeled the tiles that have no gadgets, as well as those who do.  I also have different types of gadgets.

So, should I make a subclass of tiles with optional subcomponents?  And how could I do?

Should I put more than this in TileSkin?  And the other components are States in the skin?

I should have a different skin for each tile, LabeledTile and LabeledTileWithGizmo?  The second skin must inherit from the first skin and the third to the second?

Can I get a skin for a component to set styles on a subcomponent (for example to have a LabeledTile set the fontSize, etc on the subcomponent Label)?  Or is it still possible.

I am so confused on how all these elements must adjust.  Any idea would be appreciated.

Your MXML for LabeledTile has Label1 as a child element in MXML.  When you subclass that class using MXML)

Looks like what you want to do is subclass of SkinnableContainer to have a label, part of the skin and move your label in the skin.  In this way, when you add child elements to your container it won't replace the label with your child items.

This article is a good start to learn more about the counting of spark: http://www.adobe.com/devnet/flex/articles/flex4_skinning.html

If you follow the process above, so here are some answers to your specific questions:

So, should I make a subclass of tiles with optional subcomponents?  And how could I do?

> You could label an optional part of the skin, so if someone does not want the label will then appear, they would create a custom look that does not include it.  An alternative approach is to expose a property on your component showLabel who would control the visibility of the part of the Label.

Should I put more than this in TileSkin?  And the other components are States in the skin?

> Yes move the label on the skin.  You could use States or expose a showLabel property as I mentioned above.

I should have a different skin for each tile, LabeledTile and LabeledTileWithGizmo?  The second skin must inherit from the first skin and the third to the second?

> Looks like you could do all this with a single component and a skin by adding another part of skin customized for the gizmo. Legacy via MXML skins is not trivial to implement.

Can I get a skin for a component to set styles on a subcomponent (for example to have a LabeledTile set the fontSize, etc on the subcomponent Label)?  Or is it still possible.

> Yes, you should be able to do this, simply call setStyle on the part of the skin

Tags: Flex

Similar Questions

  • Question/design architecture with best practices?

    Question/design architecture with best practices?

    Should I have separate Web server, weblogic application and IAM?
    If yes that how this time will communicate, for example can I webgate on the server that will communicate to each other?
    Any reference to decide how to design and if I have weblogic separate one for enforcement and one for IAM that how session management will take place etc.

    How is general design happens IAM project?

    Help appreciated.
    I have a business web application deployed on weblogic1 and OHS1

    deploy webtier on this OHS1 to protect the resources on OHS1. webtier will be recorded at OAM (where will be able to communicate with OAM)

    I also IAM deployed on weblogic2 & OHS2

    IAM components have weblogic. then ok. But you don't need to ohs2 here, unless your application itself requires OHS for hosting. But here, you mention that it is fair to IAM - so no need to OSH here. IAM installing requires weblogic.

    wanted to know where should I create provider (weblogic1 or weblogic2), and install webgate (OHS1 or OHS2 or both)?

    I hope it is clear now. If this isn't the case, query post for what is not clear.

  • Question about transfers/slices/layers

    Hello! I don't know if this forum is designed to answer these kinds of questions of procedure, but I tend to believe that the solution is quite simple.

    In short, I want to create a splash of Flash based not image with bearings for the first page of a Web site. I am warned with Photoshop (i.e. how to cut and save as HTML) and decent with the coding, but I'm new to Dreamweaver.

    Here's what I'm working with:

    (Layer 1)

    Picture 1.png

    (Layer 2)

    Picture 2.png

    You get the idea. Five layers with five buttons that have different content. Right now, I have the dark green buttons (which are what I want the reversal to look like) on the same layer as the function which relates to.

    What I wondered about Dreamweaver is, what exactly should I do so that he can recognize the buttons into slices as bearings while making the content featured on the left appear too. I want users can roll over the buttons, ask them light up in dark green and have the content featured on the left show - all at the same time.

    I feel that it's easy, so I'm sorry if it is trivial. And again, sorry if this is in the wrong forum!

    Disjointed rollovers are what you want.  There are different ways to do this with Scripts, CSS & Scripts or CSS only.

    Pure CSS disjointed Rollover Menu:

    http://ALT-Web.com/demos/CSS-disjointed-menu-rollover.shtml

    Pure CSS disjointed text Rollover:

    http://ALT-Web.com/demos/CSS-disjointed-text-rollover.shtml

    Disjoint bearings with behaviors DW (scripts):

    http://www.communitymx.com/content/article.cfm?cid=EB7B9BAE3B5E11E8

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    www.Alt-Web.com/
    www.Twitter.com/ALTWEB

  • Question about Design and wireless controller

    Hello world

    Although I am not new to Cisco, I have some limited experience with Wireless in general.  I was hoping to get your help with the following:

    We currently have a total of 8 1130AG, 4 on each floor.  They have been set up a few years ago, and now we are looking to update the design a bit.  Each access point has its own SSID and just provide internet access.  Looking at the configuration, I noticed that they are not configured to use the appropriate channels, the channels just randomly (9, 10, 11, instead of 1, 6, 11, etc.).  I noticed that when I roam from one access point to another, I'm losing on 4-8 pings until I re - establish connectivity again.

    Here are my questions:

    1. do I need a controller in order to use one SSID for the entire installation instead of the seprate 8 of those currently?

    2 will be using controller providing a seamless transition when a customer places between AP?

    3. is it normal to lose connectivity around homelessness?

    4. can I reconfigure the current configuration to use one SSID and provide the best transition between the AP without the use of a controller?

    5. what controller that you would recommend?

    We didn't need anything fancy, I am aware that I can activate multiple SSID VLAN, etc..  Just tried to keep the simplest possible, even reliable.

    Your entry is appreciate.

    Thank you

    Need me a controller in order to to use one SSID for the entire installation instead of the seprate 8 of those currently?

    Yes a controllers will solve the problem. any case of autonomous ap try to use the feature "unique guest SSID broadcast.

    2 will be using controller providing a seamless transition when a customer places between AP?

    It will not solve the problem, but it depends on the type of config goes for the consolidation of the AP? Layer 2 roaming? Layer 3 roaming? etc.

    3. is it normal to lose connectivity around homelessness?

    No, you should same autonomous AP, check of overlapping channels

    4. can I reconfigure the current configuration to use one SSID and provide the best transition between the AP without the use of a controller?

    This can be a solution

    5. what controller that you would recommend?

    It depends on what is your need and how much access point you have? 4400 and WISN are most commonly used.

  • Questions of design related-Clone

    Hello world

    I have a few questions regarding best practices for the design of a display environment that allows to use linked clones. In my scenario, I'm targeting two departments for a test pilot. The applications they use are similar, what is different is the shortcuts of the browser that would be generally install on their physical desktop deployment of the machine. I would rather them on one parent VM, so that they are not lost during a refresh. My question is, guys/ladies normally create a VM parent for each Department, or you just make a statue, take a snapshot for an apps to departments, and then revert to the original install different applications and then take another cliché?

    My second question is about snapshots. If I plan to not make use of WSUS and install the updates on the parent VM and then recompose (to keep the smaller delta records) it is common to start initial snapshot by an anchor, then once you install new ms updates take an another snapshop... and then once you confirm that everything works correctly You can delete the original snapshot of base? I'm still new to vsphere and instant, so I just need to better understand

    As always, thank you

    Mike

    I think your best bet is to integrate as much as possible in your VM base.  This way you can patch the VM basis and then create new snapshots for each pool.   The problem here and I speak from experience, is that when your snapshot of pool turns is so different from the base image it is simply easier to patch this particular snapshot and then create the new snapshot.   Then you have a problem you describe where you can return each snapshot and install the updates.

    If you want to have a parent VM for each Department and then use a provisioning that will reduce your wasted space.    Also remember that you can use the same snapshot to different pools so if two departments use the same applications then you can use this snapshot for both.

  • Animation question: when adding new layers...

    With the help of CS5. Let's say I have 9 layers in my Photoshop document, and I created with success an animation by some visible layers in some frames and not others. (During the animation, I use frame display, not the view of the timeline.) Now let's say that for some reason, I need to add a new layer, perhaps to make better animation look or add missing text. When I add the new layer (call it layer #10), this new layer becomes visible on each of the images of the animation, and I have to go back to every single image and remove the new layer #10 projection. Question: is there a way to avoid this? My goal is to be able to add a new layer without him appearing on each image only animation I've already finished.

    In the drop-down animation, uncheck the box new layers visible in all frames.

    more information:

    http://help.Adobe.com/en_US/Photoshop/CS/using/WSB8C58284-9DEB-44F2-9D8F-7F77594A8CC2a.htm l

    MTSTUNER

  • Question about Design Standard license

    Hello!

    I would like to know, when you purchase a Design Standard license, is that for a single computer or you can install it on 2?

    I'm trying to understand volume license... This is useful only when you have computer? We may have a maximum of 6 computer using this suite.

    Thank you!

    Christ

    Hi Christ, here's a guide to presentation to answer these questions and on several Adobe volume licensing...

    If this is not the case, just post back with something more.

  • A few Questions about the Architecture of OBIEE

    It's just a continuation of this thread:

    Confused about BI Publisher and BI Presentation Services

    I just know how the whole process works, RPD, OPE, NSQconfig...


    So next step 1 =)

    As I understand it, is now, I need to go to the Administration tool, first create a repository? Then go to BI Presentation Services to create reports (with answers)? What is the creation of the user comes up? What is the purpose of BI Publisher? I already install a few things about BI Publisher as a user, roles, etc., but still not of creating a report. Sorry if I ask too many questions, I'm just trying to understand what each tool link. I checked the docs, and especially they are diving just by changing configs without really explaining why. (àle moins c'est comment je l'ai vu) =)

    Thanks a lot again!

    Wow - where do we start!

    Remember that they are two distinct products, OBIEE and its configs related / components (RPD, Server BI, BI presentation services - ibots answers, dashboards, etc.)
    BI Publisher, formerley XML Publisher, successor to Oracle reports.

    They fall under the Oracle's BI stack.

    Lots of information on our site, the link in the previous post you mentioned.

    'Roles' in OBIEE able to determine - authorization is to say what you can do in the sytem or the 'Privileges '. What objects (reports / dashboards) you can use and can also be used for data security filters (virtual "private data" version as an Oracle DB real option "VPD" OBIEE)
    Roles in BI Publisher can generally mean the same thing, which can create folders, which can create reports, which can run, which can create sources of data etc. Sometimes, you need to use a specific role of the system name, sometimes you can create your own names and refer to them as you please (BEEP roles are generally a predefined set, OBIEE roles can be called as you like)

    Sounds hard at the beginning and without prior experience but seriously, there are some blogs very very well on here, such as mentioned in the previous answer, we have too much info on our website (Peakindicators.com)
    Feel free to send me an email.

  • Question of design around VSAN

    We left the Nexus 5 K for our CF to switching to start our UCS blades. I wonder what the best design is for the following situation.

    Active / Active NetApp HA pair.

    FC 2 ports target of each head of NetApp in the HA pair to the SAN (Nexus 5 K in our case) switches.

    1 port of each head of NetApp to each of the 5010 s nexus.

    Should I 1 VSAN on each 5010 with each head of NetApp in there or should I have 1 common VSAN between the 5010 s?

    Any comments on this would be appreciated.

    A recommended good is to use different numbering on each fabric VSAN.

    Fabric (or 1) odd numbered VSAN use (3, 5, etc.)

    Fabric B (or 2) use even mumbered VSAN (2, 4, etc.)

    It provides a visual cue for the operator to let them know what fabric, they make changes. In addition, in the case of inadvertence ISL to connect between the two fabrics that you merge your A and B fabric zonesets (I saw it happen). Do not "put any active trading in VSAN 1 for the same reason.

  • in the design mode layers are moving downwards when the height of the page gets larger?

    Hello World)

    Could someone please advice me how can I stop the layers and groups to move when I'm changing the height of the page. Even if I block them, they spend when I change the height of the page.

    Is this a bug or how to get rid of this effect?

    Thank you)

    Hello

    It depends on the content that you have placed in your Muse site and how it is placed in the site.

    For a more in-depth analysis, we would have to look at your site and its content.

    Kind regards

    Akshay

  • A question about dreamweaver cc layers

    Hello!

    Need help please, how to create a new layer with text more photos?

    * Only in dreamweaver 13 cc!

    Thank you

    "Layers" are so 1990s! The ability to easily create a container of absolute positioning (one layer) has been removed from all versions of DW, simply because it is a difficult technique to use for page layout and causes more problems than it solves. In any case, a 'layer' is any element on the page that was filed in absolute positioning by the CSS to your page. This means that even an image could be referred to as a layer, even if the image tag is not able to "contain" anything. How to make a 'sex' in contemporary versions of DW would be to place a div on your page and style it to be absolutely placed and located where you want:

    HTML

    --------

    your desired text

    CSS

    -------

    {.whatever}

    position: absolute;

    left: 200px;

    top: 50px;

    }

    This CSS will place this 50px 200px from left to right and from the top of the nearest positioned ancestor div. If there is no positioned ancestor, the div would be positioned by the top and left of the window (the browser window). -Insert the tag div, give him a class or id is set and create your CSS using the CSS panel and the selector.

  • Question: Indesign and photoshop layers

    IM wondering if there are functions in indesign where I can place a PS file with a link to a specific layer?

    If possible, I could use a Ps file for all images placed in a file. I get the same size and it is really easy to package.

    For example: place; Layers.PSD: "LayerName"

    Anyone with a tip?

    You can show/hide this layer in a multilayer file using Image > Image options layer... in the context menu after you have placed.

  • opening of the layers as components unique to a final image

    I saw this fact while taking part in the seminar in Chicago, but cannot find references in the notes. I have a picture, more than one layer with image and text, featuring different materials in a mattress, and I would like to open each layer separately with 1 full display as end product. Essentially treat the multiple layers as a slide show, the final product will be used on the Web site.

    Post edited by: Lisa Roraback

    Hi Lisa,

    Please post an example so we can see what you're talking about. It seems to me that you try to build a slide show using a layered Photoshop file. Is this correct?

    Luanne

  • ODI - question Datastore Designer

    Hello

    I'm new on ODI and I am currently using version 10.1.3.5 ODI.
    I followed John Goodwin largely blog to learn the ODI and it has been extremely helpful so far.

    Now, to the blog entry "ODI Series 4 - enter the Designer" I'm stuck at the stage of the CSV file.
    After successfully creating file account.csv, I did the entries in the data store for the same thing. But when I'm clicking the invert in the data store I'm not able to see the entries in the column. In addition, it gives no error.
    All the configurations that I did the same thing are strictly under the terms mentioned in the blog.

    So, any help on this issue is welcome.
    Looking forward to your answers.

    Thank you and best regards,
    Atul

    Your error message indicates that there is an error of synatax near the key word "TABLE".

    I checked your information of the description tab.

    It was like
    Select from the TABLE...;
    But when we try to extract data from a file, the file name with the path normally appears after the from clause.
    as
    "from... /Demo/file/test.txt T1.
    where (1 = 1)

    / * $$ SNPS_START_KEYSNP$ CRDWG_TABLESNP$ CRTABLE_... »

    first of all this source table gives data at the level of the odi?
    1. If it is Yes, the problem may be with the knowledge module you used. Try again with different KMS used for flat files in your staging area.
    2 if not, then work on it before execution.

  • Simple analysis of design Question before designing dimensions and facts

    Hi I have a simple question... (I think its simple)

    Suppose I have the following intermediate table with the following columns:

    ---------------------------------------------------------------------------
    Student_Name | RollNo. Test_Date | Object-plug
    --------------------------------------------------------------------------
    with data such as
    Kevin | 123 | 04/12/2010 | Physics

    Now suppose I want to create a cube based on the above table so that I can successfully get the result of a query like

    List the names of all of those students who took the test b & w 04/12/2010 on 2010-12-05 of Physics of matter

    Here, what I need to know what size/levels would be u together and what would be our doing?

    I think that one dimension would be time ( , but I don't know how I would like to welcome and manage duration... no idea )
    would it not be wise to make each column a dimension? for example the student_nanme dimension and the details of the student attribute?

    in any case the key is what bothers look me at the query, we see that we are required to 3 things the name of the student and the TestDate, subject pulled so if I do 3 columns the size I'm still not sure that I would be able to accommodate the request properly... any ideas on how to address and manage these situations

    Published by: Johnacandy on December 14, 2010 09:26

    Dimensions: STUDENT, TEST_DATE (role of TIME dimension) and OBJECT/CLASS.

    Yet you did not mention the measures, perhaps TEST_RESULT? If this isn't the case, it's a factless fact table.

Maybe you are looking for

  • Input selection 1/2 on Scarlett 2i4

    Logic newbie here - I don't seem to find an option for multitrack recording.  How can I differentiate / select input 1 or input 2 on my 2i4 Scarlett?  I have an AKG C214 connected to input 1, Taylor 316CE plugged ES2 on input 2.

  • Satellite A60 is turned off by itself

    Hi allI have a Toshiba Satellite A60, and she herself is turned off. I had this problem 2 years ago and had to change the hard drive with the disk driver, but was covered by my warranty. It has been resolved for 7 months, but back. Now the same probl

  • Windows 7 - error code: 80070003

    Error code: 80070003

  • Download MSXML version6.10.1129.0

    How can I download MSXML version6.10.1129.0 for allowing me to use the facilities of the office of testing?

  • HP Deskjet 1515 network Scan 8.1 Windows x 64

    Hello! I recently bought a printer/scanner HP Deskjet 1515. At the time, I had a Windows 7 x 64, connected to the printer via the USB port and everything was fine. Recently, I moved, upgraded to 8.1 Windows x 64 and have two computers in my apartment