e.g. Calendar Search Help
You must enter a value before pressing Search
jmeter

Class: org.apache.jmeter.gui.util.TextAreaCellRenderer   ©

 OK to copy?
01 // $Header: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/gui/util/TextAreaCellRenderer.java,v 1.3 2004/02/14 03:34:29 sebb Exp $
02 /*
03  * Copyright 2001-2004 The Apache Software Foundation.
04  *
05  * Licensed under the Apache License, Version 2.0 (the "License");
06  * you may not use this file except in compliance with the License.
07  * You may obtain a copy of the License at
08  *
09  *   http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * 
17 */
18 
19 package org.apache.jmeter.gui.util;
20 
21 import java.awt.Component;
22 
23 import javax.swing.JTable;
24 import javax.swing.JTextArea;
25 import javax.swing.table.TableCellRenderer;
26 
27 /**
28  * @author mstover
29  * @version $Revision: 1.3 $
30  */
31 public class TextAreaCellRenderer implements TableCellRenderer
32 {
33 
34     private JTextArea rend = new JTextArea("");
35 
36     public Component getTableCellRendererComponent(
37         JTable arg0,
38         Object arg1,
39         boolean arg2,
40         boolean arg3,
41         int arg4,
42         int arg5)
43     {
44         rend = new JTextArea(arg1.toString());
45         rend.revalidate();
46         if (!arg3 && !arg2)
47         {
48             rend.setBackground(JMeterColor.LAVENDER);
49         }
50         if (arg0.getRowHeight(arg4) < getPreferredHeight())
51         {
Rate52             arg0.setRowHeight(arg4, getPreferredHeight());
53         }
54         return rend;
55     }
56 
57     public int getPreferredHeight()
58     {
59         return rend.getPreferredSize().height + 5;
60     }
61 }

            
All Examples in File:
Example
Line
Rating (found
useful by...)
52 0% of 0