1 /*
2 * File: IMutableContentProvider.java
3 * Copyright (c) 2004-2007 Peter Kliem (Peter.Kliem@jaret.de)
4 * A commercial license is available, see http://www.jaret.de.
5 *
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of the Common Public License v1.0
8 * which accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/cpl-v10.html
10 */
11 package de.jaret.util.ui.model;
12
13 import org.eclipse.jface.viewers.IStructuredContentProvider;
14
15 /**
16 * Extension of the org.eclipse.jface.viewers.IStructuredContentProvider interface allowing modification of the provided
17 * content.
18 *
19 * @author Peter Kliem
20 * @version $Id: IMutableContentProvider.java 242 2007-02-11 21:05:07Z olk $
21 */
22 public interface IMutableContentProvider extends IStructuredContentProvider {
23 /**
24 * Add an object to the content supplied by this ContentProvider
25 *
26 * @param o object to be added
27 */
28 public void addToDest(Object o);
29
30 /**
31 * Remove an object from the content of the ContentProvider.
32 *
33 * @param o the object to be removed from the Content
34 */
35 public void remFromDest(Object o);
36
37 /**
38 * Return true when the object is in the content.
39 *
40 * @param o Object to check
41 * @return boolean true if o is part of the content of the ContentProvider
42 */
43 public boolean contains(Object o);
44
45 /**
46 * removes all elements from the ContentProvider
47 */
48 public void clear();
49 }