⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pluginoptionsdialogpanel.java

📁 具有不同语法高亮的编辑器实例
💻 JAVA
字号:
/*
 * 04/28/2005
 *
 * PluginOptionsDialogPanel.java - An options panel for a plugin.
 * Copyright (C) 2005 Robert Futrell
 * email@address.com
 * www.website.com
 *
 * This program 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 2
 * of the License, or any later version.
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package org.fife.ui.app;

import javax.swing.Icon;

import org.fife.ui.OptionsDialogPanel;


/**
 * Options panel specifically for a plugin.  This subclass is aware of the
 * plugin it represents, and can update it with its values.
 *
 * @author Robert Futrell
 * @version 0.5
 */
public abstract class PluginOptionsDialogPanel extends OptionsDialogPanel {

	private Plugin plugin;


/*****************************************************************************/


	/**
	 * Constructor.
	 *
	 * @param plugin The plugin whose options we're displaying.
	 */
	public PluginOptionsDialogPanel(Plugin plugin) {
		this(null, plugin);
	}


/*****************************************************************************/


	/**
	 * Constructor.
	 *
	 * @param name The name of the panel.
	 * @param plugin The plugin whose options we're displaying.
	 */
	public PluginOptionsDialogPanel(String name, Plugin plugin) {
		super(name);
		this.plugin = plugin;
	}


/*****************************************************************************/


	/**
	 * Returns the icon to display for this options panel, if any.
	 *
	 * @return The icon for this options dialog panel, if any.
	 */
	public Icon getIcon() {
		return getPlugin().getIcon();
	}


/*****************************************************************************/


	/**
	 * Returns the plugin we're representing.
	 *
	 * @return The plugin.
	 */
	public Plugin getPlugin() {
		return plugin;
	}


/*****************************************************************************/


	/**
	 * Updates this panel's displayed parameter values to reflect those of
	 * the plugin.
	 *
	 * @see #updatePlugin
	 */
	public abstract void updateGUI();


/*****************************************************************************/


	/**
	 * Updates the plugin's parameters to reflect those in this options
	 * panel.
	 *
	 * @see #updateGUI
	 */
	public abstract void updatePlugin();


/*****************************************************************************/

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -