# DoubleClickTest (Slick - The 2D Library)
Date: 2013-06-03

## org.newdawn.slick.tests
Class DoubleClickTest

    java.lang.Object
      org.newdawn.slick.BasicGame
          org.newdawn.slick.tests.DoubleClickTest

All Implemented Interfaces:
  ControlledInputReciever, ControllerListener, Game, InputListener, KeyListener, MouseListener

    public class DoubleClickTest

extends BasicGame

The double click testing

Author:
  kevin

Field Summary

Fields inherited from class org.newdawn.slick.BasicGame
`controllerButton, controllerDown, controllerLeft, controllerRight, controllerUp`

Constructor Summary
`DoubleClickTest()` Create the test game

Method Summary
`void` `init(GameContainer container)` Initialise the game.
`static void` `main(java.lang.String[] argv)` Entry point to our test
`void` `mouseClicked(int button, int x, int y, int clickCount)` Notification that a mouse button was clicked.
`void` `render(GameContainer container, Graphics g)` Render the game's screen here.
`void` `update(GameContainer container, int delta)` Update the game logic here.

Methods inherited from class org.newdawn.slick.BasicGame

`closeRequested, controllerButtonPressed, controllerButtonReleased, controllerDownPressed, controllerDownReleased, controllerLeftPressed, controllerLeftReleased, controllerRightPressed, controllerRightReleased, controllerUpPressed, controllerUpReleased, getTitle, inputEnded, inputStarted, isAcceptingInput, keyPressed, keyReleased, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setInput`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DoubleClickTest

    public DoubleClickTest()

  Create the test game

Method Detail

### init

    public void init(GameContainer container)
              throws SlickException

  Description copied from interface: `Game`
  Initialise the game. This can be used to load static resources. It's called before the game loop starts

  Specified by:
    `init` in interface `Game`
  Specified by:
    `init` in class `BasicGame`
  Parameters:
    `container` - The container holding the game
  Throws:
    `SlickException` - Throw to indicate an internal error
  See Also:
    `BasicGame.init(org.newdawn.slick.GameContainer)`

### update

    public void update(GameContainer container,
                       int delta)
                throws SlickException

  Description copied from interface: `Game`
  Update the game logic here. No rendering should take place in this method though it won't do any harm.

  Specified by:
    `update` in interface `Game`
  Specified by:
    `update` in class `BasicGame`
  Parameters:
    `container` - The container holing this game
    `delta` - The amount of time thats passed since last update in milliseconds
  Throws:
    `SlickException` - Throw to indicate an internal error
  See Also:
    `BasicGame.update(org.newdawn.slick.GameContainer, int)`

### render

    public void render(GameContainer container,
                       Graphics g)
                throws SlickException

  Description copied from interface: `Game`
  Render the game's screen here.

  Parameters:
    `container` - The container holing this game
    `g` - The graphics context that can be used to render. However, normal rendering routines can also be used.
  Throws:
    `SlickException` - Throw to indicate a internal error
  See Also:
    `Game.render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)`

### main

    public static void main(java.lang.String[] argv)

  Entry point to our test

  Parameters:
    `argv` - The arguments to pass into the test, not used here

### mouseClicked

    public void mouseClicked(int button,
                             int x,
                             int y,
                             int clickCount)

  Description copied from interface: `MouseListener`
  Notification that a mouse button was clicked. Due to double click handling the single click may be delayed slightly. For absolute notification of single clicks use mousePressed(). To be absolute this method should only be used when considering double clicks

  Specified by:
    `mouseClicked` in interface `MouseListener`
  Overrides:
    `mouseClicked` in class `BasicGame`
  Parameters:
    `button` - The index of the button (starting at 0)
    `x` - The x position of the mouse when the button was pressed
    `y` - The y position of the mouse when the button was pressed
    `clickCount` - The number of times the button was clicked
  See Also:
    `BasicGame.mouseClicked(int, int, int, int)`

Copyright © 2006 New Dawn Software. All Rights Reserved.