本文整理汇总了Java中org.eclipse.debug.internal.ui.SWTFactory类的典型用法代码示例。如果您正苦于以下问题:Java SWTFactory类的具体用法?Java SWTFactory怎么用?Java SWTFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SWTFactory类属于org.eclipse.debug.internal.ui包,在下文中一共展示了SWTFactory类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createControls
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
private void createControls(Composite parent) {
composite = new Composite(parent, SWT.NONE);
GridData containerGridData = new GridData(GridData.FILL_HORIZONTAL);
composite.setLayoutData(containerGridData);
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
gridLayout.marginHeight = 8;
gridLayout.marginWidth = 8;
composite.setLayout(gridLayout);
// Project field
SWTFactory.createLabel(composite, "Project:", 1);
projectText = new Text(composite, SWT.BORDER);
projectText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
chooseProjectButton = new Button(composite, SWT.NONE);
chooseProjectButton.setText("Browse...");
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:18,代码来源:ProjectSelectionBlock.java
示例2: createExternalRootContentArea
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
protected Control createExternalRootContentArea(Composite parent) {
Composite c = SWTFactory.createComposite(parent, 1, 1,
GridData.FILL_HORIZONTAL);
SWTFactory.createLabel(c, "External server root:", 1);
externalUrlPrefixText = SWTFactory.createSingleText(c, 1);
externalUrlPrefixTextCache = WebAppProjectProperties.getLaunchConfigExternalUrlPrefix(project);
externalUrlPrefixText.setText(externalUrlPrefixTextCache);
externalUrlPrefixText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
externalUrlPrefixTextCache = externalUrlPrefixText.getText();
updateUrlLabelText();
}
});
return c;
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:18,代码来源:WebAppHostPageSelectionDialog.java
示例3: createControl
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
public void createControl(Composite parent) {
Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.FILL_BOTH);
((GridLayout)comp.getLayout()).verticalSpacing = 0;
createProjectEditor(comp);
createVerticalSpacer(comp, 1);
createMainTypeEditor(comp, LauncherMessages.JavaMainTab_Main_cla_ss__4);
setControl(comp);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);
}
开发者ID:thahn0720,项目名称:agui_eclipse_plugin,代码行数:10,代码来源:AguiMainTab.java
示例4: createMainTypeExtensions
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
/**
* @see org.eclipse.jdt.internal.debug.ui.launcher.SharedJavaMainTab#createMainTypeExtensions(org.eclipse.swt.widgets.Composite)
*/
@Override
protected void createMainTypeExtensions(Composite parent) {
fSearchExternalJarsCheckButton = SWTFactory.createCheckButton(parent, LauncherMessages.JavaMainTab_E_xt__jars_6, null, false, 2);
fSearchExternalJarsCheckButton.addSelectionListener(getDefaultListener());
fConsiderInheritedMainButton = SWTFactory.createCheckButton(parent, LauncherMessages.JavaMainTab_22, null, false, 2);
fConsiderInheritedMainButton.addSelectionListener(getDefaultListener());
fStopInMainCheckButton = SWTFactory.createCheckButton(parent, LauncherMessages.JavaMainTab_St_op_in_main_1, null, false, 1);
fStopInMainCheckButton.addSelectionListener(getDefaultListener());
}
开发者ID:thahn0720,项目名称:agui_eclipse_plugin,代码行数:15,代码来源:AguiMainTab.java
示例5: createDialogArea
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite dialogArea = (Composite) super.createDialogArea(parent);
Composite composite = SWTFactory.createComposite(dialogArea, 3, 1,
GridData.FILL_HORIZONTAL);
SWTFactory.createLabel(composite, "Name", 1);
nameText = new Text(composite, SWT.BORDER);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.widthHint = 250;
nameText.setLayoutData(gridData);
new Label(composite, SWT.NONE);
nameText.setText(defaultBrowserName);
nameText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
validate();
}
});
browserLocationBlock.createContents(composite, true);
if (note != null) {
SWTFactory.createVerticalSpacer(composite, 1);
SWTFactory.createLabel(composite, note, 3);
}
if (!StringUtilities.isEmpty(defaultBrowserName)) {
// The browser name has a default value in it, switch focus to something
// that does not
browserLocationBlock.setFocus();
}
return composite;
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:36,代码来源:AddBrowserDialog.java
示例6: createControls
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
private void createControls(Composite parent, boolean showLabel) {
if (showLabel) {
SWTFactory.createLabel(parent, label, 1);
}
text = new Text(parent, SWT.BORDER);
GridData layoutData = new GridData(GridData.FILL_HORIZONTAL);
if (!showLabel) {
layoutData.horizontalSpan = 2;
}
text.setLayoutData(layoutData);
button = SWTFactory.createPushButton(parent, buttonLabel, null);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:15,代码来源:TextSelectionBlock.java
示例7: createDialogArea
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
SWTFactory.createVerticalSpacer(parent, 16);
if (isExternal) {
createExternalUI(parent);
}
fileSelectionGroup = new Group(parent, SWT.SHADOW_ETCHED_IN);
GridData gd = new GridData(GridData.FILL_BOTH);
fileSelectionGroup.setLayoutData(gd);
GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.marginWidth = 0;
layout.marginHeight = 0;
fileSelectionGroup.setLayout(layout);
Control controlToReturn = super.createDialogArea(fileSelectionGroup);
SWTFactory.createVerticalSpacer(parent, 8);
Composite urlComposite = new Composite(parent, SWT.NONE);
urlComposite.setLayout(layout);
urlComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
new Label(urlComposite, SWT.NONE).setText(URL_LABEL_TEXT);
gd = new GridData(GridData.FILL_HORIZONTAL);
Group urlGroup = new Group(urlComposite, SWT.SHADOW_ETCHED_IN);
urlGroup.setLayoutData(gd);
urlGroup.setLayout(layout);
gd = new GridData(GridData.FILL_BOTH);
urlLabel = new Label(urlGroup, SWT.NONE);
urlLabel.setLayoutData(gd);
return controlToReturn;
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:38,代码来源:WebAppHostPageSelectionDialog.java
示例8: createExternalUI
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
protected void createExternalUI(Composite parent) {
createExternalRootContentArea(parent);
SWTFactory.createVerticalSpacer(parent, 16);
useProjectFileCheckbox = new Button(parent, SWT.CHECK);
useProjectFileCheckbox.setText("Select an HTML page:");
useProjectFileCheckbox.setSelection(true);
useProjectFileCheckbox.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
boolean enabled = useProjectFileCheckbox.getSelection();
useFile = enabled;
SWTUtilities.setEnabledRecursive(fileSelectionGroup, enabled);
if (enabled) {
updateStatus(oldStatus);
} else {
// save the current status so that if the user re-enables the file
// selector,
// if it was in a bad state (ie, no selection), that state is
// restored.
if (status != null) {
oldStatus = status;
} else {
oldStatus = OK_STATUS;
}
// it's ok to blast the current state because it doesn't depend on
// anything new added to the UI (specifically, the external server
// text)
updateStatus(OK_STATUS);
}
updateUrlLabelText();
}
});
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:37,代码来源:WebAppHostPageSelectionDialog.java
示例9: createControl
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
@Override
public void createControl(final Composite parent) {
final Composite projComp = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.FILL_BOTH);
((GridLayout) projComp.getLayout()).verticalSpacing = 0;
this.createProjectEditor(projComp);
this.createRepositoryEditor(projComp);
this.createVerticalSpacer(projComp, 1);
this.setControl(projComp);
}
开发者ID:Beagle-PSE,项目名称:Beagle,代码行数:11,代码来源:ProjectTab.java
示例10: createControl
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
public final void createControl(Composite parent) {
Composite panel = new Composite(parent, SWT.NONE);
final GridLayout gridLayout = new GridLayout();
gridLayout.marginWidth = 10;
gridLayout.marginHeight = 10;
panel.setLayout(gridLayout);
panel.setFont(parent.getFont());
panel.setLayoutData(new GridData(GridData.FILL_BOTH));
Group group = SWTFactory.createGroup(panel, this.getTitle(), 1, 1,
GridData.FILL_HORIZONTAL);
sdkSelectionBlock = new ClasspathContainerPageSdkSelectionBlock<T>(group,
SWT.NONE) {
@Override
protected void doConfigure() {
if (Window.OK == PreferencesUtil.createPreferenceDialogOn(getShell(),
sdkPreferencePageID, new String[] {sdkPreferencePageID}, null).open()) {
SdkClasspathContainerPage.this.validateJavaProjectAndSelectedSdk();
}
}
@Override
protected T doGetDefaultSdk() {
return sdkManager.findSdkForPath(SdkClasspathContainer.computeDefaultContainerPath(containerID));
}
@Override
protected List<T> doGetSpecificSdks() {
return new ArrayList<T>(sdkManager.getSdks());
}
};
sdkSelectionBlock.addSdkSelectionListener(new SdkSelectionBlock.SdkSelectionListener() {
public void onSdkSelection(SdkSelectionEvent e) {
validateJavaProjectAndSelectedSdk();
}
});
setControl(panel);
// Need to set the title and message from here to correctly initialize
setTitle(getTitle());
setMessage("Select an SDK to add to the classpath.");
int selection = -1;
if (containerEntry != null
&& !SdkClasspathContainer.isDefaultContainerPath(containerID,
containerEntry.getPath())) {
T sdkForPath = sdkManager.findSdkForPath(containerEntry.getPath());
if (sdkForPath != null) {
selection = new ArrayList<T>(sdkManager.getSdks()).indexOf(sdkForPath);
}
}
sdkSelectionBlock.setSelection(selection);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:58,代码来源:SdkClasspathContainerPage.java
示例11: createDialogElements
import org.eclipse.debug.internal.ui.SWTFactory; //导入依赖的package包/类
@Override
protected DevToolsElements createDialogElements(Composite composite,
final Runnable modifyListener, PreferenceStore store) {
final TabElements basicElements =
createBasicTabElements(composite, modifyListener, store, getParams());
RadioButtonsLogic.Listener radioButtonsListener =
new RadioButtonsLogic.Listener() {
public void selectionChanged() {
modifyListener.run();
}
};
final RadioButtonsLogic<Integer> breakpointRadioButtons;
{
Group breakpointGroup = new Group(composite, 0);
breakpointGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
breakpointGroup.setText(Messages.ChromiumRemoteTab_BREAKPOINT_GROUP);
breakpointGroup.setLayout(new GridLayout(1, false));
Map<Integer, Button> buttonMap = new LinkedHashMap<Integer, Button>(3);
for (LaunchParams.BreakpointOption option : LaunchParams.BREAKPOINT_OPTIONS) {
Button button = new Button(breakpointGroup, SWT.RADIO);
button.setFont(composite.getFont());
button.setText(option.getLabel());
GridData gd = new GridData();
button.setLayoutData(gd);
SWTFactory.setButtonDimensionHint(button);
int index = buttonMap.size();
buttonMap.put(index, button);
}
breakpointRadioButtons =
new RadioButtonsLogic<Integer>(buttonMap, radioButtonsListener);
}
return new DevToolsElements() {
@Override
public RadioButtonsLogic<Integer> getBreakpointRadioButtons() {
return breakpointRadioButtons;
}
@Override
public TabElements getBase() {
return basicElements;
}
};
}
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:49,代码来源:ChromiumRemoteTab.java
注:本文中的org.eclipse.debug.internal.ui.SWTFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论