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.unifiedGui.interfaces;
032:
033: import de.ug2t.kernel.*;
034:
035: /**
036: * @author Dirk
037: *
038: * date: 15.03.2004 project: WiSer-Framework
039: *
040: * <p>
041: * IUnTextArea is the common interface to a multiline text-edit-widget
042: * </p>
043: */
044: public interface IUnTextArea extends IUnInputComponent, IUnComponent,
045: IUnTextInputComponent, IUnScrollController {
046: /**
047: * @author Dirk
048: *
049: * date: 29.05.2007 project: WiSer-Framework
050: *
051: * <p>
052: * Factory is a convenience class to create components of the surrounding
053: * interface's type without taking care for the WidgetServer MultiChannel API.
054: * It's use is similar to a constructor.
055: * </p>
056: */
057: public static class Factory {
058: /**
059: * Creates a standard version of this component as described in the factory.
060: * If you create masses of components for e.g. within a renderer use
061: * <i> create(IUnApplication xAppl)</i> for performance
062: * reasons.
063: *
064: * @param xRows
065: * rows of the textarea
066: * @param xCols
067: * Columns of the textarea
068: * @return new component
069: */
070: public static IUnTextArea create(int xRows, int xCols) {
071: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
072: .pcmf_getObjByName(IUnApplication.MY_APPL);
073: return (l_appl.pcmf_getComponentFactory()
074: .pcmf_createTextBox(l_appl.pcmf_getApplType(), "",
075: xRows, xCols, "", l_appl));
076: }
077:
078: /**
079: * Creates a special version of this component as described in the factory
080: * configuration under the descriptor xFactoryDesc. If you create masses of
081: * components for e.g. within a renderer use <i>
082: * create(IUnApplication xAppl, String xFactoryDesc)</i> for performance
083: * reasons.
084: *
085: * @param xRows
086: * rows of the textarea
087: * @param xCols
088: * Columns of the textarea
089: * @param xFactoryDesc
090: * descriptor
091: * @return new component
092: */
093: public static IUnTextArea create(int xRows, int xCols,
094: String xFactoryDesc) {
095: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
096: .pcmf_getObjByName(IUnApplication.MY_APPL);
097: return (l_appl.pcmf_getComponentFactory()
098: .pcmf_createTextBoxPlugin(
099: l_appl.pcmf_getApplType(), "", xRows,
100: xCols, "", l_appl, xFactoryDesc));
101: }
102:
103: /**
104: * Creates a standard version of this component as described in the factory
105: * within the given application-context. If you create masses of components
106: * for e.g. within a renderer use this method for performance reasons.
107: *
108: * @param xRows
109: * rows of the textarea
110: * @param xCols
111: * Columns of the textarea
112: * @param xAppl
113: * application in which context the component is created
114: * @return new component
115: */
116: public static IUnTextArea create(int xRows, int xCols,
117: IUnApplication xAppl) {
118: return (xAppl.pcmf_getComponentFactory()
119: .pcmf_createTextBox(xAppl.pcmf_getApplType(), "",
120: xRows, xCols, "", xAppl));
121: }
122:
123: /**
124: * Creates a special version of this component as described in the factory
125: * configuration under the descriptor xFactoryDesc. If you create masses of
126: * components for e.g. within a renderer use this function for performance
127: * reasons.
128: *
129: * @param xRows
130: * rows of the textarea
131: * @param xCols
132: * Columns of the textarea
133: * @param xFactoryDesc
134: * descriptor
135: * @param xAppl
136: * application in which context the component is created
137: * @return new component
138: */
139: public static IUnTextArea create(int xRows, int xCols,
140: IUnApplication xAppl, String xFactoryDesc) {
141: return (xAppl.pcmf_getComponentFactory()
142: .pcmf_createTextBoxPlugin(xAppl.pcmf_getApplType(),
143: "", xRows, xCols, "", xAppl, xFactoryDesc));
144: }
145: }
146:
147: /**
148: * <p>
149: * Returns the columns of the widget
150: * </p>
151: * <p>
152: *
153: * @return number of columns in characters
154: * </p>
155: * <p>
156: * </p>
157: */
158: public int pcmf_getCols();
159:
160: /**
161: * <p>
162: * Returns the rows of the widget
163: * </p>
164: * <p>
165: *
166: * @return number of lines
167: * </p>
168: * <p>
169: * </p>
170: */
171: public int pcmf_getRows();
172: }
|