Class DefaultVisualizer

java.lang.Object
org.netbeans.jemmy.util.DefaultVisualizer
All Implemented Interfaces:
Cloneable, Operator.ComponentVisualizer
Direct Known Subclasses:
MouseVisualizer

public class DefaultVisualizer extends Object implements Operator.ComponentVisualizer, Cloneable
Used as component visualizer by default.
Author:
Alexandre Iline (alexandre.iline@sun.com)
See Also:
  • Constructor Details

    • DefaultVisualizer

      public DefaultVisualizer()
  • Method Details

    • checkForModal

      public void checkForModal(boolean yesOrNo)
      Forces vizualizer to check that component is on the top modal dialog or no modal dialog displayed.
      Parameters:
      yesOrNo - If true, JemmyInputException will be throught if component is not on the top modal dialog and a modal dialog is dislayed.
    • activateWindow

      public void activateWindow(boolean yesOrNo)
      Informs that a window contained component should be activated.
      Parameters:
      yesOrNo - true if windows need to be activated.
    • activateInternalFrame

      public void activateInternalFrame(boolean yesOrNo)
      Informs that an internal frame contained component should be activated.
      Parameters:
      yesOrNo - true if internal frames need to be activated.
    • scroll

      public void scroll(boolean yesOrNo)
      Informs that scrolling should be made.
      Parameters:
      yesOrNo - true if scroll panes need to be scrolled.
    • switchTab

      public void switchTab(boolean yesOrNo)
      Informs that tab switching should be made.
      Parameters:
      yesOrNo - true if tabbed panes need to be switched.
    • isWindowActive

      protected boolean isWindowActive(WindowOperator winOper)
      Returns true if window is active.
      Parameters:
      winOper - an operator representing the window.
      Returns:
      true is window is active.
    • makeWindowActive

      protected void makeWindowActive(WindowOperator winOper)
      Performs an atomic window-activization precedure. A window is sopposed to be prepared for the activization (i.e. put "to front").
      Parameters:
      winOper - an operator representing the window.
    • activate

      protected void activate(WindowOperator winOper)
      Activates a window. Uses makeWindowActive if necessary.
      Parameters:
      winOper - an operator representing the window.
      See Also:
    • initInternalFrame

      protected void initInternalFrame(JInternalFrameOperator intOper)
      Inits an internal frame.
      Parameters:
      intOper - an operator representing the frame.
    • scroll

      protected void scroll(JScrollPaneOperator scrollOper, Component target)
      Scrolls JScrollPane to make the component visible.
      Parameters:
      scrollOper - an operator representing a scroll pane.
      target - a component - target to be made visible.
    • switchTab

      protected void switchTab(JTabbedPaneOperator tabOper, Component target)
      Switches tabs to make the component visible.
      Parameters:
      tabOper - an operator representing a tabbed pane.
      target - a component - target to be made visible.
    • makeVisible

      public void makeVisible(ComponentOperator compOper)
      Prepares the component for user input.
      Specified by:
      makeVisible in interface Operator.ComponentVisualizer
      Parameters:
      compOper - an operator representing the component.
      Throws:
      JemmyInputException
      See Also:
    • cloneThis

      public DefaultVisualizer cloneThis()
      Creates an exact copy of this visualizer.
      Returns:
      new instance.