< prev index next >

core/JemmyCore/src/org/jemmy/interfaces/Mouse.java

Print this page




  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package org.jemmy.interfaces;
  27 
  28 
  29 import org.jemmy.Point;

  30 import org.jemmy.dock.Shortcut;

  31 import org.jemmy.env.Timeout;
  32 
  33 /**
  34  *
  35  * @author shura
  36  */
  37 public interface Mouse extends ControlInterface {
  38     /**
  39      *
  40      */
  41     public static final Timeout CLICK = new Timeout("mouse.click", 100);
  42     /**
  43      *
  44      */
  45     @Shortcut
  46     public void press();
  47     /**
  48      *
  49      * @param button
  50      */
  51     @Shortcut
  52     public void press(MouseButton button);
  53     /**
  54      *
  55      * @param button
  56      * @param modifiers
  57      */
  58     @Shortcut
  59     public void press(MouseButton button, Modifier... modifiers);
  60     /**
  61      *
  62      */
  63     @Shortcut
  64     public void release();
  65     /**
  66      *
  67      * @param button
  68      */
  69     @Shortcut
  70     public void release(MouseButton button);
  71     /**
  72      *
  73      * @param button
  74      * @param modifiers
  75      */
  76     @Shortcut
  77     public void release(MouseButton button, Modifier... modifiers);
  78     /**
  79      *
  80      */
  81     @Shortcut
  82     public void move();
  83     /**
  84      *
  85      * @param p
  86      */
  87     @Shortcut
  88     public void move(Point p);
  89     /**
  90      *
  91      */
  92     @Shortcut
  93     public void click();
  94     /**
  95      *
  96      * @param count
  97      */
  98     @Shortcut
  99     public void click(int count);
 100     /**
 101      *
 102      * @param count
 103      * @param p
 104      */
 105     @Shortcut
 106     public void click(int count, Point p);
 107     /**
 108      *
 109      * @param count
 110      * @param p
 111      * @param button
 112      */
 113     @Shortcut
 114     public void click(int count, Point p, MouseButton button);
 115     /**
 116      *
 117      * @param count
 118      * @param p
 119      * @param button
 120      * @param modifiers
 121      */
 122     @Shortcut
 123     public void click(int count, Point p, MouseButton button, Modifier... modifiers);
 124 
 125     /*
 126      * This method turns mouse wheel.
 127      * @parem amount Positive or negative
 128      */
 129     @Shortcut
 130     public void turnWheel(int amount);
 131 
 132     /*
 133      * This method turns mouse wheel.
 134      * @parem amount Positive or negative
 135      */
 136     @Shortcut
 137     public void turnWheel(Point point, int amount);
 138 
 139     /*
 140      * This method turns mouse wheel.
 141      * @parem amount Positive or negative


 142      */
 143     @Shortcut
 144     public void turnWheel(Point point, int amount, Modifier... modifiers);
 145 
 146     /**
 147      * Detaches the implementation so that all actions of it will be ran detached.
 148      * @see org.jemmy.action.ActionExecutor#executeDetached(org.jemmy.env.Environment, org.jemmy.action.Action, java.lang.Object[])
 149      * @return
 150      */
 151     public Mouse detached();
 152 
 153     /**
 154      * Mouse button interface (i. e. BUTTON1, BUTTON2, etc.)
 155      * created to left the possibility for extention as enums can't be extended
 156      */
 157     public static interface MouseButton extends Button {
 158 
 159     }
 160 
 161     /**
 162      * Mouse modifier interface (i. e. BUTTON1_DOWN_MASK)
 163      * created to left the possibility for extention as enums can't be extended
 164      */
 165     public static interface MouseModifier extends Modifier {
 166 
 167     }
 168 
 169     /**
 170      * Mouse modifiers enum (i. e. BUTTON1_DOWN_MASK)
 171      * to be used in Keyboard interface methods
 172      */
 173     public static enum MouseModifiers implements MouseModifier {
 174 
 175         /**
 176          *
 177          */
 178         BUTTON1_DOWN_MASK,
 179         /**
 180          *
 181          */
 182         BUTTON2_DOWN_MASK,
 183         /**
 184          *
 185          */
 186         BUTTON3_DOWN_MASK
 187     }
 188 
 189     /**
 190      * Mouse Buttons
 191      */
 192     public static enum MouseButtons implements MouseButton {
 193         /**
 194          *
 195          */
 196         BUTTON1,
 197         /**
 198          *
 199          */
 200         BUTTON2,
 201         /**
 202          *
 203          */
 204         BUTTON3
 205     }
 206 
 207 }


  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package org.jemmy.interfaces;
  27 
  28 
  29 import org.jemmy.Point;
  30 import org.jemmy.action.Action;
  31 import org.jemmy.dock.Shortcut;
  32 import org.jemmy.env.Environment;
  33 import org.jemmy.env.Timeout;
  34 
  35 /**

  36  * @author shura
  37  */
  38 public interface Mouse extends ControlInterface {



  39     public static final Timeout CLICK = new Timeout("mouse.click", 100);
  40 


  41     @Shortcut
  42     public void press();
  43 



  44     @Shortcut
  45     public void press(MouseButton button);
  46 




  47     @Shortcut
  48     public void press(MouseButton button, Modifier... modifiers);
  49 


  50     @Shortcut
  51     public void release();
  52 



  53     @Shortcut
  54     public void release(MouseButton button);
  55 




  56     @Shortcut
  57     public void release(MouseButton button, Modifier... modifiers);
  58 


  59     @Shortcut
  60     public void move();
  61 



  62     @Shortcut
  63     public void move(Point p);
  64 


  65     @Shortcut
  66     public void click();
  67 



  68     @Shortcut
  69     public void click(int count);
  70 




  71     @Shortcut
  72     public void click(int count, Point p);
  73 





  74     @Shortcut
  75     public void click(int count, Point p, MouseButton button);
  76 






  77     @Shortcut
  78     public void click(int count, Point p, MouseButton button, Modifier... modifiers);
  79 
  80     /*
  81      * This method turns mouse wheel.
  82      * @param amount Positive or negative
  83      */
  84     @Shortcut
  85     public void turnWheel(int amount);
  86 
  87     /*
  88      * This method turns mouse wheel.
  89      * @param amount Positive or negative
  90      */
  91     @Shortcut
  92     public void turnWheel(Point point, int amount);
  93 
  94     /*
  95      * This method turns mouse wheel.
  96      * @param point todo document
  97      * @param amount Positive or negative
  98      * @param modifiers todo document
  99      */
 100     @Shortcut
 101     public void turnWheel(Point point, int amount, Modifier... modifiers);
 102 
 103     /**
 104      * Detaches the implementation so that all actions of it will be ran detached.
 105      * @see org.jemmy.action.ActionExecutor#executeDetached(Environment, boolean, Action, Object...)
 106      * @return todo document
 107      */
 108     public Mouse detached();
 109 
 110     /**
 111      * Mouse button interface (i. e. BUTTON1, BUTTON2, etc.)
 112      * created to left the possibility for extention as enums can't be extended
 113      */
 114     public static interface MouseButton extends Button {
 115 
 116     }
 117 
 118     /**
 119      * Mouse modifier interface (i. e. BUTTON1_DOWN_MASK)
 120      * created to left the possibility for extention as enums can't be extended
 121      */
 122     public static interface MouseModifier extends Modifier {
 123 
 124     }
 125 
 126     /**
 127      * Mouse modifiers enum (i. e. BUTTON1_DOWN_MASK)
 128      * to be used in Keyboard interface methods
 129      */
 130     public static enum MouseModifiers implements MouseModifier {




 131         BUTTON1_DOWN_MASK,



 132         BUTTON2_DOWN_MASK,



 133         BUTTON3_DOWN_MASK
 134     }
 135 
 136     /**
 137      * Mouse Buttons
 138      */
 139     public static enum MouseButtons implements MouseButton {



 140         BUTTON1,



 141         BUTTON2,



 142         BUTTON3
 143     }
 144 
 145 }
< prev index next >