001 // GraphLab Project: http://graphlab.sharif.edu 002 // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology 003 // Distributed under the terms of the GNU General Public License (GPL): http://www.gnu.org/licenses/ 004 005 package graphlab.samples.ui.texteditor.myplugin.actions; 006 007 import graphlab.platform.core.BlackBoard; 008 import graphlab.ui.UIUtils; 009 010 import javax.swing.*; 011 012 public class Utils { 013 public static JTextArea getMainEditor(BlackBoard blackBoard) { 014 JScrollPane editor = (JScrollPane) UIUtils.getComponent(blackBoard, "body editor"); 015 return (JTextArea) editor.getViewport().getView(); 016 } 017 018 }