001: //** Copyright Statement ***************************************************
002: //The Salmon Open Framework for Internet Applications (SOFIA)
003: // Copyright (C) 1999 - 2002, Salmon LLC
004: //
005: // This program is free software; you can redistribute it and/or
006: // modify it under the terms of the GNU General Public License version 2
007: // as published by the Free Software Foundation;
008: //
009: // This program is distributed in the hope that it will be useful,
010: // but WITHOUT ANY WARRANTY; without even the implied warranty of
011: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: // GNU General Public License for more details.
013: //
014: // You should have received a copy of the GNU General Public License
015: // along with this program; if not, write to the Free Software
016: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
017: //
018: // For more information please visit http://www.salmonllc.com
019: //** End Copyright Statement ***************************************************
020: package com.salmonllc.html.events;
021:
022: /////////////////////////
023: //$Archive: /SOFIA/SourceCode/com/salmonllc/html/events/ValidateEvent.java $
024: //$Author: Dan $
025: //$Revision: 3 $
026: //$Modtime: 2/06/03 10:40a $
027: /////////////////////////
028:
029: import com.salmonllc.html.*;
030: import com.salmonllc.sql.*;
031:
032: /**
033: * This object will be created and passed to every value changed event method.
034: * @see ValueChangedListener
035: */
036:
037: public class ValidateEvent extends java.awt.AWTEvent {
038: HtmlPage _page;
039: HtmlValidatorText _val;
040: String _name;
041: String _fullName;
042: DataStoreBuffer _ds;
043: int _row;
044:
045: public ValidateEvent(HtmlPage page, HtmlValidatorText val,
046: String name, String fullName, DataStoreBuffer ds) {
047: super (val, 0);
048: _page = page;
049: _val = val;
050: _name = name;
051: _fullName = fullName;
052: _ds = ds;
053: _row = -1;
054: }
055:
056: public ValidateEvent(HtmlPage page, HtmlValidatorText val,
057: String name, String fullName, DataStoreBuffer ds, int row) {
058: this (page, val, name, fullName, ds);
059: _row = row;
060: }
061:
062: /**
063: * This method returns the HtmlValidatorText component that the event is being fired for
064: */
065: public HtmlValidatorText getValidatorText() {
066: return _val;
067: }
068:
069: /**
070: * This method returns the data store buffer for the HtmlValidatorText
071: */
072: public DataStoreBuffer getDataStore() {
073: return _ds;
074: }
075:
076: /**
077: * This method returns the full name (name of component appended to the name of its containers) of the validation component
078: */
079: public String getFullName() {
080: return _fullName;
081: }
082:
083: /**
084: * This method returns the name of the validation component
085: */
086: public String getName() {
087: return _name;
088: }
089:
090: /**
091: * This method returns the page for which the submit was performed.
092: */
093: public HtmlPage getPage() {
094: return _page;
095: }
096:
097: /**
098: * Returns the row being validated
099: */
100: public int getRow() {
101: return _row;
102: }
103: }
|