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

net.sf.jett.event.CellEvent Maven / Gradle / Ivy

Go to download

JETT is a Java API that reads an Excel spreadsheet as a template, takes your data, and creates a new Excel spreadsheet that contains your data, formatted as in the template. It works with .xls and .xlsx template spreadsheets.

The newest version!
package net.sf.jett.event;

import java.util.Map;

import org.apache.poi.ss.usermodel.Cell;

/**
 * A CellEvent represents data associated with a "cell processed"
 * event.  It contains a reference to the Cell that was processed,
 * the Map of bean names and values used to process it, the old
 * value, and the new value.
 *
 * @author Randy Gettman
 */
public class CellEvent
{
    private Cell myCell;
    private Map myBeans;
    private Object myOldValue;
    private Object myNewValue;

    /**
     * Creates a CellEvent.
     * @param cell The Cell that was processed.
     * @param beans The Map of bean names and values that was used
     *    to process cell.
     * @param oldValue The old cell value.
     * @param newValue The new cell value.
     */
    public CellEvent(Cell cell, Map beans, Object oldValue, Object newValue)
    {
        myCell = cell;
        myBeans = beans;
        myOldValue = oldValue;
        myNewValue = newValue;
    }

    /**
     * Returns the Cell that was processed.
     * @return The Cell that was processed.
     */
    public Cell getCell()
    {
        return myCell;
    }

    /**
     * Returns the Map of bean names and values that was used to
     * process the Cell.
     * @return The Map of bean names and values.
     */
    public Map getBeans()
    {
        return myBeans;
    }

    /**
     * Returns the old cell value.
     * @return The old cell value.
     */
    public Object getOldValue()
    {
        return myOldValue;
    }

    /**
     * Returns the new cell value.
     * @return The new cell value.
     */
    public Object getNewValue()
    {
        return myNewValue;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy