1 14 package org.wings; 15 16 import org.wings.plaf.TextAreaCG; 17 18 22 public class STextArea extends STextComponent { 23 24 27 public final static int NO_WRAP = 0; 28 31 public final static int VIRTUAL_WRAP = 1; 32 35 public final static int PHYSICAL_WRAP = 2; 36 37 private int rows = 5; 38 39 private int columns = 20; 40 41 46 private int lineWrap = VIRTUAL_WRAP; 47 48 49 public STextArea(String text) { 50 super(text); 51 } 52 53 54 public STextArea() { 55 super(); 56 } 57 58 59 public void setRows(int r) { 60 int oldRows = rows; 61 rows = r; 62 if (oldRows != rows) 63 reload(); 64 } 65 66 67 public int getRows() { 68 return rows; 69 } 70 71 72 public void setColumns(int c) { 73 int oldColumns = columns; 74 columns = c; 75 if (columns != oldColumns) 76 reload(); 77 } 78 79 80 public int getColumns() { 81 return columns; 82 } 83 84 88 public void setLineWrap(int lw) { 89 if (lw >= 0 && lw < 3) 90 lineWrap = lw; 91 } 92 93 94 public int getLineWrap() { 95 return lineWrap; 96 } 97 98 public void setCG(TextAreaCG cg) { 99 super.setCG(cg); 100 } 101 } 102 103 104 | Popular Tags |