IConfigurationTree.java from PovClipse at Krugle
Show IConfigurationTree.java syntax highlighted
/*
* PovClipse - Eclipse plugin for editing and rendering Povray sceene files.
* Copyright (C) 2006-2007 Wolfgang Moestl wmoestl@web.de
*
* 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 (at your option) 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package com.wm.povclipse.actionsets.render.settings.tree;
import org.eclipse.swt.widgets.TreeItem;
import com.wm.povclipse.actionsets.render.RenderConfiguration;
/**
* Interface for widgets handling render configuration trees.
*
* @author Wolfgang Möstl
*/
public interface IConfigurationTree {
/**
* Gets the selected item.
* @return The selected <code>TreeItem</code> or <code>NULL</code>
* if no item is selected.
*/
public TreeItem getSelectedItem();
/**
* Selects the <code>TreeItem</code> displaying the given
* <code>RenderConfiguration</code>.
* @param renderConfig The <code>RenderConfiguration</code> to be looked for.
*/
public void selectItem(RenderConfiguration renderConfig);
/**
* Adds a new <code>TreeItem</code> displaying the given
* <code>RenderConfiguration</code> and returns it.
* @param renderConfig The <code>RenderConfiguration</code> to be displayed.
* @return The new generated <code>TreeItem</code>.
*/
public TreeItem addItem(RenderConfiguration renderConfig);
/**
* Removes a specific <code>TreeItem</code>.
* @param item The <code>TreeItem</code> to be removed.
*/
public void removeItem(TreeItem item);
/**
* @return <code>true</code> if the tree is used for managing render configuration templates,
* <code>false</code> if it manages regular render configurations.
*/
public boolean isTemplateTree();
/**
* Sets the <code>TreeItem</code> forground text color.<br>
* If <code>isValid</code> is <code>true</code> <code>black</code> will
* be used, otherwise red.
* @param item The <code>TreeItem</code> to be colored.
* @param isValid <code>true</code> to use black, <code>false</code> to use red.
*/
public void setItemColor(TreeItem item, boolean isValid);
/**
* Reloads the full tree content.
*/
public void reload();
/**
* Enables or disables menu entries depending on the selection state.
* @param enabled <code>true</code> to enable the "Delete" and "Duplicate" menu items.
*/
public void setPopupMenuConfigEnabled(boolean enabled);
/**
* Gets the <code>TreeItem</code> displaying the given <code>RenderConfiguration</code>.
* @param renderConfig The <code>RenderConfiguration</code> to be searched for.
* @return The <code>TreeItem</code> displaying the given <code>RenderConfiguration</code>
* or <code>null</code> if none can be found.
*/
public TreeItem getItemByRenderConfiguration(RenderConfiguration renderConfig);
}
See more files for this project here