Class MainFrame

    • Constructor Detail

      • MainFrame

        public MainFrame​(TreeModel treeModel,
                         JMeterTreeListener treeListener)
        Create a new JMeter frame.
        Parameters:
        treeModel - the model for the test tree
        treeListener - the listener for the test tree
      • MainFrame

        @Deprecated
        public MainFrame()
        Deprecated.
        Do not use - only needed for JUnit tests
        Default constructor for the JMeter frame. This constructor will not properly initialize the tree, so don't use it.
    • Method Detail

      • setFileLoadEnabled

        public void setFileLoadEnabled​(boolean enabled)
        Specify whether or not the File|Load menu item should be enabled.
        Parameters:
        enabled - true if the menu item should be enabled, false otherwise
      • setFileSaveEnabled

        public void setFileSaveEnabled​(boolean enabled)
        Specify whether or not the File|Save menu item should be enabled.
        Parameters:
        enabled - true if the menu item should be enabled, false otherwise
      • setFileRevertEnabled

        public void setFileRevertEnabled​(boolean enabled)
        Specify whether or not the File|Revert item should be enabled.
        Parameters:
        enabled - true if the menu item should be enabled, false otherwise
      • setProjectFileLoaded

        public void setProjectFileLoaded​(String file)
        Specify the project file that was just loaded
        Parameters:
        file - - the full path to the file that was loaded
      • setEditMenu

        public void setEditMenu​(JPopupMenu menu)
        Set the menu that should be used for the Edit menu.
        Parameters:
        menu - the new Edit menu
      • setEditEnabled

        public void setEditEnabled​(boolean enabled)
        Specify whether or not the Edit menu item should be enabled.
        Parameters:
        enabled - true if the menu item should be enabled, false otherwise
      • setEditAddMenu

        public void setEditAddMenu​(JMenu menu)
        Set the menu that should be used for the Edit|Add menu.
        Parameters:
        menu - the new Edit|Add menu
      • setEditAddEnabled

        public void setEditAddEnabled​(boolean enabled)
        Specify whether or not the Edit|Add menu item should be enabled.
        Parameters:
        enabled - true if the menu item should be enabled, false otherwise
      • closeMenu

        public void closeMenu()
        Close the currently selected menu.
      • showStoppingMessage

        public void showStoppingMessage​(String host)
        Show a dialog indicating that JMeter threads are stopping on a particular host.
        Parameters:
        host - the host where JMeter threads are stopping
      • updateCounts

        public void updateCounts()
      • setMainPanel

        public void setMainPanel​(JComponent comp)
      • getTree

        public JTree getTree()
      • testStarted

        public void testStarted()
        Called when a test is started on the local system. This implementation sets the running indicator and ensures that the menubar is enabled and in the running state.
        Specified by:
        testStarted in interface TestStateListener
        See Also:
        StandardJMeterEngine.run()
      • testStarted

        public void testStarted​(String host)
        Called when a test is started on a specific host. This implementation sets the running indicator and ensures that the menubar is in the running state.
        Specified by:
        testStarted in interface TestStateListener
        Parameters:
        host - the host where the test is starting
        See Also:
        StandardJMeterEngine.run()
      • testEnded

        public void testEnded()
        Called when a test is ended on the local system. This implementation disables the menubar, stops the running indicator, and closes the stopping message dialog.
        Specified by:
        testEnded in interface TestStateListener
        See Also:
        StandardJMeterEngine.stopTest()
      • testEnded

        public void testEnded​(String host)
        Called when a test is ended on the remote system. This implementation stops the running indicator and closes the stopping message dialog.
        Specified by:
        testEnded in interface TestStateListener
        Parameters:
        host - the host where the test is ending
        See Also:
        StandardJMeterEngine.stopTest()
      • initTopLevelDndHandler

        public void initTopLevelDndHandler()
        Support for Test Plan Dnd see BUG 52281 (when JDK6 will be minimum JDK target)
      • setExtendedFrameTitle

        public void setExtendedFrameTitle​(String fname)
      • clearData

        public void clearData()
        Description copied from interface: Clearable
        Clears the current data of the object.
        Specified by:
        clearData in interface Clearable
      • updateUndoRedoIcons

        public void updateUndoRedoIcons​(boolean canUndo,
                                        boolean canRedo)
        Update Undo/Redo icons state
        Parameters:
        canUndo - Flag whether the undo button should be enabled
        canRedo - Flag whether the redo button should be enabled