1 package main;
2
3 import intellego.Intellego;
4 import util.*;
5 import interfaces.*;
6 import real.*;
7
8 import java.awt.*;
9 import java.lang.*;
10 import java.awt.event.*;
11 import javax.swing.*;
12 import java.io.*;
13 import java.net.*;
14
15
20 public class ExternalMessager extends JInternalFrame
21 {
22
23 private JEditorPane messagePane;
24 static final int xOffset = 30, yOffset = 30;
25 static int openFrameCount = 0;
26
27
30 public ExternalMessager(int num)
31 {
32 super("",true,true,true,true);
34
35 if(num ==0)this.setTitle("Compile Status Window:");
36 else if(num ==1) this.setTitle("Upload Status Window:");
37 else if(num ==3) this.setTitle("Upload Firmware Status Window:");
38
39 openFrameCount++;
40
41 messagePane=new JEditorPane();
43 messagePane.setBackground(Color.darkGray);
44 messagePane.setForeground(Color.yellow);
45 messagePane.setVisible(true);
46 messagePane.setEditable(false);
47
48 JScrollPane messageScrollPane = new JScrollPane(messagePane);
50 messageScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
51 messageScrollPane.setPreferredSize(new Dimension(400,600));
52 messageScrollPane.setMinimumSize(new Dimension(10, 10));
53 (messageScrollPane.getVerticalScrollBar()).setBackground(Color.darkGray);
54 (messageScrollPane.getHorizontalScrollBar()).setBackground(Color.darkGray);
55 (messageScrollPane.getViewport()).setBackground(Color.darkGray);
56
57 JPanel contentPane = new JPanel();
59 BoxLayout box = new BoxLayout(contentPane, BoxLayout.X_AXIS);
60 contentPane.setLayout(box);
61 contentPane.add(messageScrollPane);
62 setContentPane(contentPane);
63
64 setSize(500,300);
66
67 setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
69 }
70
71
76 public void append(String text)
77 {
78 messagePane.setText(messagePane.getText()+text);
79 }
80
81
84 public boolean successfullCompile(){
85 if(messagePane.getText().equals(""))
86 {
87 return true;
88 }
89 else
90 {
91 return false;
92 }
93
94
95 }
96 }
97