Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2006, 2008 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.pde.internal.ua.ui.wizards.cheatsheet;
 
 import  org.eclipse.swt.SWT;
 import  org.eclipse.swt.layout.GridData;
 import  org.eclipse.swt.layout.GridLayout;
 import  org.eclipse.swt.widgets.*;
NewCategoryNameDialog
 
 public class NewCategoryNameDialog extends TrayDialog {
 
 	private Text fNameText;
 
 	private String fNameTextValue;

Parameters:
shell
 
 	public NewCategoryNameDialog(Shell shell) {
 		super(shell);
 
 		 = null;
 		 = null;
 	}
 
 	/*
 	 * @see org.eclipse.jface.window.Window#configureShell(Shell)
 	 */
 	protected void configureShell(Shell shell) {
 		super.configureShell(shell);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 	 */
 	protected Control createDialogArea(Composite parent) {
 
 		Composite composite = createUI(parent);
 
 		return composite;
 	}

Parameters:
parent
 
 	private Composite createUI(Composite parent) {
 		// Create the container
 		Composite container = createUIContainer(parent);
 		// Create the instructional label
 		// Create the name field
 		createUINameField(container);
 		// Apply the default font to the dialog
 		applyDialogFont(container);
 
 		return container;
 	}

 
 	private void createListeners() {
 		// NO-OP	
 	}

 
 	private void updateUI() {
 		// NO-OP
 	}

Parameters:
parent
Returns:
 
 	private Composite createUIContainer(Composite parent) {
 		Composite composite = new Composite(parent, SWT.NONE);
 		GridLayout layout = new GridLayout(2, false);
		composite.setLayout(layout);
		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
		return composite;
	}

Parameters:
container
	private void createUIInstructionLabel(Composite container) {
		Label label = new Label(container, SWT.WRAP);
		GridData data = new GridData(GridData.FILL_HORIZONTAL);
		data.horizontalSpan = 2;
		data.widthHint = 200;
		label.setLayoutData(data);
	}

Parameters:
parent
	private void createUINameField(Composite parent) {
		// Create the label
		// Create the text widget
	}

Parameters:
parent
	private void createUINameLabel(Composite parent) {
		Label label = new Label(parent, SWT.NONE);
	}

Parameters:
parent
	private void createUINameText(Composite parent) {
		int style = SWT.BORDER;
		 = new Text(parentstyle);
		.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
	 */
	protected void okPressed() {
		// This is needed because the widget is disposed before after okay is
		// pressed before the value can be retrieved
		super.okPressed();
	}

Returns:
	public String getNameText() {
	}
New to GrepCode? Check out our FAQ X