Resize event in applet?

I have a panel in my applet and I want it to always on the center of the applet. I have coded like this in the method init() :
myPanel.setBounds((int)(getSize().getWidth()-300)/2,(int)(getSize().getHeight()-300)/2,300,300);
and I set my applet to have null layout. I guess that I must put the above code to the resize event, but I find nothing about this event. Any suggestion would be pleased.
thanks in advance.

I have a panel in my applet and I want it to always on
the center of the applet. I have coded like this in
the method init() :
myPanel.setBounds((int)(getSize().getWidth()-300)/2,(in
)(getSize().getHeight()-300)/2,300,300);
and I set my applet to have null layout. I guess that
I must put the above code to the resize event, but I
find nothing about this event. Any suggestion would be
pleased.Well, if WindowEvent.STATE_CHANGED doesn't help... stupid question back: is it possible to resize an Applet? It's been a while since I wrote applets, I can't remember much, but I thought it has a fixed size attribute that's stated within the <applet> or <object> tags?

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

  • 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

  • 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.

  • 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!

  • 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);
            });

  • 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.

  • Can I resize the html applet size ?

    <applet code="myapplet.class" width="800" height="600"></applet>I know that I can use getSize() in my code file to get the size of the applet in html.
    However, can I resize the html applet tag width and height? It seems impossible.

    You could try to generate the HTML, save it to a File, and the use showDocument() to reload the whole page.
    (T)

  • 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

  • EEM event manager applet problem

    I'm trying to create an EEM applet to log the output of a command to file every 5 minutes. The idea is to get a traffic baseline for implementing control plane policing but I want statistics from at least a whole week (not just while I'm at work). I have a 6506-E running 12.2(18)SXF17a for WLSM (WS-SVC-WLAN-1-K9) support. Initially I was trying to save the file to tftp but it turns out one cannot "| append" to a file on a tftp server. I thought about trying to increment the file name with a counter but instead I opted for this:
    event manager applet controlplanelog
    event timer cron name controlplanelog cron-entry "0/5 * * * *"
    action 1.0 cli command "enable"
    action 1.1 cli command "show policy-map control-plane | append disk1:log.txt"
    This didn't seem to work because the contents of the file "disk1:log.txt" didn't change over the course of my lunch time. I thought I had the timer messed up so I changed the entry "0/5 * * * *" to "0,5,10,15,20,25,30,35,40,45,50,55 * * * *". That didn't work either so I changed the event to none and ran it manually using "event manager run" and still, the file "disk1:log.txt" contents did not change.
    Am I trying to execute an unsupported command or is this an error or am I just doing it wrong? Any help would be appreciated.

    That is wierd. I must have typed it in wrong somewhere....
    I had already removed all eem commands since I used the numbers from the other 6500 log file. When I added them back in with the command changed to "show version" the text file was modified as expected. Even before checking the file, I noticed a difference because I had debugging on per your previous suggestion and these lines showed up in addition to the lines which previously showed up.
    545685: Sep 10 15:41:24.674 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :
    545686: Sep 10 15:41:24.674 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT : 6506#
    545687: Sep 10 15:41:24.674 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : IN  : 6506#exit
    545688: Sep 10 15:41:24.674 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : CTL : cli_close called.
    At this point I reverted to the original command and it now works as expected.
    For the sake of progeny, here is the debugging when not appending to a file.
    545990: Sep 10 15:50:27.016 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : CTL : cli_open called.
    545991: Sep 10 15:50:27.120 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :
    545992: Sep 10 15:50:27.120 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT : 6506>
    545993: Sep 10 15:50:27.120 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : IN  : 6506>enable
    545994: Sep 10 15:50:27.132 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :
    545995: Sep 10 15:50:27.132 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT : 6506#
    545996: Sep 10 15:50:27.132 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : IN  : 6506#show policy-map control-plane
    545997: Sep 10 15:50:27.144 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :
    545998: Sep 10 15:50:27.144 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :  Control Plane Interface
    545999: Sep 10 15:50:27.144 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :
    546000: Sep 10 15:50:27.144 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :   Service-policy input: copp-policy
    546001: Sep 10 15:50:27.144 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :
    546002: Sep 10 15:50:27.144 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : OUT :   Hardware Counters:(ouput omitted)546017: Sep 10 15:50:27.148 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : CTL : 20+ lines read from cli, debug output truncated
    546018: Sep 10 15:50:27.148 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : IN  : 6506#exit
    546019: Sep 10 15:50:27.148 KST: %HA_EM-6-LOG: controlplanelog : DEBUG(cli_lib) : : CTL : cli_close called.
    On a side note I have been pondering something unrelated to my original question but maybe you know the answer to that too. If I have NTP restricted by an access list using the "ntp access-group peer" and "ntp access-group serve" commands as well as through control plane policing, which list is processed first: Do the "ntp access-group" commands keep packets from entering the control plane that don't match the list or do they hit the control plane before being dropped by the access-list?

  • 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

  • Receiver File Adapter fails saving an attachment

    Dear XI/PI experts. I have a file to file scenario where I send a XML message with PDF attachment. I am using Additional Files configuration in the Sender adapter. I can monitor that the attachment goes succesfully through Xi runtime environment and

  • Purchase order Item return

    Hi All, when the customer return a material in ME23N transaction return check box is checked then in the back ground what will happend? i mean what abt the quatity, net price and gross value? when the item returns will the data of quantity, net price

  • Will not start in safe mode

    Using PB G4 15 in. Trackpad froze and then machine auto shut down. Restart failed. V boot failed. Pram boots all failed. Has reached apple screen once but froze and auto shut down again. Please help. Ps note sure which OS as can't power up to check.

  • Truncate in a stored procedure or trigger?

    hello all, is it possible to use 'truncate table' in trigger or stored procedure ? I can do a delete, but when i use truncate table <mytable>, when i compile the trigger, i get an error, the word 'TABLE' seems forbidden. thanks for help

  • Workflow copy...

    Hi, In my scenario I have a custom workflow working fine. I need to create another workflow that works exactly the same, only difference is that the Business object associated is different (but has all the necessary methods / attributes as of first w