01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets;
06:
07: import java.awt.*;
08: import java.util.*;
09: import java.io.*;
10:
11: /**
12: * STextArea defines an text area.
13: *
14: * @author Robin Sharp
15: */
16:
17: public class STextArea extends STextComponent {
18:
19: /**
20: * Creates a STextArea with the following text and columns.
21: */
22: public STextArea(String text, int rows, int columns) {
23: super (text);
24: this .rows = rows;
25: this .columns = columns;
26: }
27:
28: /**
29: * Creates a STextArea with the following text.
30: */
31: public STextArea(String text) {
32: this (text, 10, 30);
33: }
34:
35: /**
36: * Creates a STextArea with the following columns.
37: */
38: public STextArea(int rows, int columns) {
39: this (null, rows, columns);
40: }
41:
42: /**
43: * Creates a STextArea.
44: */
45: public STextArea() {
46: this (null, 10, 30);
47: }
48:
49: /**
50: * Returns the name of the L&F class that renders this component.
51: */
52: public Class getUIClass() {
53: return STextArea.class;
54: }
55:
56: /**
57: * Get the number of rows.
58: */
59: public int getRows() {
60: return rows;
61: }
62:
63: /**
64: * Set the number of rows.
65: */
66: public STextArea setRows(int rows) {
67: firePropertyChange("rows", this .rows, this .rows = rows);
68: return this ;
69: }
70:
71: /**
72: * Get the number of columns.
73: */
74: public int getColumns() {
75: return columns;
76: }
77:
78: /**
79: * Set the number of columns.
80: */
81: public STextArea setColumns(int columns) {
82: firePropertyChange("columns", this .columns,
83: this .columns = columns);
84: return this ;
85: }
86:
87: // PRIVATE /////////////////////////////////////////////////////////////
88:
89: protected int rows;
90: protected int columns;
91:
92: }
|