package commons.ui.views.other;
import java.awt.Color;
import java.awt.Component;
import javax.swing.JTextField;
import commons.ui.toolbox.GU;
public class HistoryView
{

int        SCR_W, LINE_H;
JTextField currentHistory;

public HistoryView(int width, int lineHeight)
{
   SCR_W = width;
   LINE_H = lineHeight;
}

public JTextField getView ()
{
   if (currentHistory == null) currentHistory = GU.textfield();
   GU.readonly(currentHistory);
   GU.size(currentHistory, SCR_W, LINE_H);
   currentHistory.setForeground(Color.blue);
   currentHistory.setAlignmentY(Component.RIGHT_ALIGNMENT);
   return currentHistory;
}

public void appHistoryEvent (String msg)
{
   currentHistory.setText(msg);
}
}
