package com.fr.design.data.tabledata.tabledatapane;

import com.fr.design.data.datapane.sqlpane.SQLEditPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants;
import com.fr.design.dialog.BasicPane;

import java.awt.*;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-6-7
 * Time: 下午4:31
 * To change this template use File | Settings | File Templates.
 */
public class FormatExplanationPane extends BasicPane {
	private String title;

    public FormatExplanationPane(String title, String content, float fontSize) {
    	this.title = title;
        this.setLayout(new BorderLayout());
        SQLEditPane explanation = new SQLEditPane();
        explanation.setText(content);
        explanation.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE);
        explanation.setEditable(false);
        explanation.setFont(explanation.getFont().deriveFont(fontSize));
        add(new UIScrollPane(explanation));
    }
    protected String title4PopupWindow() {
        return title;
    }
}