Sliding canvases between states

We are building an application with multiple steps (similar
to a wizard). Between each step, we would like the panel from the
current step to slide to the left and the new panel to slide in
from the right. The tricky part is that we would like to define a
single reusable transition to handle this as opposed to one per
step.
We have the effects figured out (using Move, AddChildAction,
RemoveChildAction); however, the current panel simply disappears.
It seems that the state change is occurring before the transition
is finished. We have been trying to setup the targets for the
transition effects from the currentStateChanging event...is this to
late? Is there a better time in the lifecycle to do this?
Is there a better design? We have discussed eliminating
states and just adding child elements as necessary as well, but
would need to find a way to trigger the change (we are using
Cairngorm).
Thanks!

For a wizard, I'd use a ViewStack. Something like this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Move id="slideLeft" xFrom="0" xTo="-500" />
<mx:Move id="slideRight" xFrom="500" xTo="0" />
<mx:ViewStack x="78" y="123" id="viewstack1" width="404"
height="349">
<mx:Panel label="panel1" width="100%" height="100%"
id="panel1" title="Panel 1"
showEffect="slideRight" hideEffect="slideLeft">
</mx:Panel>
<mx:Panel label="panel2" width="100%" height="100%"
id="panel2" title="Panel 2"
showEffect="slideRight" hideEffect="slideLeft">
</mx:Panel>
<mx:Panel label="panel3" width="100%" height="100%"
title="Panel 3" id="panel3"
showEffect="slideRight" hideEffect="slideLeft">
</mx:Panel>
<mx:Panel label="panel4" width="100%" height="100%"
title="Panel4"
showEffect="slideRight" hideEffect="slideLeft">
</mx:Panel>
</mx:ViewStack>
<mx:LinkBar x="78" y="80" dataProvider="{viewstack1}">
</mx:LinkBar>
</mx:Application>

Similar Messages

  • What is the different between statement and preparedstatement?

    hi,
    recently i have attended a telephonic interview. they asked me what is the different between statement and preparedstatement? and when u will use them? Hi! can any one say me the original difference??

    sorry dear,
    i am already shortlisted. and monday is my HR round.
    . Every 1 is not like u.
    So you have read the examples and explanations that you found when you googled, and you have read the javadoc and you still don't understand? And you are shortlisted? For what? I hope you won't do server programming.
    I will give you a few hints.
    Escaping of data
    Storing of dates
    Safer
    Faster

  • Date prompt with a between statement

    Can a dashboard support a date range prompt? We are trying to make a prompt and use a between statement. Suggestions?

    I think you are using the prompt from the Prompt tab in Answers. What you need to do is use Dashboard prompts.
    Although Dashboard prompts have a "between" operator," if you use the 'between" operator, the ability to save the selections to Presentation Variables (PVs) disappears. When I need a "between" dates type prompts, I do the following:
    1) Create two Dashboard prompts set to PVs, say StartDate and EndDate. (In the Edit Formula area, use a CASE stmt on the column chosen -- doesn't matter what the column is -- so no action is performed on the column) (e.g., CASE WHEN 1=0 THEN ColumnName.TableName ELSE 'TEST' END)
    2) Change control to "Edit Box" so users can input the dates. (If you select two appropriate date columns, you can use the "Drop-down List" option and have the user select a valid date. In that case, you wouldn't use the CASE statement in step 1.)
    2) In your report, filter on the date column, convert the filter to SQL, and type in the following:
    +"Column name"."Table Name"+ BETWEEN '@{StartDate}' AND '@{uEndDate}'
    3) Place both the prompts and the report on a dashboard and when a start and end date is selected, the "between" function is performed on the report.
    HTH,
    Edited by: LC143 on Sep 3, 2008 9:52 AM

  • Shortcut to switch between states?

    Hey there gurus,
    Simple one for you.
    Fireworks CS4. Mac OS 10.5.2.
    Is there a shortcut to switch between states?
    Thanks in advance.
    Tom

    Hey Tom,
    Glad to see you found your way to the keyboard shortcuts area. Here are a couple notes that might keep your Fireworks experience happy:
    •Try to keep your Fireworks files small... Don't have too many pages when you are going to be using a lot of states; I know it is tempting to have the entire project in one file... separating the different sections by pages and the different states of the sections by the states, but it will be worth your while to keep these files smaller and have multiple files in place of multiple pages. This will do wonders for helping the app remain consistent.
    •If you do choose to use multiple smaller files in place of large ones, use 'Command + `' (1 key left of 1/! key). This will let you flip through open pages. If you want to go in reverse, add shift (Command+Shift+`).
    •Try using the terminal command 'purge' if/when things get slow, this coupled with the aforementioned smaller files has helped me avoid crashes.
    •Make some custom tool panel layouts and save them in Window > Workspace Layouts > Save Current. If you want to update a workspace layout, just type the name of the layout you wish to save over.
    Best wishes and good luck with the clients!

  • How to animate panel's borderAlpha between states?

    Hi there,
    I have two states where a panel starts small in one state, then grows larger in the next state.
    I want to have the borderAlpha property of the panel change between states as well. The first state I want the borderAlpha to be ".04", the other state it needs to be "1".
    I've looked around and I can't find a way to define the borderAlpha between the two states.
    When I use this code in the state's properties I keep getting an error: ("panelURL" is the id of the panel)
    <mx:SetProperty target="{panelURL}" name="borderAlpha" value="1.0"/>

    Hi, have you taken a look at transitions between states?
    for example:
       <mx:transitions>
          <mx:Transition id="toOver" fromState="*" toState="over">
             <ds:AnimateColor target="{this}" property="backgroundColor"
                isStyle="true" toValue="0xff9600" duration="300" />
          </mx:Transition>
          <mx:Transition id="toUp" fromState="*" toState="up">
             <ds:AnimateColor target="{this}" property="backgroundColor"
                isStyle="true" toValue="0x1e83b8" duration="300" />
          </mx:Transition>
          <mx:Transition id="toDown" fromState="*" toState="down">
             <ds:AnimateColor target="{this}" property="backgroundColor"
                isStyle="true" toValue="0xff9600" duration="300" />
          </mx:Transition>
       </mx:transitions>
    (taken from a blog)
    hope it helps

  • Between statement

    Does it exist in actionscript a between statement?
    If I would search for a value that is more than 2 but less
    than 4. Is there like a >2<4 statement I could do?

    no, use:
    if(yourvar<4 && yourvar>2){
    }

  • Loading Between States

    This has always seemed to be a small issue, but an annoying issue/process for loading a page. I am designing a gallery "ribbon" in muse consisting of black and white images that turn to color on rollover. Instead of loading the "button" together with both the color and black and white image, The B&W image is loaded at a different speed than its Color counterpart so while rolling across the ribbon on first load of the site, (what most visitors will be doing), it seems as though the image disappears until the color image counterpart is loaded (along with the rest of the page). Is there a workaround to get the black and white image to stay until the color image is loaded. At least it wouldn't disappear.

    Understandable, however I still think it's bezarre that a video state can remain in a "buffering" state and never change back to "playing", which it really is. To me, when a video state changes to buffering it means that the video needs to be paused to allow time for the network catch up. The FLVPlayback component does do this for almost all scenarios. However in this one instance at the beginning of playback, the swapping between states and finally ending in a buffering state indefinately is problematic. I figure there was an edge case scenario from within the control that allowed this to leak through.
    I can write extra code to check the buffering state against the playback status of the video. I suppose, given the nature of buffering, that it should be separated from video events and left as its own entity. Such that a video can be paused or playing, yet the buffer may be empty (at which point the video has to pause), full, or at a point that's safe for playback.

  • Getting Line Space in between statements

    Hi ,
    Line1<?field1?>
    Line2<?field2?>
    Line3<?xdoxslt:ifelse(Field3!='',field4,field5)?>
    Line4<?Filed6?>
    During runtime in RTF template getting space in between lines.In above statement at line 3 getting space if field3 is not null and field 4 is Null.
    Output in RTF template as below:
    field1(value)
    field2(Vlaue)
    SPACE
    field6(value)
    Please advice how to avoid spaces if the value is null in ifelse statement.
    tried byusing @inlines in ifelse.. getting error message.. will @inlines support in ifelse statement.
    Thanks
    -Ghanta

    Hi
    Tried following statment but i am getting space inbetween lines if Contactaddress is Null.
    <?if@inlines:(ContactFirstLastName!=''and ContactAddress!='') or PrimaryAccountAddr!=''?><?xdoxslt:ifelse(ContactFirstLastName!='',ContactAddress,PrimaryAccountAddr)?><?end if?>
    Is anything wrong in above statement.
    Thanks
    -Sri

  • Animating controls between states.

    Hi Oracle community.
    A while ago I started a thread here on the forum where I had put three different subjects to be treated. The user jsmith guided me saying that I was supposed to separate things, dividing each subject in a separate thread. The original discussion is at the following link:
    Interesting things, however, unknown? StackPane, animations and filters.
    So in this discussion, I will be talking about controls and animations. A few weeks ago I started studying JavaFX, and some days I came across the need to develop a specific type of test. This test involved in making the JavaFX controls to suffer animations between their states. We know we can change the appearance of controls between it's various states using CSS. We can also apply certain types of animations to them using JavaFX API. However, I do not believe that we can easily apply more complex animations. For example, suppose we have a simple button. Would it be possible to apply a particle emitter on the button when you hover the mouse over it? Would it be possible to also play the animation of a rectangle moving inside a button when it is clicked? Notice also that changing the appearance of controls when their states are changed abruptly. A button has an appearance, and by passing the mouse over, he suddenly changes his appearance instantly.
    These are just examples, not real things I have to do, because they are things I've done in the past using Swing and Timing Framework libraries. I believe that JavaFX has much more to mature. Or maybe not. Maybe the developers just forgot to better document this technology to us. Why do I say this? Well, there are things that differentiate applications when they are put on the market, especially if they are things that fill the eyes with curiosity. I simply can not build an app that just has to look different from other applications. That would not call the public's attention. We all know that. I think that JavaFX is a fascinating technology, and I hope that this kind of feature is really possible. Maybe I am not seeing how this can be done, so I need a hand, I don't know yet.
    In any case, I thank you for your attention.

    jsmith
    Back when we used Swing all we had to do was create a JComponent, perhaps a model class, and a ComponentUI class. It was basically what we did when we did not want to use a pluggable UI. With the override of the painting method in ComponentUI, and the use of animations with Timing Framework library, anything was possible. One thing that made me migrate to JavaFX was it's performance, ease of doing many things (way beyond Swing), and new features (of course). There are certain things nowadays that we have to open a little more our heads. Why am I saying that? Well...
    What differentiates us as living beings? It's our personal possessions? Our powers? Our social status? All of us today are seen as equal (or at least it should be), and so we got unsure how we can be different. When we create something new, how it can be considered new? We see many movies in the cinema today, then we observe it's history. If we are critical in a positive way, we think of various aspects of the film, but no matter what, we always observe the history of film. Oftentimes we clearly came to the conclusion that the film's story is a cliché. We've seen this story being told before, but in another way. This kind of conclusion comes not spoil our enjoyment of watching the movie. Nowadays, with so many special effects, it is likely you do not care to see the same story told in a different way. But if you think about it, we can see that a film is not just a set of actors acting, it is not several hours of rendering scenes made on computer, or even spending more than 100 million dollars. A film is a set of things, all of which are carefully put together around the story. Without a story, a film does not exist. Therefore, it is remarkable that the story of a movie is something crucial, and also something unique. In the same way that a director has several concerns with a movie, a software designer have with a project.
    Now leaving all the "nonsense" I said before, let me ask you a simple thing: Which type of interface do you think people will be attracted...
    These (Please see all the links):
    Lab Manager - JavaFX Application - YouTube
    http://3.bp.blogspot.com/-t0ID3U3qHrE/TxwJaYMLwiI/AAAAAAAAABM/RxcHh7Jy8Jw/s1600/CalendarStyle.png
    http://www.toedter.com/blog/wp-content/uploads/2012/02/contacts-javafx-dark-2.1-beta-build12-font.png
    http://cache.fxexperience.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-29-at-11.32.36-AM1.png
    http://fxexperience.com/wp-content/uploads/2013/01/Modena-Windows.png
    Or these (Please see all the links):
    ListCell Animation in ListView JavaFX - YouTube
    after effects ui test soundblaster - YouTube
    GUI Concept - Borderless (2009) - YouTube
    ui animation - YouTube
    FUTURE DESIGN - Hi-Tech Car User Interface GUI / Dashboard Speedometer - YouTube
    I want to make clear that the visual design of an application is not everything. An application must be functional and do what it purports to accomplish. But again I ask you: What differentiates us as living beings?. In fact, it's not our appearance, but our creativity. It is the things that are inside us. Our emotions, our hearts and our desires.
    Here is the question: How could I differentiate my application in the market? Changing the appearance and functionality of the controls is one of the things that will make my application prevails in the market among my competitors. For that to happen, as a human being I just need to be creative. I hope you have understood for what reason I think things should be easier. I did not mean to offend anyone having spoken about all this. I just wanted to express for what reason I think some things are really more important at some point. Many people do not notice it, or do not have an open mind. And that's not a problem. Most of us do not notice much. For example, I do not notice the nails of my wife when she goes to the salon. (she gets a wild animal ).
    It is not the material we study, It's us. Of course the better the creation tool, the better the creation. But at the end of it all, all the work is always in our hands (in our heads, actually).
    Regarding my studies on the customization of the JavaFX controls, I think I'm close to figuring out how I can finally do what I want. From what I'm seeing, with the arrival of JavaFX 8, it is necessary that the developer also learn about the new CSS API. We must also be aware of the hierarchical properties of Node, Parent, Region, and Control, and finally put some logic in SkinBase, reusing its existing methods. If God wills, I'll soon be aware of how to do this.
    Thanks again for the help and attention.

  • Formula using a between statement

    I have a two part question...
    First, I need to calculate the number of years based between two dates.  Currently the formula states DateA - Date B / 365.  Which doesn't give me the exact years b/c the 365 does not accommodate the extra days during leap years.  Is there a better formula that will include the add'l days due to leap year?
    Next, I'm looking for a formula to help calculate the following:
    If {@Years} is between 2 and 4.99 then 15
    or IF {@Years} is between 5 and 9.99 then 20
    of IF {@Years} is between 10 and 14.99 then 25
    else 30
    Any thoughts?

    Try this formula
    If {@Years} in [2,4.99] then 15
    else IF {@Years} in [5,9.99] then 20
    else IF {@Years} in [10,14.99] then 25
    else 30
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Nov 12, 2008 8:46 PM
    This formula would help you to get numbser of days
    datediff("d",date(year(currentdate),1,1),date(year(currentdate),12,31))+1
    By placing the parameter in the place of year you can get number of days for different years
    Edited by: Raghavendra Gadhamsetty on Nov 12, 2008 8:52 PM

  • What is the defference between Statement & PreparedStatement?

    Tell me some features of both! I don't know what the defferences is between them!
    Which should i use?

    Hi,
    A Statement object is obtained by calling createStatement on a Connection, which Provides methods to execute SQL commands. The PreparedStatement is a slightly more powerful version of a Statement.
    Please refer, http://www.jguru.com/faq/view.jsp?EID=693 for the difference between the both.
    Hope that helps.
    Regards,
    Senthil Babu
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Playing a different transition between states depending on what state you're currently viewing

    Not quite sure if I'm going to be able to explain this but i'll give it a go.
    I have 4 buttons that when clicked display content in an area. I want to set state transitions so that when i switch between the 4 states the content of the current state moves off the page to the left and the content of the clicked state moves in from the right. I've managed to get it working but only from (for example) state 1 > 2. When I click to go back from 2 > 1 the content moves in the wrong direction - its just moving back!
    I need to set a different state transition so when on state2 the content for state1 moves in from the right, not back in from the left!
    Hopefully someone understands all that! Thanks,
    Luke

    Hi Luke,
    You can create separate transitions for State1 > State2 and State2 > State1. However, if you're using the trick of position of the objects offscreen so they'll animate the right way onscreen, you might have a hard time.
    Try this instead. Let's say you're going from State1 > State2, and you want Object1 to move off to the left while Object2 comes on from the right.
      Hide Object2 in State1. It doesn't matter where you place it before you hide it.
      The State1 > State2 transition should now have a "Fade In" for Object2.
      Select the track with the fade, then click "Add Action > Move". This will create a move effect for Object2, but by default it will animate from its arbitrary start position to the State2 position. We need to change the start position.
      Create another Move effect. In the properties panel, you can see properties for the move effect. Change the dropdown to "Specific Location".
      Set the coordinates to the start location (way off to the right of the screen) of the animation.
      This new move effect will put Object2 in its start position, then the original move effect will animate it to it's final location. Drag the new (specific location) move effect to happen before the original (state position) move effect.
      Preview the transition. You should see Object2 slide in from the right.
      Repeat for Object1, and repeat the process for the other transition.
    -Adam

  • Is there a difference between Statement Cache and the statement handle!

    Hello!
    The OCI statement cache is !session! wide. When I have a sql statement that was used before, I can use this feature.
    But what is the difference between this feature and my statement handle for a certain sql statement that I can store and reuse a second time?
    My stored statement handle is already prepared and the placeholders are bound. The second time I only have to copy new values in the memory positions and do an execute and that's all.
    Thank you in advance
    Wolfgang

    The underlying optimization is the same. When you re-execute a statement, you are reusing the metadata already available in the statement and the cursor already open on the server. If you know exactly the set of statements that you are going to execute repeatedly, you can maintain the cache on your own. (Yes, you save on doing the Bind/Define calls multiple times).
    OCI Statement cache makes it transparent and the application does not need to keep the references/indexes to the relevant statements. Also once a cache size is set, least recently used statements get out of the cache when the cache is full and needs to accommodate more.
    To optimize the bind/defines on the statements from the statement cache, you can use this feature:
    http://www.filibeto.org/sun/lib/nonsun/oracle/11.2.0.1.0/E11882_01/appdev.112/e10646/oci09adv.htm#sthref1358

  • JCheckBox with "in-between" state

    Hi all,
    I'm looking for a way to create a JCheckBox with 3 states: on/off/between. This is for use in a JTree, where every node has a checkbox. Each checkbox will be selected if all childnodes are selected, deselected if all childnodes are deselected, and semi-selected if some childnodes are selected and some are not.
    I've seen this in some applications, and the checkbox is then drawn checked, but the inside of the checkbox is then painted in gray instead of white.
    It would really surprise me if no-one has done this yet, but I've googled without results. I don't really know where to start, because I would like the checkbox to still use the colors and drawings defined in the current look and feel...
    Any suggestions???

    Hi there,
    I suppose that the third state of the CheckBox is the visual state we see, if we have previously called the
    setDisabledSelectedIcon() method. Isn't it?
    So, in the three different cases you call setSelected(true), setSelected(false) and setDisabledSelectedIcon().
    And if you want the user to act and change this Check Box, in order for all childrens to listen to? I think there is no problem as the box is not really disabled, it just seems disabled and selected.
    I hope this helps
    thanasis

  • Javadb BETWEEN statement

    hello!
    i experienced in javadb that the BETWEEN -sql statement does not result in the resultset one could expect. actually a between query "SELECT * FROM whatever WHERE date BETWEEN '01.01.2007' AND '31.12.2007' " over a varchar "date" gave me all entries from the table, whatever year there was mentioned.
    is there another way, or do i missunderstand between, to select data between a specified date?
    greetings
    andreas

    Hi,
    If your date column is defined in the db as a date and not a varchar it should work. At least it does on SQL-server. The sql-server converts your varchars to dates (given you have written them correct. In my enviroment the syntax is like this: MM-DD-YYYY or MM.DD.YYYY if you like).
    If your date column is defined in the db as a varchar i guess things will work differently. I dont know if it is even possible to do betweens on a varchar column.
    That being said, why not use a parameterized query and a Statement.setDate(). Then you can work directly with dates instead of varchars and strings.

Maybe you are looking for

  • Installation of adobe reader causes existing icons to be converted to pdf files

    After installing Adobe from a download allmy desktop items were changed to adobe (pdf) icons. I had to uninstall in order to chane them back to their former status and consequently cannot have adobe reader on my machine until the problem of "converti

  • How to distribute on browser a PDF form but editing it only online?

    Hi, this is my issue: I need to distribute a PDF form made with InDesing or Acrobat X Pro and collect data. But...I have  some other requirements/constraints. 1)     The final user have to edit form only online 2)     The final user have to edit the

  • Cannot browse Amazon without freezing & extreme slowness.

    This only happens at Amazon. Once I find an item, scrolling up and down , the page sticks or freezes. The entire computer (any other tab, as well as Tools) froze continuously every time I visited Amazon. The only way to escape this mess was closing w

  • Problem in selecting records

    Hi, everyone. I have a problem in selecting records.  In this case, I want to select records from database LFA1,and the components of this table are LIFNR,ERDAT,LOEVM ,and so on.The type of LIFNR is char(10).There is a internal table:tab_cdhdr , the

  • Change in purchase order date

    Dear all how can i change purchase order date if i enetred wrong in me21n.i checked in me22n for change but it is in grey mode & system not allowed. regards ajit