001/* ======================================================================== 002 * JCommon : a free general purpose class library for the Java(tm) platform 003 * ======================================================================== 004 * 005 * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors. 006 * 007 * Project Info: http://www.jfree.org/jcommon/index.html 008 * 009 * This library is free software; you can redistribute it and/or modify it 010 * under the terms of the GNU Lesser General Public License as published by 011 * the Free Software Foundation; either version 2.1 of the License, or 012 * (at your option) any later version. 013 * 014 * This library is distributed in the hope that it will be useful, but 015 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 016 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 017 * License for more details. 018 * 019 * You should have received a copy of the GNU Lesser General Public 020 * License along with this library; if not, write to the Free Software 021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 022 * USA. 023 * 024 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 025 * in the United States and other countries.] 026 * 027 * --------------- 028 * RootEditor.java 029 * --------------- 030 * (C) Copyright 2004, by Thomas Morgner and Contributors. 031 * 032 * Original Author: Thomas Morgner; 033 * Contributor(s): David Gilbert (for Object Refinery Limited); 034 * 035 * $Id: RootEditor.java,v 1.5 2007/11/02 17:50:37 taqua Exp $ 036 * 037 * Changes 038 * ------- 039 * 07-Jun-2004 : Added JCommon header (DG); 040 * 041 */ 042 043package org.jfree.ui.tabbedui; 044 045import java.beans.PropertyChangeListener; 046import javax.swing.JComponent; 047import javax.swing.JMenu; 048 049/** 050 * A root editor reprensents a tab in a TabbedUI. 051 * 052 * @author Thomas Morgner 053 */ 054public interface RootEditor { 055 056 /** 057 * Sets the editor active or inactive. 058 * 059 * @param b a boolean. 060 */ 061 public void setActive(boolean b); 062 063 /** 064 * Returns the active or inactive status of the editor. 065 * 066 * @return A boolean. 067 */ 068 public boolean isActive(); 069 070 /** 071 * Returns the editor name. 072 * 073 * @return The editor name. 074 */ 075 public String getEditorName(); 076 077 /** 078 * Returns the menus. 079 * 080 * @return The menus. 081 */ 082 public JMenu[] getMenus(); 083 084 /** 085 * Returns the toolbar. 086 * 087 * @return The toolbar. 088 */ 089 public JComponent getToolbar(); 090 091 /** 092 * Returns the main panel. 093 * 094 * @return The main panel. 095 */ 096 public JComponent getMainPanel(); 097 098 /** 099 * Checks, whether this root editor is enabled. 100 * 101 * @return true, if the editor is enabled, false otherwise. 102 */ 103 public boolean isEnabled(); 104 105 /** 106 * Adds a property change listener. 107 * 108 * @param property the property name. 109 * @param l the listener. 110 */ 111 public void addPropertyChangeListener(String property, PropertyChangeListener l); 112 113 /** 114 * Removes a property change listener. 115 * 116 * @param property the property name. 117 * @param l the listener. 118 */ 119 public void removePropertyChangeListener(String property, PropertyChangeListener l); 120 121 /** 122 * Adds a property change listener. 123 * 124 * @param l the listener. 125 */ 126 public void addPropertyChangeListener(PropertyChangeListener l); 127 128 /** 129 * Removes a property change listener. 130 * 131 * @param l the listener. 132 */ 133 public void removePropertyChangeListener(PropertyChangeListener l); 134 135}