/*
* (c) Copyright 2010-2011 AgileBirds
*
* This file is part of OpenFlexo.
*
* OpenFlexo 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 3 of the License, or
* (at your option) any later version.
*
* OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.openflexo.jedit;
public class TestJEdit {
/*
public static void main(String[] args)
{
try {
File file = new FileResource("TestJEdit/TestJavaFile.java");
final JDialog dialog = new JDialog((Frame)null,true);
JButton closeButton = new JButton("Close");
closeButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dialog.dispose();
System.exit(0);
}
});
JPanel controlPanel = new JPanel(new FlowLayout());
controlPanel.add(closeButton);
JPanel panel = new JPanel(new BorderLayout());
JEditTextArea editorPane = new JEditTextArea();
editorPane.setEditable(true);
editorPane.setTokenMarker(new JavaTokenMarker());
editorPane.setText(FileUtils.fileContents(file));
editorPane.setFont(new Font("Verdana",Font.PLAIN,11));
panel.add(editorPane,BorderLayout.CENTER);
panel.add(controlPanel,BorderLayout.SOUTH);
dialog.setPreferredSize(new Dimension(1000,800));
dialog.getContentPane().add(panel);
dialog.validate();
dialog.pack();
dialog.setVisible(true);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}*/
}