01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.comp.ui;
15:
16: import org.itsnat.comp.ItsNatTextArea;
17:
18: /**
19: * Is the base interface of a text area component User Interface.
20: *
21: * <p>Current implementation of this interface only applies to <textarea>
22: * based components. The text is saved in the <code>value</code> attribute/property, when
23: * loading the document is saved too as the <textarea> content.</p>
24: *
25: * @author Jose Maria Arranz Santamaria
26: * @see ItsNatTextArea#getItsNatTextAreaUI()
27: */
28: public interface ItsNatTextAreaUI extends ItsNatTextComponentUI {
29: /**
30: * Returns the associated component object.
31: *
32: * @return the component object.
33: */
34: public ItsNatTextArea getItsNatTextArea();
35:
36: /**
37: * Returns the max number of visible columns of the text area.
38: *
39: * @return the max number of visible columns.
40: * @see #setColumns(int)
41: */
42: public int getColumns();
43:
44: /**
45: * Sets the max number of visible columns of the text area.
46: *
47: * @param cols the max number of visible columns.
48: * @see #getColumns()
49: */
50: public void setColumns(int cols);
51:
52: /**
53: * Returns the max number of visible rows of the text area.
54: *
55: * @return the max number of visible rows.
56: * @see #setRows(int)
57: */
58: public int getRows();
59:
60: /**
61: * Sets the max number of visible rows of the text area.
62: *
63: * @param rows the max number of visible rows.
64: * @see #getRows()
65: */
66: public void setRows(int rows);
67:
68: /**
69: * Informs whether the text area wraps lines.
70: *
71: * <p>Current implementation uses the <code>wrap</code> attribute
72: * of the <textarea>.</p>
73: *
74: * @return true if line wrap is enabled.
75: * @see #setLineWrap(boolean)
76: */
77: public boolean isLineWrap();
78:
79: /**
80: * Enables or disables the line wrap.
81: *
82: * <p>Current implementation uses the <code>wrap</code> attribute
83: * of the <textarea>.</p>
84: *
85: * @param wrap if true to enable the line wrap.
86: * @see #isLineWrap()
87: */
88: public void setLineWrap(boolean wrap);
89: }
|