Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUCopyrightPropertyPage.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUCopyrightPropertyPage.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUCopyrightPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUCopyrightPropertyPage.java
new file mode 100644
index 000000000..248ed1d20
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUCopyrightPropertyPage.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.IUPropertyPage;
+import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * PropertyPage that shows an IU's properties
+ *
+ * @since 3.4
+ */
+public class IUCopyrightPropertyPage extends IUPropertyPage {
+
+ protected Control createIUPage(Composite parent, IInstallableUnit iu) {
+ String copyrightText = iu.getProperty(IInstallableUnit.PROP_COPYRIGHT);
+ if (copyrightText != null && copyrightText.length() > 0) {
+ Text text = new Text(parent, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
+ gd.widthHint = computeWidthLimit(text, 80);
+ text.setLayoutData(gd);
+ text.setText(copyrightText);
+ text.setEditable(false);
+ return text;
+ }
+ Label label = new Label(parent, SWT.NULL);
+ label.setText(ProvUIMessages.IUCopyrightPropertyPage_NoCopyright);
+ return label;
+
+ }
+}

Back to the top