01: /*******************************************************************************
02: * Copyright (c) 2004, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.presentations.util;
11:
12: import org.eclipse.ui.IMemento;
13: import org.eclipse.ui.presentations.IPresentablePart;
14: import org.eclipse.ui.presentations.IPresentationSerializer;
15:
16: /**
17: * @since 3.0
18: */
19: public abstract class TabOrder {
20: /**
21: * Adds a part due to a user action that opened a part
22: *
23: * @param newPart part being added
24: */
25: public abstract void add(IPresentablePart newPart);
26:
27: /**
28: * Adds a part at initialization-time (the part was added as
29: * part of a perspective, rather than by a user action)
30: *
31: * @param newPart the part being added
32: */
33: public abstract void addInitial(IPresentablePart newPart);
34:
35: public abstract void restoreState(
36: IPresentationSerializer serializer, IMemento savedState);
37:
38: public abstract void saveState(IPresentationSerializer serializer,
39: IMemento memento);
40:
41: /**
42: * Adds a part at a particular index due to a drag/drop operation.
43: *
44: * @param added part being added
45: * @param index index where the part is added at
46: */
47: public abstract void insert(IPresentablePart added, int index);
48:
49: public abstract void move(IPresentablePart toMove, int newIndex);
50:
51: /**
52: * Removes a part
53: *
54: * @param removed part being removed
55: */
56: public abstract void remove(IPresentablePart removed);
57:
58: /**
59: * Selects a part
60: *
61: * @param selected part being selected
62: */
63: public abstract void select(IPresentablePart selected);
64:
65: public abstract IPresentablePart[] getPartList();
66: }
|