1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
/*******************************************************************************
* Copyright (c) 2006, 2007 Oracle. 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: Oracle. - initial API and implementation
*******************************************************************************/
package org.eclipse.jpt.ui.internal.xml.details;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.jpt.ui.internal.mappings.details.StringWithDefaultChooser;
import org.eclipse.jpt.ui.internal.xml.JptUiXmlMessages;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
public class CommonWidgets
{
public static Label buildJavaClassLabel(Composite parent, TabbedPropertySheetWidgetFactory widgetFactory) {
Label label = widgetFactory.createLabel(parent, JptUiXmlMessages.PersistentTypePage_javaClassLabel);
return label;
}
public static XmlJavaClassChooser buildJavaClassChooser(
Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
return new XmlJavaClassChooser(parent, commandStack, widgetFactory);
}
public static Label buildJavaAttributeNameLabel(Composite parent, TabbedPropertySheetWidgetFactory widgetFactory) {
Label label = widgetFactory.createLabel(parent, JptUiXmlMessages.PersistentAttributePage_javaAttributeLabel);
return label;
}
public static XmlJavaAttributeChooser buildJavaAttributeChooser(
Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
return new XmlJavaAttributeChooser(parent, commandStack, widgetFactory);
}
public static Label buildAccessLabel(Composite parent, TabbedPropertySheetWidgetFactory widgetFactory) {
return widgetFactory.createLabel(parent, JptUiXmlMessages.PersistentTypePage_AccessLabel);
}
public static AccessTypeComboViewer buildAccessTypeComboViewer(
Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
return new AccessTypeComboViewer(parent, commandStack, widgetFactory);
}
public static Label buildCatalogLabel(Composite parent, TabbedPropertySheetWidgetFactory widgetFactory) {
return widgetFactory.createLabel(parent, JptUiXmlMessages.XmlCatalogChooser_CatalogChooser);
}
public static StringWithDefaultChooser buildCatalogChooser(
Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
return new StringWithDefaultChooser(parent, commandStack, widgetFactory);
}
public static Label buildSchemaLabel(Composite parent, TabbedPropertySheetWidgetFactory widgetFactory) {
return widgetFactory.createLabel(parent, JptUiXmlMessages.XmlSchemaChooser_SchemaChooser);
}
public static StringWithDefaultChooser buildSchemaChooser(
Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
return new StringWithDefaultChooser(parent, commandStack, widgetFactory);
}
public static Label buildPackageLabel(Composite parent, TabbedPropertySheetWidgetFactory widgetFactory) {
return widgetFactory.createLabel(parent, "Package:");
}
public static XmlPackageChooser buildXmlPackageChooser(
Composite parent, CommandStack commandStack, TabbedPropertySheetWidgetFactory widgetFactory) {
return new XmlPackageChooser(parent, commandStack, widgetFactory);
}
}
|