[jboss-cvs] jbosside/core/plugins/org.jboss.ide.eclipse.packages.ui/src/main/org/jboss/ide/eclipse/packages/ui/util ...

Marshall Culpepper mculpepper at jboss.com
Wed Feb 21 15:53:42 EST 2007


  User: mculpepper
  Date: 07/02/21 15:53:42

  Modified:    core/plugins/org.jboss.ide.eclipse.packages.ui/src/main/org/jboss/ide/eclipse/packages/ui/util  
                        PackageDestinationComposite.java
                        PackageNodeDestinationComposite.java
  Log:
  destination in the package wizard now shows as much data as possible [JBIDE-446]
  
  Revision  Changes    Path
  1.5       +7 -1      jbosside/core/plugins/org.jboss.ide.eclipse.packages.ui/src/main/org/jboss/ide/eclipse/packages/ui/util/PackageDestinationComposite.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PackageDestinationComposite.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosside/core/plugins/org.jboss.ide.eclipse.packages.ui/src/main/org/jboss/ide/eclipse/packages/ui/util/PackageDestinationComposite.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- PackageDestinationComposite.java	16 Feb 2007 18:39:19 -0000	1.4
  +++ PackageDestinationComposite.java	21 Feb 2007 20:53:42 -0000	1.5
  @@ -6,6 +6,7 @@
   import org.eclipse.swt.SWT;
   import org.eclipse.swt.events.SelectionAdapter;
   import org.eclipse.swt.events.SelectionEvent;
  +import org.eclipse.swt.layout.GridData;
   import org.eclipse.swt.layout.GridLayout;
   import org.eclipse.swt.widgets.Button;
   import org.eclipse.swt.widgets.Composite;
  @@ -23,6 +24,11 @@
   		super(parent, style, destination);
   	}
   	
  +	public PackageDestinationComposite (Composite parent, int style, GridData textLayoutData, GridData buttonLayoutData, Object destination)
  +	{
  +		super (parent, style, textLayoutData, buttonLayoutData, destination);
  +	}
  +	
   	protected void createBrowseButton(Composite parent) {
   		Composite browseComposite = new Composite(parent, SWT.NONE);
   		browseComposite.setLayout(new GridLayout(2, false));
  
  
  
  1.5       +26 -15    jbosside/core/plugins/org.jboss.ide.eclipse.packages.ui/src/main/org/jboss/ide/eclipse/packages/ui/util/PackageNodeDestinationComposite.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PackageNodeDestinationComposite.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosside/core/plugins/org.jboss.ide.eclipse.packages.ui/src/main/org/jboss/ide/eclipse/packages/ui/util/PackageNodeDestinationComposite.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- PackageNodeDestinationComposite.java	16 Feb 2007 18:39:19 -0000	1.4
  +++ PackageNodeDestinationComposite.java	21 Feb 2007 20:53:42 -0000	1.5
  @@ -7,12 +7,9 @@
   import org.eclipse.core.resources.IProject;
   import org.eclipse.jface.dialogs.Dialog;
   import org.eclipse.swt.SWT;
  -import org.eclipse.swt.custom.StyleRange;
   import org.eclipse.swt.events.SelectionAdapter;
   import org.eclipse.swt.events.SelectionEvent;
  -import org.eclipse.swt.graphics.GlyphMetrics;
   import org.eclipse.swt.graphics.Image;
  -import org.eclipse.swt.graphics.Rectangle;
   import org.eclipse.swt.layout.GridData;
   import org.eclipse.swt.layout.GridLayout;
   import org.eclipse.swt.layout.RowLayout;
  @@ -38,14 +35,23 @@
   	protected Object nodeDestination;
   	protected boolean editable;
   	protected ArrayList listeners;
  +	protected GridData textLayoutData, buttonLayoutData;
   	
   	public PackageNodeDestinationComposite(Composite parent, int style, Object destination)
   	{
  +		this (parent, style, null, null, destination);
  +	}
  +	
  +	public PackageNodeDestinationComposite(Composite parent, int style, GridData textLayoutData, GridData buttonLayoutData, Object destination)
  +	{
   		super(parent, style);
   		this.parent = parent;
   		this.nodeDestination = destination;
   		this.editable = true;
   		this.listeners = new ArrayList();
  +		this.textLayoutData = textLayoutData;
  +		this.buttonLayoutData = buttonLayoutData; 
  +		
   		createComposite();
   	}
   	
  @@ -54,6 +60,7 @@
   		GridLayout layout = new GridLayout(2, false);
   		layout.marginHeight = 0;
   		layout.marginWidth = 0;
  +		layout.marginBottom = layout.marginLeft = layout.marginRight = layout.marginTop = 0;
   		
   		setLayout(layout);
   		GridData data = new GridData(GridData.FILL_HORIZONTAL);
  @@ -65,22 +72,26 @@
   		
   		updateDestinationViewer();
   		
  -		destinationText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  -		
  -		new Label(parent, SWT.NONE);
  -		new Label(parent, SWT.NONE);
  +		if (textLayoutData == null)
  +		{
  +			textLayoutData = new GridData(GridData.FILL_HORIZONTAL);
  +		}
  +		destinationText.setLayoutData(textLayoutData);
   		
   		Composite buttons = new Composite(parent, SWT.NONE);
  -		RowLayout buttonLayout = new RowLayout(SWT.HORIZONTAL);
  -		buttonLayout.marginBottom = buttonLayout.marginLeft = 	buttonLayout.marginRight = buttonLayout.marginTop = 0;
  -		buttonLayout.spacing = buttonLayout.marginHeight =  buttonLayout.marginWidth = 0;
  +		
  +		GridLayout buttonLayout = new GridLayout(2, false);
  +		//buttonLayout.marginBottom = buttonLayout.marginLeft = buttonLayout.marginRight = buttonLayout.marginTop = 0;
  +		buttonLayout.marginHeight =  buttonLayout.marginWidth = 0;
   		
   		buttons.setLayout(buttonLayout);
  -		GridData buttonData = new GridData(GridData.FILL_HORIZONTAL);
  -		buttonData.horizontalSpan = 2;
  -		buttonData.horizontalAlignment = GridData.END;
  -		buttonData.verticalAlignment = GridData.BEGINNING;
  -		buttons.setLayoutData(buttonData);
  +		if (buttonLayoutData == null) {
  +			buttonLayoutData = new GridData(GridData.FILL_HORIZONTAL);
  +			buttonLayoutData.horizontalSpan = 2;
  +			buttonLayoutData.horizontalAlignment = GridData.END;
  +			buttonLayoutData.verticalAlignment = GridData.BEGINNING;
  +		}
  +		buttons.setLayoutData(buttonLayoutData);
   		
   		createBrowseButton(buttons);
   	}
  
  
  



More information about the jboss-cvs-commits mailing list