Resize event triggerd on TransistionManager.start ?!

Hello there i got something in AS3 thats a bid odd or maybe im doing something wrong.
I made a small example te clear some things up (see bottom part):
This example relies on 1 MC on the stage called testMc now when you run this code it works fine.
Evry time you click the movieclip in does what its suppose to do.
The output shows
trans
trans
trans
trans
etc
The problem lies when you resize the screen and then press the button again for a few times you will see this in the output
trans
resize
resize
resize
resize
resize
resize
trans
resize
trans
resize
trans
resize
trans
resize
Somehow after the resize is done it keeps calling out for the resize event.
How is this possible ?! and what can i do to fix this problem Ow i made it in CS5 if thats any help
Thanks in advance
import flash.events.MouseEvent;
import fl.transitions.*;
import fl.transitions.easing.*;
stage.addEventListener(Event.RESIZE, stageResize, false, 0, true);
function stageResize(evt:Event):void
    trace('resize');
testMc.addEventListener(MouseEvent.MOUSE_DOWN, testTrans, false, 0 , true);
testMc.buttonMode = true;
function testTrans(evt:MouseEvent):void
    trace('trans');
    TransitionManager.start(testMc, {type:Fly, direction:Transition.IN, duration:2, easing:Elastic.easeOut, startPoint:4});

I don't think very many people use the TransitionManager class or really care about it at all. It is very limited in what it does and isn't very explicable or flexible. That is probably why nobody has responded.
But evidently there is something in the Class that causes a resize event to be fired if the stage has been changed from its original size. BTW, are you testing this just in the IDE test environment? Most likely since it includes trace statements. Have you verified that it still does this on an html page (or whatever your eventually delivery format will be)? I tested it under AS3 in the testing environment and saw what you are seeing. But I haven't tried the other formats.
If you are on a PC you could go into the Class files and add some trace statments in the classes and see where that event might be getting dispatched. The files are at:
C:\Program Files\Adobe\Adobe Flash CS4\Common\Configuration\ActionScript 3.0\projects\Flash\src\fl\transitions
Be sure to make a back up before you go messing with them.
But the best thing to do would be to not use the TransitionManager class!

Similar Messages

  • Node Container that does not resize with Window Resize Event

    Hello,
    I'm not new to Java but I am new to JavaFX.
    I plan to have a container/Canvas with multiple shapes (Lines, Text, Rectangle etc) in it. This Container can be X times in the Szene with different Text Shapes. I need to Zoom and Pan (maybe rotation) the whole Szene and the Containers/Canvas.
    So I was playing around with that but I have two issues.
    1) all Canvas classes that I found (like Pane for example) do resize with the main window resize event. The content of the canvas isn't centered any more.
    2) I added a couple of Rectangles to the canvas and both the rectangles and the canvas have a mouse listener which will rotate the item/canvas. Problem is, that even if I click the rectangle also the underlaying canvas is rotated...I think I need some kind of Z-Info to find out what was clicked.
    Here is the little example program, it makes no produktiv sense but it demonstrates my problem.
    Does anybody has a tip what canvas class would fit and does not resize with the main window and how to figure out what was clicked?
    public class Test extends Application
         Scene mainScene;
         Group root;
         public static void main(String[] args)
            launch(args);
        @Override
        public void init()
            root = new Group();
            int x = 0;
            int y = -100;
            for(int i = 0; i < 5; i++)
                 x = 0;
                 y = y + 100;
                 for (int j = 0; j < 5; j++)
                      final Rectangle rect = new Rectangle(x, y, 30 , 30);
                       final RotateTransition rotateTransition = RotateTransitionBuilder.create()
                             .node(rect)
                             .duration(Duration.seconds(4))
                             .fromAngle(0)
                             .toAngle(720)
                             .cycleCount(Timeline.INDEFINITE)
                             .autoReverse(true)
                             .build();
                     rect.setOnMouseClicked(new EventHandler<MouseEvent>()
                          public void handle(MouseEvent me)
                               if(rotateTransition.getStatus().equals(Animation.Status.RUNNING))
                                    rotateTransition.setToAngle(0);
                                    rotateTransition.stop();
                                    rect.setFill(Color.BLACK);
                                    rect.setScaleX(1.0);
                                    rect.setScaleY(1.0);
                               else
                                    rect.setFill(Color.AQUAMARINE);
                                    rect.setScaleX(2.0);
                                    rect.setScaleY(2.0);
                                    rotateTransition.play();
                      root.getChildren().add(rect);
                      x = x + 100;
        public void start(Stage primaryStage)
             final Pane pane = new Pane();
             pane.setStyle("-fx-background-color: #CCFF99");
             pane.setOnScroll(new EventHandler<ScrollEvent>()
                   @Override
                   public void handle(ScrollEvent se)
                        if(se.getDeltaY() > 0)
                             pane.setScaleX(pane.getScaleX() + 0.01);
                             pane.setScaleY(pane.getScaleY() + 0.01);
                        else
                             pane.setScaleX(pane.getScaleX() - 0.01);
                             pane.setScaleY(pane.getScaleY() - 0.01);
             pane.getChildren().addAll(root);
             pane.setOnMouseClicked(new EventHandler<MouseEvent>(){
                   @Override
                   public void handle(MouseEvent event)
                        System.out.println(event.getButton());
                        if(event.getButton().equals(MouseButton.PRIMARY))
                             System.out.println("primary button");
                             final RotateTransition rotateTransition2 = RotateTransitionBuilder.create()
                                  .node(pane)
                                  .duration(Duration.seconds(10))
                                  .fromAngle(0)
                                  .toAngle(360)
                                  .cycleCount(Timeline.INDEFINITE)
                                  .autoReverse(false)
                                  .build();
                             rotateTransition2.play();
             mainScene = new Scene(pane, 400, 400);
             primaryStage.setScene(mainScene);
            primaryStage.show();
    }Edited by: 953596 on 19.08.2012 12:03

    To answer my own Question, it depends how you add childs.
    It seems that the "master Container", the one added to the Scene will allways resize with the window. To avoid that you can add a container to the "master Container" and tell it to be
    pane.setPrefSize(<child>.getWidth(), <child>.getHeight());
    pane.setMaxSize(<child>.getWidth(), <child>.getHeight());
    root.getChildren().add(pane);and it will stay the size even if the window is resized.
    Here is the modified code. Zooming and panning is working, zomming to window size is not right now. I'll work on that.
    import javafx.animation.Animation;
    import javafx.animation.ParallelTransition;
    import javafx.animation.ParallelTransitionBuilder;
    import javafx.animation.RotateTransition;
    import javafx.animation.RotateTransitionBuilder;
    import javafx.animation.ScaleTransitionBuilder;
    import javafx.animation.Timeline;
    import javafx.animation.TranslateTransitionBuilder;
    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.geometry.Point2D;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.input.MouseButton;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.input.ScrollEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Rectangle;
    import javafx.stage.Stage;
    import javafx.util.Duration;
    public class Test extends Application
         Stage primStage;
        Scene mainScene;
         Group root;
         Pane masterPane;
         Point2D dragAnchor;
         double initX;
        double initY;
         public static void main(String[] args)
            launch(args);
        @Override
        public void init()
            root = new Group();
            final Pane pane = new Pane();
            pane.setStyle("-fx-background-color: #CCFF99");
            pane.setOnScroll(new EventHandler<ScrollEvent>()
                @Override
                public void handle(ScrollEvent se)
                    if(se.getDeltaY() > 0)
                        pane.setScaleX(pane.getScaleX() + pane.getScaleX()/15);
                        pane.setScaleY(pane.getScaleY() + pane.getScaleY()/15);
                        System.out.println(pane.getScaleX() + " " + pane.getScaleY());
                    else
                        pane.setScaleX(pane.getScaleX() - pane.getScaleX()/15);
                        pane.setScaleY(pane.getScaleY() - pane.getScaleY()/15);
                        System.out.println(pane.getScaleX() + " " + pane.getScaleY());
            pane.setOnMousePressed(new EventHandler<MouseEvent>()
                public void handle(MouseEvent me)
                    initX = pane.getTranslateX();
                    initY = pane.getTranslateY();
                    dragAnchor = new Point2D(me.getSceneX(), me.getSceneY());
            pane.setOnMouseDragged(new EventHandler<MouseEvent>()
                public void handle(MouseEvent me) {
                    double dragX = me.getSceneX() - dragAnchor.getX();
                    double dragY = me.getSceneY() - dragAnchor.getY();
                    //calculate new position of the pane
                    double newXPosition = initX + dragX;
                    double newYPosition = initY + dragY;
                    //if new position do not exceeds borders of the rectangle, translate to this position
                    pane.setTranslateX(newXPosition);
                    pane.setTranslateY(newYPosition);
            int x = 0;
            int y = -100;
            for(int i = 0; i < 5; i++)
                 x = 0;
                 y = y + 100;
                 for (int j = 0; j < 5; j++)
                      final Rectangle rect = new Rectangle(x, y, 30 , 30);
                       final RotateTransition rotateTransition = RotateTransitionBuilder.create()
                             .node(rect)
                             .duration(Duration.seconds(4))
                             .fromAngle(0)
                             .toAngle(720)
                             .cycleCount(Timeline.INDEFINITE)
                             .autoReverse(true)
                             .build();
                     rect.setOnMouseClicked(new EventHandler<MouseEvent>()
                          public void handle(MouseEvent me)
                               if(rotateTransition.getStatus().equals(Animation.Status.RUNNING))
                                    rotateTransition.setToAngle(0);
                                    rotateTransition.stop();
                                    rect.setFill(Color.BLACK);
                                    rect.setScaleX(1.0);
                                    rect.setScaleY(1.0);
                               else
                                    rect.setFill(Color.AQUAMARINE);
                                    rect.setScaleX(2.0);
                                    rect.setScaleY(2.0);
                                    rotateTransition.play();
                      pane.getChildren().add(rect);
                      x = x + 100;
            pane.autosize();
            pane.setPrefSize(pane.getWidth(), pane.getHeight());
            pane.setMaxSize(pane.getWidth(), pane.getHeight());
            root.getChildren().add(pane);
            masterPane = new Pane();
            masterPane.getChildren().add(root);
            masterPane.setStyle("-fx-background-color: #AABBCC");
            masterPane.setOnMousePressed(new EventHandler<MouseEvent>()
               public void handle(MouseEvent me)
                   System.out.println(me.getButton());
                   if((MouseButton.MIDDLE).equals(me.getButton()))
                       double screenWidth  = masterPane.getWidth();
                       double screenHeight = masterPane.getHeight();
                       System.out.println("screenWidth  " + screenWidth);
                       System.out.println("screenHeight " + screenHeight);
                       System.out.println(screenHeight);
                       double scaleXIs     = pane.getScaleX();
                       double scaleYIs     = pane.getScaleY();
                       double paneWidth    = pane.getWidth()  * scaleXIs;
                       double paneHeight   = pane.getHeight() * scaleYIs;
                       double screenCalc    = screenWidth > screenHeight ? screenHeight : screenWidth;
                       double scaleOperator = screenCalc  / paneWidth;
                       double moveToX       = (screenWidth/2)  - (paneWidth/2);
                       double moveToY       = (screenHeight/2) - (paneHeight/2);
                       System.out.println("movetoX :" + moveToX);
                       System.out.println("movetoY :" + moveToY);
                       //double scaleYTo = screenHeight / paneHeight;
                       ParallelTransition parallelTransition = ParallelTransitionBuilder.create()
                               .node(pane)
                               .children(
                                   TranslateTransitionBuilder.create()
                                       .duration(Duration.seconds(2))
                                       .toX(moveToX)
                                       .toY(moveToY)
                                       .build()
                                   ScaleTransitionBuilder.create()
                                       .duration(Duration.seconds(2))
                                       .toX(scaleOperator)
                                       .toY(scaleOperator)
                                       .build()
                      .build();
                       parallelTransition.play();
        public void start(Stage primaryStage)
             primStage = primaryStage;
            mainScene = new Scene(masterPane, 430, 430);
             primaryStage.setScene(mainScene);
            primaryStage.show();
    }

  • Issue with TextArea resize event

    Hi,
    In the following
    sample there
    is a button and a textarea in a VDivideBox. If you move the
    divider, the Textarea is resized and in its resize event I change
    the fonts size. It works very well except in one case: If the
    Textarea is given the focus and then you try to resize it by moving
    the divider, then all the text goes blank ! I've debugged it and
    everything looks fine, so I can't figure out what's going on...
    I'm using Flex 3. To see the code, right click and View
    Source.
    Thanks for helping.

    Hello,
    You say:
    "The event trace shows that INPUTFINISHED got triggered. The technical workflow log also shows a record of the terminating event - but still the task does not get finished - the task still remains INPROCESS and does not get COMPLETED."
    I would concentrate on fixing this. If an event is being created wth the proper key (check that) then the workflow should pick it up. You say you can even see it in the workflow log? Are you using a wait step, or have you set the event as a terminating event for the whole workflow? Try generating the event manually (with SWUE) to figure out what the problem is. This should work. Check the workflow log for errors.
    regards
    Rick Bakker
    Hanabi Technology

  • Handling resize event ...

    I have a class that extends Panel. I add some buttons
    (Min/Restore/Max/Close ... top right corner,etc) to the chrome
    using rawChildren.addChild. I'd like to restrict the window to
    never be allowed to get to a height less than the height of the
    buttons or a width less than the combined width of the buttons
    (this is a generalization, I've included logic to account for
    borders, etc). Nevertheless, I've tried countless approaches ...
    then I tried listening for a resize event ...
    //in constructor
    this.addEventListener("resize", myResizeHandler);
    //handler
    private function myResizeHandler(event:ResizeEvent):void{
    width = Math.max(someMinimumCalculatedWidth(), width);
    height = Math.max(someMinimumCalculatedHeight(), height);
    As shown ... within the event handler, I set width/height
    properties of the panel. In the case where they are different than
    current width/height, it expected it would trigger yet another
    resize event .... and I expected to get into some kind of nutty
    event loop (as you can see ... I'm in that ** I'll try anything
    ...** mode). Surprisingly ... it worked properly. There doesn't
    seem to be a resize event triggered when I set the width/height to
    values different than they were before entering the handler? I've
    perused the Panel/UIComponent source and everything I see leads me
    to believe another resize event would be triggered.
    So ... as strange as it sounds, I'd like to understand why
    this works :-) I can't bring myself to just move on without knowing
    why another resize event isn't dispatched and why I don't end right
    back up in myResizeHandler ...

    "AJC5327" <[email protected]> wrote in
    message
    news:[email protected]...
    >I have a class that extends Panel. I add some buttons
    >(Min/Restore/Max/Close
    > ... top right corner,etc) to the chrome using
    rawChildren.addChild. I'd
    > like to
    > restrict the window to never be allowed to get to a
    height less than the
    > height
    > of the buttons or a width less than the combined width
    of the buttons
    > (this is
    > a generalization, I've included logic to account for
    borders, etc).
    > Nevertheless, I've tried countless approaches ... then I
    tried listening
    > for a
    > resize event ...
    >
    > //in constructor
    > this.addEventListener("resize", myResizeHandler);
    >
    > //handler
    > private function
    myResizeHandler(event:ResizeEvent):void{
    > width = Math.max(someMinimumCalculatedWidth(), width);
    > height = Math.max(someMinimumCalculatedHeight(),
    height);
    > }
    >
    > As shown ... within the event handler, I set
    width/height properties of
    > the
    > panel. In the case where they are different than current
    width/height, it
    > expected it would trigger yet another resize event ....
    and I expected to
    > get
    > into some kind of nutty event loop (as you can see ...
    I'm in that ** I'll
    > try
    > anything ...** mode). Surprisingly ... it worked
    properly. There doesn't
    > seem
    > to be a resize event triggered when I set the
    width/height to values
    > different
    > than they were before entering the handler? I've perused
    the
    > Panel/UIComponent
    > source and everything I see leads me to believe another
    resize event would
    > be
    > triggered.
    >
    > So ... as strange as it sounds, I'd like to understand
    why this works :-)
    > I
    > can't bring myself to just move on without knowing why
    another resize
    > event
    > isn't dispatched and why I don't end right back up in
    myResizeHandler ...
    A lot of times I find I have to go several classes up the
    inheritence chain
    to find where something lives. A shortcut to this is to find
    the public
    class extends statement and click whatever it extends. Press
    F3.
    HTH;
    Amy

  • Microsoft Forefront Server Protection Eventing Service won't start?

    Hi Guys,
    When Forefront Protection for Exchange was integrated/enabled on our SBS 2008 server, Microsoft Forefront Server Protection Eventing Service won’t start. Even when we try to start it manually we are getting this message (see attached). During this attempt,
    we got these events in the event viewer. In this case, in order to have our email working, we have to temporarily disable Forefront. Any suggestion how to fix this? Please advise.
    Event 465
    Source: ESENT
    FSCEventing (9324) Corruption was detected during soft recovery in logfile C:\Program Files (x86)\Microsoft Forefront Protection for Exchange Server\Data\Incidents\inc.log. The failing checksum record is located at position END. Data not matching the log-file
    fill pattern first appeared in sector 450 (0x000001C2). This logfile has been damaged and is unusable.
    Event 301
    Source: ESENT
    FSCEventing (9324) The database engine has begun replaying logfile C:\Program Files (x86)\Microsoft Forefront Protection for Exchange Server\Data\Incidents\inc.log.
    Event 454
    Source: ESENT
    FSCEventing (9324) Database recovery/restore failed with unexpected error - 501.
    Event 1076
    Source: FSCEventing
    The Forefront Protection Eventing Service has stopped.
    Thank you very much!
    Arnel

    Hi Arnel,
    Based on error messages, it indicates a log file (inc.log) has become corrupted. Please restore the log file
    from a backup copy, and then check if this issue can be solved. For more details, please refer to the following article.
    Event Id 465
    Hope this helps.
    Best regards,
    Justin Gu

  • How to handle component's resize event

    Hi All,
    Can someone tell whether you can in any way to capture component's resize event, e.g. panelGroupLayout?
    Thanks!

    Hi,
    its an event raised on the render kit, the component will not pass this on to the server.
    I did not try JavaScript but there is a registerResizeNotifyComponent(Object component) on the AdfPAGE object that you may be able to register a custom proxy object to. Then when the proxy receives the resize event you would call a custom event to the srever (serverListener)
    http://docs.oracle.com/cd/E23549_01/apirefs.1111/e12046/oracle/adf/view/js/base/AdfPage.html
    Frank
    Ps.: As said - haven't tried this

  • Event logs fails to start on Exchange Server 2010

    My Exchange server 2010 R2 SP1 Enterprise single server is down.  All exchange services fail to start.  It appears like the Microsoft Exchange Active Directory Topology service isn't starting which is a dependency for all other services.
    The error I get when trying to start this service is:
    Windows could not start the Microsoft Exchange Active Directory Topology on Local Computer.  For more information, review the System Event Log.  If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code
    -2147024882
    To make matters worse, the event viewer is not starting either.
    When trying to start the Windows Event Log, I get the error:
    Windows could not start the Windows Event Log service on Local Computer. Displays Error code 5
    This is running on a Windows Server 2008 R2 SP1 Standard box.
    Any assistance is appreciated.

    When trying to start the Windows Event Log, I get the error:
    Windows could not start the Windows Event Log service on Local Computer. Displays Error code 5
    Hi,
    Based on this error, this problem happens if any of the following conditions are true:
    The built-in security group EventLog does not have permissions on the folder %SystemRoot%\System32\winevt\Logs
    The Local Service account does not have default permissions on the following registry key: HKLM\Software\Microsoft\Windows\CurrentVersion\Reliability
    To solve this problem, we need to restore the default permissions in the list below on %SystemRoot%\System32\winevt\logs.
    Authenticated user - List folder/read data, Read attributes, Read Extended attributes, Read permissions
    Administrators - Full control
    SYSTEM - Full control
    EventLog - Full control
    Please try the following methods:
    Method 1
    To restore the default permissions on folder %SystemRoot%\System32\winevt\logs, follow these steps.
    Right-click on %SystemRoot%\System32\winevt\logs and select Properties.
    Select the Security tab.
    Click Edit button and click the Add button in the permissions dialog box.
    In Select users, computers, or Groups dialog box ensure that under object types Built in Security Principals and the location as local computer name is selected.
    Enter the object name as "NT SERVICE\EventLog" without quotes. And click OK. This group should have full control on the folder.
    Once EventLog group is added add the rest of the groups with above mentioned permissions.
    Method 2
    Identify a Windows Server 2008 machine with default permissions.
    Click Start, and then type cmd in the Start Search box.
    In the search results list, right-click Command Prompt, and then click Run as Administrator.
    When you are prompted by User Account Control, click Continue.
    Type the command CD %SystemRoot%\SYSTEM32.
    Once the working directory is changed to %SystemRoot%\SYSTEM32 type the command icacls winevt\* /save acl /T.
    This will save a file named ACL in %SystemRoot%\SYSTEM32. Copy this file to the C: drive on the problem computer.
    On the problem computer, open command prompt with administrator privileges (refer to previous steps 1-3).
    Change the working directory to %SystemRoot%\SYSTEM32.
    Execute the command icacls winevt\ /restore acl.
    Default permissions on the registry key HKLM\Software\Microsoft\Windows\CurrentVersion\Reliability should be:
    CREATOR OWNER - Full control
    SYSTEM - Full control
    LOCAL SERVICE - Query Value, Set Value, Create Subkey, Notify and Delete
    Administrators - Full control
    Users - Read
    To set the permission on this registry key:
    Click the Start menu, select Run and type Regedit.
    Go to the location HKLM\Software\Microsoft\Windows\CurrentVersion\Reliability.
    From the Edit menu click Permissions.
    Add the permissions for the accounts as listed above.
    In addition, Exchange 2010 SP1 and SP2 are end of support.
    https://support.microsoft.com/en-us/lifecycle/search/default.aspx?alpha=exchange%20server%202010&Filter=FilterNO
    Best Regards.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Lynn-Li
    TechNet Community Support

  • Resizing events, and blocking application

    Hi,
    While developing my application, that displays the state of processes, I observed something I can not duplicate that good. While debugging the app, I observed that when I manually resize the window size, my application could block (as in not response any more and stop running altogether). As said, I can not duplicate the problem. At the moment I can resize the window while it is updated, and the app keeps on running and stays responsive. But to solve this (potential) problem, should I add an event listener like WindowStateListener? Does this method catch window resizing events? And could I then add to my code something like
        public void windowStateChanged(WindowEvent e) {
            repaint();
        }Or, stated otherwise, to what event should I listen so a window resize event can be caught, and used to repaint the window?
    Abel

    I think that before resizing a windowActivated() event is generated... you could use this to set up your task before the window is resized. Of course, an activation doesn't mean resizing but perhaps it could help.
    Regards.

  • Window Resizing event

    Is there any way to detect a window resizing event? When I grad the corner of a JFrame, I'd like to be able to tell that it is being resized. If anyone konw a way of doing this, please let me know.
    Alan

    You could have your window implement the ComponentListener interface. There is a method that gets called when the component's size changes.
    -S-

  • Intercept the resize event of the header of the column

    hi
    how to intercept the resize event of the header of the column

    Add a changeListener to the width property:
        firstNameCol.widthProperty().addListener(new ChangeListener() {
                @Override
                public void changed(ObservableValue observable, Object oldvalue, Object newValue) {
                    System.out.println("The column width is changed: New width is " + newValue);
            });

  • Event triggering fails to start the next process chain

    Hi
    I have two process chains A & B
    At the end of process chain A i am triggerring the an event which is the start condition for process chain B.( periodic )
    Now when i debug my process chain A , i see the event is triggered successfully but inspite of that the next process chain does not start.
    Does anyone faced similar problem? Its little urgent. Any clue would be useful.
    Regards
    Purva

    HI,
    In addition to the above comment also see if you have given the event name correctly and try to see if you can run the PC by triggering the event manually (Tcode: SM64)
    Assign points if helpful.
    Rgds,
    Kalyan

  • How to throw a resize-event?

    Hi,
    is it possible to throw a resize-event? And do I have to code it?
    Thanks

    Not quite sure what you mean by "throw" here, but you can define a ComponentListener and add it to a component. One of the methods is componentResized().
    hth

  • Resize events and bad frame location

    Hi
    I'm writing an application with a main frame and a non-modal
    dialog. I'd like to keep the two windows at the same distance
    so I've to know when the user moves the main frame or resizes
    it. I've added a ComponentListener to the main frame and ...
    I've noticed a strange behaviour when I receive resize events.
    While I'm dragging the left edge of the main frame, resizing
    it, the method getBounds returns always the old location:
    only the frame size changes.
    I can't understand where is the mistake!
    I'm using the Sun JDK 1.5.0_06 under Suse Linux 9.3 Pro.
    Thanks and Regards
    import java.awt.event.ComponentAdapter;
    import java.awt.event.ComponentEvent;
    import javax.swing.JFrame;
    public class ResizeTest extends ComponentAdapter {
         public ResizeTest() {
              super();
              mainFrame = new JFrame("Test Frame");
              mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              mainFrame.setBounds(100, 100, 400, 200);
              mainFrame.addComponentListener(this);
         public void setVisible(boolean visible) {
              mainFrame.setVisible(visible);
         public void componentResized(ComponentEvent e) {
              System.out.println(mainFrame.getBounds());
         public static void main(String[] args) {
              ResizeTest testFrame = new ResizeTest();
              testFrame.setVisible(true);
         private JFrame mainFrame;
    }

    I've just made some tests.
    Using both JRE 1.5.0_06 and JRE 1.4.2_08 on my Suse
    Linux workstation, only "width" value changes.
    Using JRE 1.5.0_04 on Windows XP, it works. Only one
    resize event has been sent (at the end of the drag
    phase), however ... bounds are correct.
    Yes, it seems a version/platform issue.
    Thanks a lot.

  • Resize event

    if (EventEnum != SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE & EventEnum != SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
         SAPbouiCOM.Form oCurrentForm = SBO_Application.Forms.Item(FormUID);
                    if (EventEnum == BoEventTypes.et_FORM_RESIZE)
                        try
                            oCurrentForm.Items.Item("PLB").Left = oCurrentForm.Items.Item("10000330").Left - oCurrentForm.Items.Item("PLB").Width - 3;
                            oCurrentForm.Items.Item("PSOB").Left = oCurrentForm.Items.Item("PLB").Left - oCurrentForm.Items.Item("PSOB").Width - 3;
                            oCurrentForm.Items.Item("PLB").Top = oCurrentForm.Items.Item("10000330").Top;
                            oCurrentForm.Items.Item("PSOB").Top = oCurrentForm.Items.Item("PLB").Top;
                        catch { }
    //TODO: This is triggered many times. WHY ?????
    My goal is to keep 2 custom buttons aside system one but
    I tried many things in form_Load, Activate or with things like BeforeAction, etc..etc
    I dont know how to make sure that the buttons are really positioned correctly and avoid makeing a call to the resize event many times for nothing
    In this actual form, the code make the form flickering many times before get finaly stop.
    Else then that, the buttons are very nicely placed and when I resize, they stay right at their place.

    > Marc ...
    >
    >
    > My guess is that you can achive this by specifying
    > the controls for which you need the resize.  You can
    > do something like this ..
    >
    > if (EventEnum !=
    > SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE & EventEnum
    > != SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
    >                {
    > SAPbouiCOM.Form oCurrentForm =
    > SBO_Application.Forms.Item(FormUID);
    > if (EventEnum == BoEventTypes.et_FORM_RESIZE)
    > {
    > try
    > {
    >      switch (FormUID)
    >      {
    >           case "PLB":
    > oCurrentForm.Items.Item("PLB").Left =
    > t = oCurrentForm.Items.Item("10000330").Left -
    > oCurrentForm.Items.Item("PLB").Width - 3;
    > oCurrentForm.Items.Item("PLB").Top =
    > p = oCurrentForm.Items.Item("10000330").Top;
    >                break;
    >           case "PSOB":
    > oCurrentForm.Items.Item("PSOB").Left =
    > t = oCurrentForm.Items.Item("PLB").Left -
    > oCurrentForm.Items.Item("PSOB").Width - 3;
    > oCurrentForm.Items.Item("PSOB").Top =
    > p = oCurrentForm.Items.Item("PLB").Top;
    >                break;
    >           }
    > }
    > catch { }
    > }
    > }
    >
    > The idea is to try to delimit the times the Resize
    > event is detected.  Also try using the
    > <b>oForm.Freeze = true</b> at the beginning and
    > <b>oForm.Freeze = false</b> when done setting the
    >  controls.  This should take care of the flickering.
    Sorry but it never get into any one of those 2 case.
    All I see is "F_12" or "F_13" when I debug at the switch line

  • Panel resize event bug?

    I'm having a bit of hassle with a panel resize event.
    For reasons best known to me, I have some parallel loops monitoring certain UI behaviour and reacting appropriately.
    I have noticved that when a loop which is monitoring the "Panel Resize" event stops, (No dynamic registration) the next panel resize will freeze the VI.  It's as if the Event case is not releasing the handle to the "Panel resize" event.
    If I handle the "Panel Resize" event via a dynamic registration and subsequent release, everything works fine.
    This is in LV 8.2.1.
    Shane.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant
    Attachments:
    Freezes.vi ‏22 KB
    Doesnt freeze.vi ‏24 KB

    tst wrote:
    I think this has to do with LabVIEW locking the FP (as configured) even when the event structure should not execute any more. I actually created a simple example of it recently, but saved it in one my projects instead of where I would see it, so I forgot about it. I now dug it up and back saved it to 8.0. You can also simplify this example by removing the value change event and making the key down event lock the UI.
    Message Edited by tst on 11-10-2008 02:14 PM
    Sorry Yair,
    but this is not a bug!, it is explainable behaviour and expected behaviour.
    What happens, the front panel is locked on the second edit. (use exectuion high-lighting) The event structure is always listening for events where it is registered for, even if the event case will never execute, on the first edit (key down) the event is triggered and the VI is locked and unlocked. The second edit the event is triggered again and the FP is locked. Because the event structure can't execute the FP stays locked.
    Shane's behaviour is truly a bug.
    The same behaviour is seen with the 'Pane:size' event. (in 8.6)
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

Maybe you are looking for

  • Creation of individual object in crm

    Hi All, Can anyone help me how to create an Individual Object in CRM. I have created Equipment in R/3,replicated to CRM. Now when i am trying to create Installed Base i dont find any Individual Objects on the Individual Object tab in the Installed Ba

  • How to persisty data in ADF

    How can I create a table to create new objects in database using ADF, I try to drag the execute operation but has no effect . Thank you. I think the button commit is missing, please correct me if I´m wrong. Message was edited by: Luis Henrique Correa

  • Totals in BEx query not matching with actual total

    Hi, We have one report in BI, the total for few columns (Given by BI system i.e system generated) for the values of the key figures is not matching with actual total of that values... I am confused to see, how sap BI can do the totaling mistake... Pl

  • Context Node not bound

    Hi, I have a scenario where in i have to pass data from  view1 of Component 1  to View 2 of Component2. As i understand , this is possible only through the component controllers. while achieving this,I am facing a problem in the initial step itself.

  • In my Component monitoring i got this error for Adapter engine status.

    In my Component monitoring i got this error for Adapter engine status. Status is in red.. Attempt to fetch cache data from Integration Directory failed; cache could not be updated [Fetch Data]: Unable to find an associated SLD element (source element