Package org.apache.directory.studio.ldapbrowser.common.widgets

Examples of org.apache.directory.studio.ldapbrowser.common.widgets.FileBrowserWidget


     */
    public void createControl( Composite composite )
    {
        // Export file
        BaseWidgetUtils.createLabel( composite, getFileType() + Messages.getString( "ExportBaseToPage.File" ), 1 ); //$NON-NLS-1$
        fileBrowserWidget = new FileBrowserWidget( NLS.bind(
            Messages.getString( "ExportBaseToPage.SelectFileType" ), new String[] { getFileType() } ), getExtensions(), //$NON-NLS-1$
            FileBrowserWidget.TYPE_SAVE );
        fileBrowserWidget.createWidget( composite );
        fileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
View Full Code Here


    {
        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );

        // DSML file
        BaseWidgetUtils.createLabel( composite, Messages.getString( "ImportDsmlMainWizardPage.DSMLFile" ), 1 ); //$NON-NLS-1$
        dsmlFileBrowserWidget = new FileBrowserWidget(
            Messages.getString( "ImportDsmlMainWizardPage.SelectDSMLFile" ), EXTENSIONS, FileBrowserWidget.TYPE_OPEN ); //$NON-NLS-1$
        dsmlFileBrowserWidget.createWidget( composite );
        dsmlFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
                wizard.setDsmlFilename( dsmlFileBrowserWidget.getFilename() );
                if ( useDefaultResponseFileButton.getSelection() )
                {
                    responseFileBrowserWidget.setFilename( dsmlFileBrowserWidget.getFilename() + ".response.xml" ); //$NON-NLS-1$
                }
                validate();
            }
        } );

        // Connection
        BaseWidgetUtils.createLabel( composite, Messages.getString( "ImportDsmlMainWizardPage.ImportTo" ), 1 ); //$NON-NLS-1$
        browserConnectionWidget = new BrowserConnectionWidget( wizard.getImportConnection() );
        browserConnectionWidget.createWidget( composite );
        browserConnectionWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
                wizard.setImportConnection( browserConnectionWidget.getBrowserConnection() );
                validate();
            }
        } );

        // Save Response
        Composite responseOuterComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 3 );
        Group responseGroup = BaseWidgetUtils.createGroup( responseOuterComposite, Messages
            .getString( "ImportDsmlMainWizardPage.Response" ), 1 ); //$NON-NLS-1$
        Composite responseContainer = BaseWidgetUtils.createColumnContainer( responseGroup, 3, 1 );

        saveResponseButton = BaseWidgetUtils.createCheckbox( responseContainer, Messages
            .getString( "ImportDsmlMainWizardPage.SaveResponse" ), 3 ); //$NON-NLS-1$
        saveResponseButton.setSelection( true );
        wizard.setSaveResponse( saveResponseButton.getSelection() );
        saveResponseButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                wizard.setSaveResponse( saveResponseButton.getSelection() );
                useDefaultResponseFileButton.setEnabled( saveResponseButton.getSelection() );
                useCustomResponseFileButton.setEnabled( saveResponseButton.getSelection() );
                responseFileBrowserWidget.setEnabled( saveResponseButton.getSelection()
                    && useCustomResponseFileButton.getSelection() );
                overwriteResponseFileButton.setEnabled( saveResponseButton.getSelection() );
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
        useDefaultResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, Messages
            .getString( "ImportDsmlMainWizardPage.UseDefaultResponse" ), 2 ); //$NON-NLS-1$
        useDefaultResponseFileButton.setSelection( true );
        useDefaultResponseFileButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                String temp = customResponseFileName;
                responseFileBrowserWidget.setFilename( dsmlFileBrowserWidget.getFilename() + ".response.xml" ); //$NON-NLS-1$
                responseFileBrowserWidget.setEnabled( false );
                customResponseFileName = temp;
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
        useCustomResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, Messages
            .getString( "ImportDsmlMainWizardPage.UseCustomResponse" ), //$NON-NLS-1$
            2 );
        useCustomResponseFileButton.setSelection( false );
        useCustomResponseFileButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                responseFileBrowserWidget.setFilename( customResponseFileName != null ? customResponseFileName : "" ); //$NON-NLS-1$
                responseFileBrowserWidget.setEnabled( true );
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
        responseFileBrowserWidget = new FileBrowserWidget( Messages
            .getString( "ImportDsmlMainWizardPage.SelectSaveFile" ), null, FileBrowserWidget.TYPE_SAVE ); //$NON-NLS-1$
        responseFileBrowserWidget.createWidget( responseContainer );
        responseFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
View Full Code Here

        // Main Composite
        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );

        // From File
        BaseWidgetUtils.createLabel( composite, Messages.getString( "ImportConnectionsWizardPage.FromFile" ), 1 ); //$NON-NLS-1$
        fileBrowserWidget = new FileBrowserWidget(
            Messages.getString( "ImportConnectionsWizardPage.ChooseFile" ), new String[] //$NON-NLS-1$
                { "lbc" }, FileBrowserWidget.TYPE_OPEN ); //$NON-NLS-1$
        fileBrowserWidget.createWidget( composite );
        fileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
View Full Code Here

    {
        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );

        // LDIF file
        BaseWidgetUtils.createLabel( composite, Messages.getString( "ImportLdifMainWizardPage.LDIFFile" ), 1 ); //$NON-NLS-1$
        ldifFileBrowserWidget = new FileBrowserWidget(
            Messages.getString( "ImportLdifMainWizardPage.SelectLDIFFile" ), EXTENSIONS, FileBrowserWidget.TYPE_OPEN ); //$NON-NLS-1$
        ldifFileBrowserWidget.createWidget( composite );
        ldifFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
                wizard.setLdifFilename( ldifFileBrowserWidget.getFilename() );
                if ( useDefaultLogfileButton.getSelection() )
                {
                    logFileBrowserWidget.setFilename( ldifFileBrowserWidget.getFilename() + ".log" ); //$NON-NLS-1$
                }
                validate();
            }
        } );

        // Connection
        BaseWidgetUtils.createLabel( composite, Messages.getString( "ImportLdifMainWizardPage.ImportTo" ), 1 ); //$NON-NLS-1$
        browserConnectionWidget = new BrowserConnectionWidget( wizard.getImportConnection() );
        browserConnectionWidget.createWidget( composite );
        browserConnectionWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
                wizard.setImportConnection( browserConnectionWidget.getBrowserConnection() );
                validate();
            }
        } );

        // Logging
        Composite loggingOuterComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 3 );
        Group loggingGroup = BaseWidgetUtils.createGroup( loggingOuterComposite, Messages
            .getString( "ImportLdifMainWizardPage.Logging" ), 1 ); //$NON-NLS-1$
        Composite loggingContainer = BaseWidgetUtils.createColumnContainer( loggingGroup, 3, 1 );

        enableLoggingButton = BaseWidgetUtils.createCheckbox( loggingContainer, Messages
            .getString( "ImportLdifMainWizardPage.EnableLogging" ), 3 ); //$NON-NLS-1$
        enableLoggingButton.setSelection( true );
        wizard.setEnableLogging( enableLoggingButton.getSelection() );
        enableLoggingButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                wizard.setEnableLogging( enableLoggingButton.getSelection() );
                useDefaultLogfileButton.setEnabled( enableLoggingButton.getSelection() );
                useCustomLogfileButton.setEnabled( enableLoggingButton.getSelection() );
                logFileBrowserWidget.setEnabled( enableLoggingButton.getSelection()
                    && useCustomLogfileButton.getSelection() );
                overwriteLogfileButton.setEnabled( enableLoggingButton.getSelection() );
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( loggingContainer, 1 );
        useDefaultLogfileButton = BaseWidgetUtils.createRadiobutton( loggingContainer, Messages
            .getString( "ImportLdifMainWizardPage.UseDefaultLogFile" ), 2 ); //$NON-NLS-1$
        useDefaultLogfileButton.setSelection( true );
        useDefaultLogfileButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                String temp = customLogfileName;
                logFileBrowserWidget.setFilename( ldifFileBrowserWidget.getFilename() + ".log" ); //$NON-NLS-1$
                logFileBrowserWidget.setEnabled( false );
                customLogfileName = temp;
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( loggingContainer, 1 );
        useCustomLogfileButton = BaseWidgetUtils.createRadiobutton( loggingContainer, Messages
            .getString( "ImportLdifMainWizardPage.UseCustomLogFile" ), 2 ); //$NON-NLS-1$
        useCustomLogfileButton.setSelection( false );
        useCustomLogfileButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                logFileBrowserWidget.setFilename( customLogfileName != null ? customLogfileName : "" ); //$NON-NLS-1$
                logFileBrowserWidget.setEnabled( true );
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( loggingContainer, 1 );
        logFileBrowserWidget = new FileBrowserWidget(
            Messages.getString( "ImportLdifMainWizardPage.SelectLogFile" ), null, FileBrowserWidget.TYPE_SAVE ); //$NON-NLS-1$
        logFileBrowserWidget.createWidget( loggingContainer );
        logFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
View Full Code Here

        //        Group destinationGroup = BaseWidgetUtils.createGroup( composite, "Destination", 1 );
        //        Composite destinationGroupComposite = BaseWidgetUtils.createColumnContainer( destinationGroup, 3, 1 );

        // Destination File
        BaseWidgetUtils.createLabel( composite, Messages.getString( "ExportConnectionsWizardPage.ToFile" ), 1 ); //$NON-NLS-1$
        fileBrowserWidget = new FileBrowserWidget(
            Messages.getString( "ExportConnectionsWizardPage.ChooseFile" ), new String[] //$NON-NLS-1$
                { "lbc" }, FileBrowserWidget.TYPE_SAVE ); //$NON-NLS-1$
        fileBrowserWidget.createWidget( composite );
        fileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
View Full Code Here

    {
        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );

        // LDIF file
        BaseWidgetUtils.createLabel( composite, "LDIF file:", 1 );
        ldifFileBrowserWidget = new FileBrowserWidget( "Select LDIF File", EXTENSIONS, FileBrowserWidget.TYPE_OPEN );
        ldifFileBrowserWidget.createWidget( composite );
        ldifFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
                wizard.setLdifFilename( ldifFileBrowserWidget.getFilename() );
                if ( useDefaultLogfileButton.getSelection() )
                {
                    logFileBrowserWidget.setFilename( ldifFileBrowserWidget.getFilename() + ".log" );
                }
                validate();
            }
        } );

        // Connection
        BaseWidgetUtils.createLabel( composite, "Import into:", 1 );
        browserConnectionWidget = new BrowserConnectionWidget( wizard.getImportConnection() );
        browserConnectionWidget.createWidget( composite );
        browserConnectionWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
                wizard.setImportConnection( browserConnectionWidget.getBrowserConnection() );
                validate();
            }
        } );

        // Logging
        Composite loggingOuterComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 3 );
        Group loggingGroup = BaseWidgetUtils.createGroup( loggingOuterComposite, "Logging", 1 );
        Composite loggingContainer = BaseWidgetUtils.createColumnContainer( loggingGroup, 3, 1 );

        enableLoggingButton = BaseWidgetUtils.createCheckbox( loggingContainer, "Enable logging", 3 );
        enableLoggingButton.setSelection( true );
        wizard.setEnableLogging( enableLoggingButton.getSelection() );
        enableLoggingButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                wizard.setEnableLogging( enableLoggingButton.getSelection() );
                useDefaultLogfileButton.setEnabled( enableLoggingButton.getSelection() );
                useCustomLogfileButton.setEnabled( enableLoggingButton.getSelection() );
                logFileBrowserWidget.setEnabled( enableLoggingButton.getSelection()
                    && useCustomLogfileButton.getSelection() );
                overwriteLogfileButton.setEnabled( enableLoggingButton.getSelection() );
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( loggingContainer, 1 );
        useDefaultLogfileButton = BaseWidgetUtils.createRadiobutton( loggingContainer, "Use default logfile", 2 );
        useDefaultLogfileButton.setSelection( true );
        useDefaultLogfileButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                String temp = customLogfileName;
                logFileBrowserWidget.setFilename( ldifFileBrowserWidget.getFilename() + ".log" );
                logFileBrowserWidget.setEnabled( false );
                customLogfileName = temp;
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( loggingContainer, 1 );
        useCustomLogfileButton = BaseWidgetUtils.createRadiobutton( loggingContainer, "Use custom logfile", 2 );
        useCustomLogfileButton.setSelection( false );
        useCustomLogfileButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                logFileBrowserWidget.setFilename( customLogfileName != null ? customLogfileName : "" );
                logFileBrowserWidget.setEnabled( true );
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( loggingContainer, 1 );
        logFileBrowserWidget = new FileBrowserWidget( "Select Logfile", null, FileBrowserWidget.TYPE_SAVE );
        logFileBrowserWidget.createWidget( loggingContainer );
        logFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
View Full Code Here

    {
        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );

        // DSML file
        BaseWidgetUtils.createLabel( composite, "DSML file:", 1 );
        dsmlFileBrowserWidget = new FileBrowserWidget( "Select a DSML File", EXTENSIONS, FileBrowserWidget.TYPE_OPEN );
        dsmlFileBrowserWidget.createWidget( composite );
        dsmlFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
                wizard.setDsmlFilename( dsmlFileBrowserWidget.getFilename() );
                if ( useDefaultResponseFileButton.getSelection() )
                {
                    responseFileBrowserWidget.setFilename( dsmlFileBrowserWidget.getFilename() + ".response.xml" );
                }
                validate();
            }
        } );

        // Connection
        BaseWidgetUtils.createLabel( composite, "Import into:", 1 );
        browserConnectionWidget = new BrowserConnectionWidget( wizard.getImportConnection() );
        browserConnectionWidget.createWidget( composite );
        browserConnectionWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
                wizard.setImportConnection( browserConnectionWidget.getBrowserConnection() );
                validate();
            }
        } );

        // Save Response
        Composite responseOuterComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 3 );
        Group responseGroup = BaseWidgetUtils.createGroup( responseOuterComposite, "Response", 1 );
        Composite responseContainer = BaseWidgetUtils.createColumnContainer( responseGroup, 3, 1 );

        saveResponseButton = BaseWidgetUtils.createCheckbox( responseContainer, "Save response", 3 );
        saveResponseButton.setSelection( true );
        wizard.setSaveResponse( saveResponseButton.getSelection() );
        saveResponseButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                wizard.setSaveResponse( saveResponseButton.getSelection() );
                useDefaultResponseFileButton.setEnabled( saveResponseButton.getSelection() );
                useCustomResponseFileButton.setEnabled( saveResponseButton.getSelection() );
                responseFileBrowserWidget.setEnabled( saveResponseButton.getSelection()
                    && useCustomResponseFileButton.getSelection() );
                overwriteResponseFileButton.setEnabled( saveResponseButton.getSelection() );
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
        useDefaultResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer,
            "Use default response file", 2 );
        useDefaultResponseFileButton.setSelection( true );
        useDefaultResponseFileButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                String temp = customResponseFileName;
                responseFileBrowserWidget.setFilename( dsmlFileBrowserWidget.getFilename() + ".response.xml" );
                responseFileBrowserWidget.setEnabled( false );
                customResponseFileName = temp;
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
        useCustomResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, "Use custom response file",
            2 );
        useCustomResponseFileButton.setSelection( false );
        useCustomResponseFileButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent event )
            {
                responseFileBrowserWidget.setFilename( customResponseFileName != null ? customResponseFileName : "" );
                responseFileBrowserWidget.setEnabled( true );
                validate();
            }
        } );

        BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
        responseFileBrowserWidget = new FileBrowserWidget( "Select save file", null, FileBrowserWidget.TYPE_SAVE );
        responseFileBrowserWidget.createWidget( responseContainer );
        responseFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
            {
View Full Code Here

        // Main Composite
        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );

        // From File
        BaseWidgetUtils.createLabel( composite, "From file:", 1 );
        fileBrowserWidget = new FileBrowserWidget( "Choose a file", new String[]
            { "lbc" }, FileBrowserWidget.TYPE_OPEN );
        fileBrowserWidget.createWidget( composite );
        fileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
View Full Code Here

//        Group destinationGroup = BaseWidgetUtils.createGroup( composite, "Destination", 1 );
//        Composite destinationGroupComposite = BaseWidgetUtils.createColumnContainer( destinationGroup, 3, 1 );

        // Destination File
        BaseWidgetUtils.createLabel( composite, "To file:", 1 );
        fileBrowserWidget = new FileBrowserWidget( "Choose a file", new String[]
            { "lbc" }, FileBrowserWidget.TYPE_SAVE );
        fileBrowserWidget.createWidget( composite );
        fileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
View Full Code Here

     */
    public void createControl( Composite composite )
    {
        // Export file
        BaseWidgetUtils.createLabel( composite, getFileType() + " File:", 1 );
        fileBrowserWidget = new FileBrowserWidget( "Select " + getFileType() + " File", getExtensions(),
            FileBrowserWidget.TYPE_SAVE );
        fileBrowserWidget.createWidget( composite );
        fileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.common.widgets.FileBrowserWidget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.