Changeset 1221

Show
Ignore:
Timestamp:
11/02/07 17:51:19 (1 year ago)
Author:
koshi
Message:

#176 set column width.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.jalcedo.generator/trunk/org.jalcedo.generator.icon.ui/src/org/jalcedo/generator/icon/ui/internal/property/IconPropertyPage.java

    r1209 r1221  
    44import java.net.URL; 
    55 
    6 import org.eclipse.core.runtime.CoreException; 
    76import org.eclipse.core.runtime.NullProgressMonitor; 
    87import org.eclipse.core.runtime.Path; 
     
    5655 */ 
    5756public class IconPropertyPage extends PropertyPage implements IWorkbenchPropertyPage { 
    58     private String NATURE_ID = "org.eclipse.pde.PluginNature"; 
     57    //private String NATURE_ID = "org.eclipse.pde.PluginNature"; 
    5958     
    6059    private static String DEFAULT_CLASS = "IImageKeys"; //$NON-NLS-1$ 
     
    119118        TableColumn column = new TableColumn(table, SWT.NONE); 
    120119        column.setText(Messages.getString("IconPropertyPage.iconColumn")); //$NON-NLS-1$ 
     120        column.pack(); 
    121121         
    122122        column = new TableColumn(table, SWT.NONE); 
    123123        column.setText(Messages.getString("IconPropertyPage.keyColumn")); //$NON-NLS-1$ 
    124          
    125         this.columnsPack(table); 
     124        column.setWidth(500); 
    126125         
    127126        iconListViewer = new TableViewer(table); 
     
    135134        editButton.setLayoutData(gridData); 
    136135         
     136        noDefaultAndApplyButton(); 
    137137        this.createInterfaceComposite(container, 3); 
    138          
    139         noDefaultAndApplyButton(); 
    140          
    141         setEnabled(this.isPluginProject()); 
    142         if(this.isPluginProject()){ 
    143             this.initializeActions(); 
    144             this.initializeInput(); 
    145         }else{ 
    146             descriptionLabel.setText(Messages.getString("IconPropertyPage.descriptionNotPlugin")); //$NON-NLS-1$ 
    147         } 
     138        this.initializeActions(); 
     139        this.initializeInput(); 
    148140         
    149141        return container; 
     
    307299    } 
    308300     
    309     private boolean isPluginProject(){ 
    310         try { 
    311             return project.getProject().getDescription().hasNature(NATURE_ID); 
    312         } catch (CoreException e) { 
    313             MessageDialog.openError(getShell(), "Error", Messages.getString("IconPropertyPage.getProjectDescriptionError")); //$NON-NLS-1$ 
    314             setEnabled(false); 
    315             e.printStackTrace(); 
    316         } 
    317         return false; 
    318     } 
    319      
    320     private void columnsPack(Table table){ 
    321         for(TableColumn column : table.getColumns()){ 
    322             column.pack(); 
    323         } 
    324     } 
    325  
    326301    private class TableColumnLabelProvider extends LabelProvider implements ITableLabelProvider{ 
    327302        /* (non-Javadoc) 
  • org.jalcedo.generator/trunk/org.jalcedo.generator.icon.ui/src/org/jalcedo/generator/icon/ui/internal/resource/messages.properties

    r1219 r1221  
    4444IconEditWizardPage.size = size:  
    4545IconEditWizardPage.type = type:  
    46 IconEditWizardPage.pattern = File type text 
    47 IconEditWizardPage.patternToolTip = File type text: (? = any character, * = any string) 
     46IconEditWizardPage.pattern = type filter text 
     47IconEditWizardPage.patternToolTip = Type filter text (? = any character, * = any string) 
    4848# error 
    4949IconEditWizardPage.getIconImageError = get icon image error.