summaryrefslogtreecommitdiffstats
path: root/src/cppcheckplus/text/MyTextPanel1.java
blob: 4a70ce5ad084af8a6db206449661b0f4e51bf3bf (plain) (blame)
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
57
58
package cppcheckplus.text;

import java.awt.BorderLayout;
import java.awt.TextArea;

import javax.swing.JPanel;

import cppcheckplus.control.XChartletFullScreenListenter;



public class MyTextPanel1 extends JPanel implements XChartletFullScreenListenter
{
	private BorderLayout layout;
	private boolean isFullScreen;
	private TextArea textArea;
	
	public TextArea getTextArea() {
		return textArea;
	}
	public void setTextArea(TextArea textArea) {
		this.textArea = textArea;
	}
	
	public MyTextPanel1() 
	{
		layout = new BorderLayout();
		setLayout(layout);
		textArea=new TextArea("");   
		
		add(textArea);
	}
	
	public void initialize()
	{
		setLayout(layout);
		add(textArea);
	}


	@Override
	public void fullScreen(JPanel chartPanellet)
	{
		removeAll();
		isFullScreen = !isFullScreen;
		if (isFullScreen)
		{
			setLayout(new BorderLayout());
			add(chartPanellet, "Center");
		} else
		{
			initialize();
		}
		repaint();
		revalidate();
	}

}