001: // @@
002: // @@
003: /*
004: * Wi.Ser Framework
005: *
006: * Version: 1.8.1, 20-September-2007
007: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library located in LGPL.txt in the
021: * license directory; if not, write to the
022: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
023: * Boston, MA 02111-1307, USA.
024: *
025: * If this agreement does not cover your requirements, please contact us
026: * via email to get detailed information about the commercial license
027: * or our service offerings!
028: *
029: */
030: // @@
031: package de.ug2t.model;
032:
033: import java.util.*;
034:
035: import de.ug2t.unifiedGui.*;
036:
037: public class MoMappingErrorHandler implements IMoMappingErrorHandler {
038: private UnComponent pem_txtWin = null;
039: private boolean pem_useTooltip = false;
040:
041: /**
042: *
043: */
044: public MoMappingErrorHandler(UnComponent xTxtWin) {
045: this .pem_txtWin = xTxtWin;
046:
047: return;
048: }
049:
050: public MoMappingErrorHandler(boolean xUseTooltip) {
051: this .pem_useTooltip = xUseTooltip;
052:
053: return;
054: }
055:
056: /**
057: *
058: */
059: public MoMappingErrorHandler() {
060: return;
061: }
062:
063: /**
064: * <p>
065: * Does...
066: * </p>
067: * <p>
068: *
069: * @return a Type with
070: * </p>
071: * <p>
072: * @param
073: * </p>
074: */
075: public boolean pcmf_setUiElemet2Error(UnComponent xValues) {
076: xValues.pcmf_setBgColor("red");
077: return (true);
078: }
079:
080: /**
081: * <p>
082: * Does...
083: * </p>
084: * <p>
085: *
086: * @return a Type with
087: * </p>
088: * <p>
089: * @param
090: * </p>
091: */
092: public Vector pcmf_setUiElemets2Error(Vector xValues) {
093: Iterator l_it = xValues.iterator();
094: while (l_it.hasNext())
095: this .pcmf_setUiElemet2Error((UnComponent) l_it.next());
096:
097: return (xValues);
098: }
099:
100: /**
101: * <p>
102: * Does...
103: * </p>
104: * <p>
105: *
106: * @return a Type with
107: * </p>
108: * <p>
109: * @param
110: * </p>
111: */
112: public boolean pcmf_setUiElemet2Error(UnComponent xValues,
113: String xMessage) {
114: this .pcmf_setUiElemet2Error(xValues);
115: if (this .pem_txtWin != null)
116: this .pem_txtWin.pcmf_setValue(xMessage);
117: else if (this .pem_useTooltip)
118: xValues.pcmf_setToolTip(xMessage);
119:
120: return (true);
121: }
122: }
|