File: AfficheurJTASwing.java

package info (click to toggle)
natbraille 2.0rc3-15
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 7,084 kB
  • sloc: java: 31,266; xml: 7,747; sh: 165; haskell: 50; makefile: 32
file content (56 lines) | stat: -rw-r--r-- 1,823 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * NAT - An universal Translator
 * Copyright (C) 2005 Bruno Mascret
 * Contact: bmascret@free.fr
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
package ui;

import gestionnaires.Afficheur;

import javax.swing.JTextArea;

/**
 * Afficheur de message des Gestionnaires d'erreur en mode Swing (graphique)
 * <p>Hérite de JTextArea comme conteneur de base</p>
 * @author bruno
 *
 */
public class AfficheurJTASwing extends JTextArea implements Afficheur
{

	/** defaut serial version uid, non utilisé */
	private static final long serialVersionUID = 1L;
	/** 
	 * Constructeur
	 * @param i nombre de lignes du JTextArea
	 * @param j nombre de colonnes du JTextArea
	 */
	public AfficheurJTASwing(int i, int j) {super(i,j);}
	/**
	 * Redéfinition de gestionnaires.Afficheur#afficheMessage(java.lang.String)
	 * <p>Affiche le message <code>message</code> à la suite du texte déjà présent
	 * dans l'instance</p>
	 * @see gestionnaires.Afficheur#afficheMessage(java.lang.String)
	 */
	public void afficheMessage(String message)
	{
		setText(getText() + message);
		setCaretPosition(getText().length());
	   // paintImmediately(new Rectangle(0,0,getWidth(),getHeight()));
	}

}