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.swt.graphics.Image;
13: import org.eclipse.ui.internal.util.Util;
14: import org.eclipse.ui.presentations.IPresentablePart;
15:
16: /**
17: * @since 3.1
18: */
19: public final class PartInfo {
20: public String name;
21: public String title;
22: public String contentDescription;
23: public String toolTip;
24: public Image image;
25: public boolean dirty;
26:
27: public PartInfo() {
28: name = Util.ZERO_LENGTH_STRING;
29: title = Util.ZERO_LENGTH_STRING;
30: contentDescription = Util.ZERO_LENGTH_STRING;
31: toolTip = Util.ZERO_LENGTH_STRING;
32: image = null;
33: }
34:
35: public PartInfo(IPresentablePart part) {
36: set(part);
37: }
38:
39: public void set(IPresentablePart part) {
40: name = part.getName();
41: title = part.getTitle();
42: contentDescription = part.getTitleStatus();
43: image = part.getTitleImage();
44: toolTip = part.getTitleToolTip();
45: dirty = part.isDirty();
46: }
47: }
|