Java Code Examples for org.eclipse.swt.SWT#MIN

The following examples show how to use org.eclipse.swt.SWT#MIN . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public static void main( String[] args ) throws HopException {
  Display display = new Display();
  Shell shell = new Shell( display, SWT.MIN | SWT.MAX | SWT.RESIZE );

  HopClientEnvironment.init();
  HopEnvironment.init();
  HopGuiEnvironment.init();
  WorkflowRunConfiguration configuration = new WorkflowRunConfiguration( "test", "A test run config", null );
  WorkflowRunConfigurationDialog dialog = new WorkflowRunConfigurationDialog( shell, null, configuration );
  String name = dialog.open();
  if ( name != null ) {
    // Re-open with a new dialog...
    //
    WorkflowRunConfigurationDialog newDialog = new WorkflowRunConfigurationDialog( shell, null, configuration );
    newDialog.open();
  }

  display.dispose();
}
 
Example 2
public PurRepositoryRevisionBrowserDialog( Shell parent, int style, Repository repository,
    RepositoryElementInterface element ) {
  this.display = parent.getDisplay();
  this.props = PropsUI.getInstance();
  this.repository = repository;
  this.element = element;

  try {
    if ( repository.hasService( IRevisionService.class ) ) {
      revisionService = (IRevisionService) repository.getService( IRevisionService.class );
    } else {
      throw new IllegalStateException();
    }
  } catch ( KettleException e ) {
    throw new IllegalStateException( e );
  }
  String name = element.getRepositoryElementType().toString() + " " + element.getRepositoryDirectory().getPath();
  if ( !name.endsWith( "/" ) )
    name += "/";
  name += element.getName();

  this.elementDescription = name;

  shell = new Shell( display, style | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );
  shell.setText( BaseMessages.getString( PKG, "PurRepositoryRevisionBrowserDialog.Dialog.Main.Title" ) ); //$NON-NLS-1$
}
 
Example 3
Source Project: hop   File: ActionWorkflowDialog.java    License: Apache License 2.0 5 votes vote down vote up
public IAction open() {
  Shell parent = getParent();
  display = parent.getDisplay();

  shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.MAX | SWT.RESIZE );
  props.setLook( shell );
  WorkflowDialog.setShellImage( shell, action );

  backupChanged = action.hasChanged();

  createElements();

  // Detect [X] or ALT-F4 or something that kills this window...
  shell.addShellListener( new ShellAdapter() {
    public void shellClosed( ShellEvent e ) {
      cancel();
    }
  } );

  getData();
  setActive();

  BaseTransformDialog.setSize( shell );

  int width = 750;
  int height = Const.isWindows() ? 730 : 718;

  shell.setSize( width, height );
  shell.open();
  while ( !shell.isDisposed() ) {
    if ( !display.readAndDispatch() ) {
      display.sleep();
    }
  }
  return action;
}
 
Example 4
Source Project: pentaho-kettle   File: CommonStepDialog.java    License: Apache License 2.0 5 votes vote down vote up
private Display prepareLayout() {

    // Prep the parent shell and the dialog shell
    final Shell parent = getParent();
    final Display display = parent.getDisplay();

    shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );
    props.setLook( shell );
    setShellImage( shell, meta );
    // Detect X or ALT-F4 or something that kills this window...
    shell.addShellListener( new ShellAdapter() {
      @Override
      public void shellClosed( ShellEvent e ) {
        cancel();
      }
    } );

    changed = meta.hasChanged();

    final FormLayout formLayout = new FormLayout();
    formLayout.marginWidth = BaseDialog.MARGIN_SIZE;
    formLayout.marginHeight = BaseDialog.MARGIN_SIZE;

    shell.setLayout( formLayout );
    shell.setText( getTitle() );
    return display;
  }
 
Example 5
public KettleFileRepositoryDialog( Shell parent, int style, RepositoryMeta repositoryMeta,
  RepositoriesMeta repositoriesMeta ) {
  this.display = parent.getDisplay();
  this.props = PropsUI.getInstance();
  this.input = (KettleFileRepositoryMeta) repositoryMeta;
  this.masterRepositoriesMeta = repositoriesMeta.clone();
  this.masterRepositoryName = repositoryMeta.getName();

  // this.repositories = repositoriesMeta;
  shell = new Shell( parent, style | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );
  shell.setText( BaseMessages.getString( PKG, "KettleFileRepositoryDialog.Dialog.Main.Title" ) );
}
 
Example 6
Source Project: hop   File: HopGui.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * Build the shell
 */
protected void open() {
  shell = new Shell( display, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX );
  shell.setImage( GuiResource.getInstance().getImageHopUi() );

  shell.setText( BaseMessages.getString( PKG, "HopGui.Application.Name" ) );
  addMainMenu();
  addMainToolbar();
  addPerspectivesToolbar();
  addMainPerspectivesComposite();

  loadPerspectives();

  replaceKeyboardShortcutListeners( this );

  shell.addListener( SWT.Close, this::closeEvent );

  BaseTransformDialog.setSize( shell );

  // Open the Hop GUI shell and wait until it's closed
  //
  // shell.pack();
  shell.open();

  openingLastFiles = true; // TODO: make this configurable.

  try {
    ExtensionPointHandler.callExtensionPoint( log, HopExtensionPoint.HopGuiStart.id, this );
  } catch ( Exception e ) {
    new ErrorDialog( shell, "Error", "Error calling extension point '" + HopExtensionPoint.HopGuiStart.id + "'", e );
  }
  // Open the previously used files. Extension points can disable this
  //
  if ( openingLastFiles ) {
    auditDelegate.openLastFiles();
  }
  boolean retry = true;
  while ( retry ) {
    try {
      while ( !shell.isDisposed() ) {
        if ( !display.readAndDispatch() ) {
          display.sleep();
        }
      }
      retry = false;
    } catch ( Throwable throwable ) {
      System.err.println( "Error in the Hop GUI : " + throwable.getMessage() + Const.CR + Const.getClassicStackTrace( throwable ) );
    }
  }
  display.dispose();
}
 
Example 7
public String open() {
  Shell parent = getParent();
  Display display = parent.getDisplay();

  shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );
  props.setLook( shell );
  setShellImage( shell, model );

  lsMod = new ModifyListener() {

    public void modifyText( ModifyEvent e ) {
      model.setChanged();
    }
  };

  changed = model.hasChanged();

  FormLayout formLayout = new FormLayout();
  formLayout.marginWidth = Const.FORM_MARGIN;
  formLayout.marginHeight = Const.FORM_MARGIN;

  shell.setLayout( formLayout );
  shell.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.DialogTitle" ) );

  int middle = props.getMiddlePct();
  int margin = Const.MARGIN;

  // Stepname line
  wlStepname = new Label( shell, SWT.RIGHT );
  wlStepname.setText( BaseMessages.getString( PKG, "System.Label.StepName" ) );
  props.setLook( wlStepname );
  fdlStepname = new FormData();
  fdlStepname.left = new FormAttachment( 0, 0 );
  fdlStepname.top = new FormAttachment( 0, margin );
  fdlStepname.right = new FormAttachment( middle, -margin );
  wlStepname.setLayoutData( fdlStepname );
  wStepname = new Text( shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  wStepname.setText( stepname );
  props.setLook( wStepname );
  wStepname.addModifyListener( lsMod );
  fdStepname = new FormData();
  fdStepname.left = new FormAttachment( middle, 0 );
  fdStepname.top = new FormAttachment( 0, margin );
  fdStepname.right = new FormAttachment( 100, 0 );
  wStepname.setLayoutData( fdStepname );

  wTabFolder = new CTabFolder( shell, SWT.BORDER );
  props.setLook( wTabFolder, Props.WIDGET_STYLE_TAB );

  // GENERAL TAB
  addGeneralTab();

  // Servers TAB
  addServersTab();

  // Fields TAB
  addFieldsTab();

  // Settings TAB
  addSettingsTab();

  // ////////////
  // BUTTONS //
  // //////////
  wOK = new Button( shell, SWT.PUSH );
  wOK.setText( BaseMessages.getString( PKG, "System.Button.OK" ) );
  wCancel = new Button( shell, SWT.PUSH );
  wCancel.setText( BaseMessages.getString( PKG, "System.Button.Cancel" ) );

  setButtonPositions( new Button[]{wOK, wCancel}, margin, null );

  fdTabFolder = new FormData();
  fdTabFolder.left = new FormAttachment( 0, 0 );
  fdTabFolder.top = new FormAttachment( wStepname, margin );
  fdTabFolder.right = new FormAttachment( 100, 0 );
  fdTabFolder.bottom = new FormAttachment( wOK, -margin );
  wTabFolder.setLayoutData( fdTabFolder );

  // //////////////////
  // Std Listeners //
  // ////////////////
  addStandardListeners();

  wTabFolder.setSelection( 0 );

  // Set the shell size, based upon previous time...
  setSize();
  getData( model );
  model.setChanged( changed );

  shell.open();
  while ( !shell.isDisposed() ) {
    if ( !display.readAndDispatch() ) {
      display.sleep();
    }
  }
  return stepname;
}
 
Example 8
public void minimize() {
	if((this.getControl().getStyle() & SWT.MIN) != 0) {
		this.getControl().setMinimized(true);
	}
}
 
Example 9
Source Project: logbook   File: CaptureDialog.java    License: MIT License 4 votes vote down vote up
/**
 * Create the dialog.
 * @param parent
 */
public CaptureDialog(Shell parent) {
    super(parent, SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.RESIZE);
    this.setText("キャプチャ");
}
 
Example 10
Source Project: hop   File: ShowHelpDialog.java    License: Apache License 2.0 4 votes vote down vote up
protected Shell createShell( Shell parent ) {
  return new Shell( parent, SWT.RESIZE | SWT.MAX | SWT.MIN | SWT.DIALOG_TRIM );
}
 
Example 11
public String open() {
    Shell parent = getParent();
    Display display = parent.getDisplay();

    shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX);
    props.setLook(shell);
    setShellImage(shell, (CiviOutputMeta) input);

    lsMod = new ModifyListener() {
        public void modifyText(ModifyEvent e) {
            ((CiviOutputMeta) input).setChanged();
        }
    };
    backupChanged = ((CiviOutputMeta) input).hasChanged();

    FormLayout formLayout = new FormLayout();
    formLayout.marginWidth = Const.FORM_MARGIN;
    formLayout.marginHeight = Const.FORM_MARGIN;

    shell.setLayout(formLayout);
    shell.setText(BaseMessages.getString(PKG, "CiviCrmDialog.Shell.Output.Title"));

    middle = props.getMiddlePct();
    margin = Const.MARGIN;

    /*************************************************
     * STEP NAME ENTRY
     *************************************************/

    // Stepname line
    wlStepname = new Label(shell, SWT.RIGHT);
    wlStepname.setText(BaseMessages.getString(PKG, "System.Label.StepName"));
    props.setLook(wlStepname);
    fdlStepname = new FormData();
    fdlStepname.left = new FormAttachment(0, 0);
    fdlStepname.right = new FormAttachment(middle, -margin);
    fdlStepname.top = new FormAttachment(0, margin);
    wlStepname.setLayoutData(fdlStepname);

    wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
    wStepname.setText(stepname);
    props.setLook(wStepname);
    wStepname.addModifyListener(lsMod);
    fdStepname = new FormData();
    fdStepname.left = new FormAttachment(middle, 0);
    fdStepname.top = new FormAttachment(0, margin);
    fdStepname.right = new FormAttachment(100, 0);
    wStepname.setLayoutData(fdStepname);

    addOkCancelButtons();
    addConnectionTab();
    addEntityGroup();
    addOutputTab();

    // wGetInputFields.addListener(SWT.Selection, lsGetInputFields);
    /*************************************************
     * // DEFAULT ACTION LISTENERS
     *************************************************/

    lsDef = new SelectionAdapter() {
        public void widgetDefaultSelected(SelectionEvent e) {
            ok();
        }
    };
    // Detect X or ALT-F4 or something that kills this window...
    shell.addShellListener(new ShellAdapter() {
        public void shellClosed(ShellEvent e) {
            cancel();
        }
    });

    // Set the shell size, based upon previous time...
    setSize();

    /*************************************************
     * // POPULATE AND OPEN DIALOG
     *************************************************/

    getData();
    ((CiviOutputMeta) input).setChanged(backupChanged);

    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
    return stepname;
}
 
Example 12
Source Project: hop   File: TeraFastDialog.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see ITransformDialog#open()
 */
public String open() {
  this.changed = this.meta.hasChanged();

  final Shell parent = getParent();
  final Display display = parent.getDisplay();

  this.shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX );
  this.props.setLook( this.shell );
  setShellImage( this.shell, this.meta );

  FormLayout formLayout = new FormLayout();
  formLayout.marginWidth = Const.FORM_MARGIN;
  formLayout.marginHeight = Const.FORM_MARGIN;

  this.shell.setLayout( formLayout );
  this.shell.setText( BaseMessages.getString( PKG, "TeraFastDialog.Shell.Title" ) );

  buildUi();
  listeners();

  //
  // Search the fields in the background
  //

  final Runnable runnable = new Runnable() {
    public void run() {
      final TransformMeta transformMetaSearchFields =
        TeraFastDialog.this.pipelineMeta.findTransform( TeraFastDialog.this.transformName );
      if ( transformMetaSearchFields == null ) {
        return;
      }
      try {
        final IRowMeta row = TeraFastDialog.this.pipelineMeta.getPrevTransformFields( transformMetaSearchFields );

        // Remember these fields...
        for ( int i = 0; i < row.size(); i++ ) {
          TeraFastDialog.this.inputFields.put( row.getValueMeta( i ).getName(), Integer.valueOf( i ) );
        }

        setComboBoxes();
      } catch ( HopException e ) {
        TeraFastDialog.this.logError( BaseMessages.getString( PKG, "System.Dialog.GetFieldsFailed.Message" ) );
      }
    }
  };
  new Thread( runnable ).start();
  //
  // // Set the shell size, based upon previous time...
  setSize();

  getData();
  this.meta.setChanged( this.changed );
  disableInputs();

  this.shell.open();
  while ( !this.shell.isDisposed() ) {
    if ( !display.readAndDispatch() ) {
      display.sleep();
    }
  }
  return this.transformName;
}
 
Example 13
Source Project: hop   File: TextFileInputDialog.java    License: Apache License 2.0 4 votes vote down vote up
private void getFixed() {
  TextFileInputMeta info = new TextFileInputMeta();
  getInfo( info, true );

  Shell sh = new Shell( shell, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );

  try {
    List<String> rows = getFirst( 50, false );
    fields = getFields( info, rows );

    final TextFileImportWizardPage1 page1 = new TextFileImportWizardPage1( "1", props, rows, fields );
    page1.createControl( sh );
    final TextFileImportWizardPage2 page2 = new TextFileImportWizardPage2( "2", props, rows, fields );
    page2.createControl( sh );

    Wizard wizard = new Wizard() {
      public boolean performFinish() {
        wFields.clearAll( false );

        for ( ITextFileInputField field1 : fields ) {
          BaseFileField field = (BaseFileField) field1;
          if ( !field.isIgnored() && field.getLength() > 0 ) {
            TableItem item = new TableItem( wFields.table, SWT.NONE );
            item.setText( 1, field.getName() );
            item.setText( 2, "" + field.getTypeDesc() );
            item.setText( 3, "" + field.getFormat() );
            item.setText( 4, "" + field.getPosition() );
            item.setText( 5, field.getLength() < 0 ? "" : "" + field.getLength() );
            item.setText( 6, field.getPrecision() < 0 ? "" : "" + field.getPrecision() );
            item.setText( 7, "" + field.getCurrencySymbol() );
            item.setText( 8, "" + field.getDecimalSymbol() );
            item.setText( 9, "" + field.getGroupSymbol() );
            item.setText( 10, "" + field.getNullString() );
            item.setText( 11, "" + field.getIfNullValue() );
            item.setText( 12, "" + field.getTrimTypeDesc() );
            item.setText( 13, field.isRepeated() ? BaseMessages.getString( PKG, "System.Combo.Yes" ) : BaseMessages
              .getString( PKG, "System.Combo.No" ) );
          }

        }
        int size = wFields.table.getItemCount();
        if ( size == 0 ) {
          new TableItem( wFields.table, SWT.NONE );
        }

        wFields.removeEmptyRows();
        wFields.setRowNums();
        wFields.optWidth( true );

        input.setChanged();

        return true;
      }
    };

    wizard.addPage( page1 );
    wizard.addPage( page2 );

    WizardDialog wd = new WizardDialog( shell, wizard );
    WizardDialog.setDefaultImage( GuiResource.getInstance().getImageWizard() );
    wd.setMinimumPageSize( 700, 375 );
    wd.updateSize();
    wd.open();
  } catch ( Exception e ) {
    new ErrorDialog( shell, BaseMessages.getString( PKG, "TextFileInputDialog.ErrorShowingFixedWizard.DialogTitle" ),
      BaseMessages.getString( PKG, "TextFileInputDialog.ErrorShowingFixedWizard.DialogMessage" ), e );
  }
}
 
Example 14
Source Project: pentaho-kettle   File: ShowHelpDialog.java    License: Apache License 2.0 4 votes vote down vote up
protected Shell createShell( Shell parent ) {
  return new Shell( parent, SWT.RESIZE | SWT.MAX | SWT.MIN | SWT.DIALOG_TRIM );
}
 
Example 15
Source Project: BiglyBT   File: Utils.java    License: GNU General Public License v2.0 4 votes vote down vote up
private int calcState(Shell shell) {
	return shell.getMinimized() ? SWT.MIN : shell.getMaximized() ? SWT.MAX : SWT.NONE;
}
 
Example 16
/**
 * {@inheritDoc}
 *
 * @see org.pentaho.di.trans.step.StepDialogInterface#open()
 */
public String open() {
  shell = new Shell( getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX );
  props.setLook( shell );

  setShellImage( shell, input );

  changed = input.hasChanged();

  FormLayout formLayout = new FormLayout();
  formLayout.marginWidth = Const.FORM_MARGIN;
  formLayout.marginHeight = Const.FORM_MARGIN;

  shell.setLayout( formLayout );
  shell.setText( BaseMessages.getString( PKG, "IngresVectorwiseLoaderDialog.Shell.Title" ));

  middle = props.getMiddlePct();
  margin = Const.MARGIN;

  /************************************** Step name line ***************************/
  // label
  wlStepname = new Label( shell, SWT.RIGHT );
  wlStepname.setText( "Step Name" );
  wlStepname.setLayoutData( standardLabelSpacing( null, null ) );
  props.setLook( wlStepname );

  // text entry
  wStepname = new Text( shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  wStepname.setText( stepname );
  wStepname.addModifyListener( lsMod );
  wStepname.setLayoutData( standardInputSpacing( null, wlStepname ) );
  props.setLook( wStepname );

  Control lastControl = addDbConnectionInputs();
  lastControl = addCustomInputs( lastControl );

  addVerticalPadding( 2 * margin );

  /********************************** OK and Cancel buttons **************************/
  addDefaultButtons( margin, lastControl );

  lastControl = addFieldSelection( lastControl );

  getData();
  input.setChanged( changed );

  // Add listeners
  // Listener lsVisualize = new Listener() { public void handleEvent(Event e) { quickVisualize(); } };

  // wVisualize.addListener(SWT.Selection, lsVisualize );

  shell.open();
  while ( !shell.isDisposed() ) {
    Display display = getParent().getDisplay();

    if ( !display.readAndDispatch() ) {
      display.sleep();
    }
  }
  return stepname;
}
 
Example 17
/**
 * @return true when OK is hit, false when CANCEL
 */
public boolean open() {

  Shell parent = getParent();
  Display display = parent.getDisplay();

  shell = new Shell( parent, SWT.RESIZE | SWT.MAX | SWT.MIN | SWT.DIALOG_TRIM );
  shell.setImage( GUIResource.getInstance().getImageSpoon() );
  props.setLook( shell );

  margin = Const.MARGIN + 2;
  middle = Const.MIDDLE_PCT;

  FormLayout formLayout = new FormLayout();

  shell.setLayout( formLayout );
  shell.setText( "Graph Model Editor" );

  Button wOK = new Button( shell, SWT.PUSH );
  wOK.setText( BaseMessages.getString( PKG, "System.Button.OK" ) );
  wOK.addListener( SWT.Selection, event -> ok() );
  Button wCancel = new Button( shell, SWT.PUSH );
  wCancel.setText( BaseMessages.getString( PKG, "System.Button.Cancel" ) );
  wCancel.addListener( SWT.Selection, event -> cancel() );

  BaseStepDialog.positionBottomButtons( shell, new Button[] { wOK, wCancel }, margin, null );

  // Add a tab folder
  //
  wTabs = new CTabFolder( shell, SWT.BORDER );
  FormData fdTabs = new FormData();
  fdTabs.left = new FormAttachment( 0, 0 );
  fdTabs.right = new FormAttachment( 100, 0 );
  fdTabs.top = new FormAttachment( 0, 0 );
  fdTabs.bottom = new FormAttachment( wOK, -margin * 2 );
  wTabs.setLayoutData( fdTabs );

  addModelTab();
  addNodesTab();
  addRelationshipsTab();
  addGraphTab();

  // Select the model tab
  //
  wTabs.setSelection( 0 );

  // Set the shell size, based upon previous time...
  BaseStepDialog.setSize( shell );

  getData();

  shell.open();
  while ( !shell.isDisposed() ) {
    if ( !display.readAndDispatch() ) {
      display.sleep();
    }
  }

  return ok;
}
 
Example 18
private void getFixed() {
  TextFileInputMeta info = new TextFileInputMeta();
  getInfo( info );

  Shell sh = new Shell( shell, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );

  try {
    List<String> rows = getFirst( 50, false );
    fields = getFields( info, rows );

    final TextFileImportWizardPage1 page1 = new TextFileImportWizardPage1( "1", props, rows, fields );
    page1.createControl( sh );
    final TextFileImportWizardPage2 page2 = new TextFileImportWizardPage2( "2", props, rows, fields );
    page2.createControl( sh );

    Wizard wizard = new Wizard() {
      public boolean performFinish() {
        wFields.clearAll( false );

        for ( TextFileInputFieldInterface field1 : fields ) {
          TextFileInputField field = (TextFileInputField) field1;
          if ( !field.isIgnored() && field.getLength() > 0 ) {
            TableItem item = new TableItem( wFields.table, SWT.NONE );
            item.setText( 1, field.getName() );
            item.setText( 2, "" + field.getTypeDesc() );
            item.setText( 3, "" + field.getFormat() );
            item.setText( 4, "" + field.getPosition() );
            item.setText( 5, field.getLength() < 0 ? "" : "" + field.getLength() );
            item.setText( 6, field.getPrecision() < 0 ? "" : "" + field.getPrecision() );
            item.setText( 7, "" + field.getCurrencySymbol() );
            item.setText( 8, "" + field.getDecimalSymbol() );
            item.setText( 9, "" + field.getGroupSymbol() );
            item.setText( 10, "" + field.getNullString() );
            item.setText( 11, "" + field.getIfNullValue() );
            item.setText( 12, "" + field.getTrimTypeDesc() );
            item.setText( 13, field.isRepeated() ? BaseMessages.getString( PKG, "System.Combo.Yes" ) : BaseMessages
              .getString( PKG, "System.Combo.No" ) );
          }

        }
        int size = wFields.table.getItemCount();
        if ( size == 0 ) {
          new TableItem( wFields.table, SWT.NONE );
        }

        wFields.removeEmptyRows();
        wFields.setRowNums();
        wFields.optWidth( true );

        input.setChanged();

        return true;
      }
    };

    wizard.addPage( page1 );
    wizard.addPage( page2 );

    WizardDialog wd = new WizardDialog( shell, wizard );
    WizardDialog.setDefaultImage( GUIResource.getInstance().getImageWizard() );
    wd.setMinimumPageSize( 700, 375 );
    wd.updateSize();
    wd.open();
  } catch ( Exception e ) {
    new ErrorDialog( shell, BaseMessages.getString( PKG, "TextFileInputDialog.ErrorShowingFixedWizard.DialogTitle" ),
        BaseMessages.getString( PKG, "TextFileInputDialog.ErrorShowingFixedWizard.DialogMessage" ), e );
  }
}
 
Example 19
Source Project: logbook   File: VersionDialog.java    License: MIT License 4 votes vote down vote up
/**
 * Create the dialog.
 * @param parent
 */
public VersionDialog(Shell parent) {
    super(parent, SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.RESIZE);
    this.setText("バージョン情報");
}
 
Example 20
Source Project: logbook   File: CreatePacFileDialog.java    License: MIT License 2 votes vote down vote up
/**
 * Create the dialog.
 * @param parent
 */
public CreatePacFileDialog(Shell parent) {
    super(parent, SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.RESIZE);
}