Changeset 694

Show
Ignore:
Timestamp:
06/01/07 01:33:51 (2 years ago)
Author:
yuanying
Message:

Layout is changed at detail composite.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.jalcedo.client.examples/trunk/org.jalcedo.client.examples.rails/src/org/jalcedo/client/examples/rails/views/project/ProjectDetailComposite.java

    r690 r694  
    1010 
    1111public class ProjectDetailComposite extends Composite { 
    12      
    13     private Composite detailComposite = null; 
    1412     
    1513    private Label   nameLabel = null; 
     
    5553    } 
    5654 
    57     private void createDetailComposite() { 
    58         GridData gridData2 = new GridData(); 
    59         gridData2.widthHint = 180; 
    60         GridData gridData = new GridData(); 
    61         gridData.widthHint = 180; 
    62          
    63         GridLayout gridLayout = new GridLayout(); 
    64         gridLayout.numColumns = 2; 
    65         detailComposite = new Composite(detailGroup, SWT.NONE); 
    66         detailComposite.setLayout(gridLayout); 
    67          
    68         nameLabel = new Label(detailComposite, SWT.NONE); 
    69         nameLabel.setText("First Name"); 
    70         nameText = new Text(detailComposite, SWT.BORDER); 
    71         nameText.setLayoutData(gridData); 
    72          
    73         descLabel = new Label(detailComposite, SWT.NONE); 
    74         descLabel.setText("Desc"); 
    75         descText = new Text(detailComposite, SWT.BORDER); 
    76         descText.setLayoutData(gridData2); 
    77     } 
    78  
    7955    /** 
    8056     * This method initializes detailGroup   
     
    8359    private void createDetailGroup() { 
    8460        GridLayout gridLayout2 = new GridLayout(); 
    85         gridLayout2.numColumns = 1
     61        gridLayout2.numColumns = 2
    8662        detailGroup = new Group(this, SWT.NONE); 
    87         createDetailComposite(); 
     63         
     64        GridData gridData2 = new GridData(); 
     65        gridData2.widthHint = 180; 
     66        GridData gridData = new GridData(); 
     67        gridData.widthHint = 180; 
     68         
     69        nameLabel = new Label(detailGroup, SWT.NONE); 
     70        nameLabel.setText("First Name"); 
     71        nameText = new Text(detailGroup, SWT.BORDER); 
     72        nameText.setLayoutData(gridData); 
     73         
     74        descLabel = new Label(detailGroup, SWT.NONE); 
     75        descLabel.setText("Desc"); 
     76        descText = new Text(detailGroup, SWT.BORDER); 
     77        descText.setLayoutData(gridData2); 
     78         
     79        GridData gridData1 = new GridData(); 
     80        gridData1.horizontalAlignment = GridData.FILL; 
     81        gridData1.grabExcessHorizontalSpace = true; 
     82        gridData1.grabExcessVerticalSpace = true; 
     83        gridData1.verticalAlignment = GridData.FILL; 
     84         
    8885        detailGroup.setLayout(gridLayout2); 
     86        detailGroup.setLayoutData(gridData1); 
    8987    } 
    9088}