All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.habibsweb.commons.components.event.ScrollableListItemSelectionEvent Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.habibsweb.commons.components.event;

import java.util.EventObject;

/**
 *
 * @author Charles Hamilton
 */
public class ScrollableListItemSelectionEvent extends EventObject {

    /**
     * Item has been selected
     */
    public static final int SELECTED = 1;
    /**
     * item has been unselected
     */
    public static final int UNSELECTED = 0;

    private final int index;
    private final int mode;
    /**
     * Constructs a new ScrollableListItemSelectionEvent
     *
     * @param source the ScrollableList that created the event
     * @param selection the mode of selected or unselected
     * @param index the index of the item
     */
    public ScrollableListItemSelectionEvent(Object source,int selection, int index) {
        super(source);
        this.index=index;
        this.mode=selection;
    }

    /**
     * Gets the index of the item
     * @return the index of the item
     */
    public int getIndex() {
        return index;
    }

    /**
     * Gets the selection mode
     * @return the selection mode
     */
    public int getMode() {
        return mode;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy