problem with code

I got a problem in my code, which is about button functionality, and when I tried to implement a working function from a test method into a code mechanism, for some reason logic gets reversed.

This is how this state looks
http://imageshack.us/photo/my-images/593/4v3v.jpg/

So, let me show you first a working function which is below, to introduce you what’s going on. So what this simple function does, when you press the button, it increases or decreases for one value, and if that click is on the button down and if is like that for a 1 second, and if is still inside a bounds and still button down then we’re extra faster increasing value with interval of 250ms. Here is the code:

private final int timeDuration = 250;
private long pressedTime = timeDuration;
private long lastInvoke;
private boolean invoke;
/*
 * This metod is called in update() method
 */
public void tempButtonFunc(GameContainer container, int delta) throws SlickException {
    Input input = container.getInput();
    int mx = input.getMouseX();
    int my = input.getMouseY();

    // this indicates on one of options, which is used as a parameter, when
    // decrease/increase method is invoked
    // for column at 0 index -> decrease 
    // for column at 1 index -> increase
    // in this case 1-> volume option
    String option = SOUND_ORDER[1][0];

    boolean isButtonContains = audioButtons[1][0].contains(mx, my);
    boolean isButtonPressed = audioButtons[1][0].isButtonPressed(input);
    boolean isButtonDown = audioButtons[1][0].isButtonDown(input);  

    if (isButtonContains) {
        if (isButtonPressed) {
            invoke = false;
            lastInvoke = container.getTime();
            SettingAttributes.decreaseController(option);
        }
        if (pressedTime < timeDuration && !isButtonDown) { 
            pressedTime = timeDuration;
        }
        if (lastInvoke + 1000 < container.getTime()) {
            invoke = true;
        }
        if (isButtonDown && invoke) {
            pressedTime -= delta;
            if (pressedTime <= 0 && isButtonDown) {
                pressedTime = timeDuration;
                SettingAttributes.decreaseController(option);
            } 
        }
    }
}

However, normal code for increasing/decreasing works fine for all methods:

for (int row = 0; row < VIDEO_ROWS; row++) {
    for (int col = 0; col < TOTAL_COLS; col++) {
        if (videoButtons[row][col].contains(mx, my)) {
            if (!videoButtons[row][col].isButtonPressed(input)) continue;

            String option = VIDEO_ORDER[row][0];
            this.buttonInvokeController(option, col);
        }
    }
}

But when I try to implement above function on all buttons:

public void update(GameContainer container, int delta) throws SlickException {
    Input input = container.getInput();
    int mx = input.getMouseX();
    int my = input.getMouseY();

    for (int row = 0; row < VIDEO_ROWS; row++) {
        for (int col = 0; col < TOTAL_COLS; col++) {
        if (videoButtons[row][col].contains(mx, my)) {
            if (!videoButtons[row][col].isButtonPressed(input)) continue;

            String option = VIDEO_ORDER[row][0];
            if (videoButtons[row][col].isButtonPressed(input)) {
                // this case is supposed that should invoke part of code
                // in else case
            } else {
                this.invoke = false;
                this.lastInvoke = container.getTime();
                this.buttonInvokeController(option, col);
                // case works
            }

            // all of the code below doesn't even invoke   
            if (this.pressedTime < timeDuration && !videoButtons[row][col].isButtonDown(input)) {
                this.pressedTime = timeDuration;
            }

            if (this.lastInvoke + 1000 < container.getTime()) {
                this.invoke = true;
            }

            if (videoButtons[row][col].isButtonDown(input) && this.invoke) {
                this.pressedTime -= delta;
                if (pressedTime <= 0 && videoButtons[row][col].isButtonDown(input)) {
                    this.pressedTime = timeDuration;
                    this.buttonInvokeController(option, col);
                }
            }
        }
    }
}

There’s also below this video row options, a sound options, which is same code as above. And this are button methods:

public boolean contains(int x, int y) throws SlickException {
        int minX = this.x;
        int minY = this.y;
        int maxX = this.x + image.getWidth();
        int maxY = this.y + image.getHeight();

        if ((x > minX && x < maxX) && (y > minY && y < maxY)) {
            if (hoverImage != null) {
                image = new Image(hoverImage);
            }
            return true;
        }
        image = new Image(normalImage);
        return false;
    }

    public boolean isButtonPressed(Input input) throws SlickException {
        return input.isMousePressed(Input.MOUSE_LEFT_BUTTON);
    }

    public boolean isButtonDown(Input input) throws SlickException {
        return input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON);
    }