Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.VerifyListener


            public void modifyText( ModifyEvent e )
            {
                dialogChanged();
            }
        } );
        oidField.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "([0-9]*\\.?)*" ) ) //$NON-NLS-1$
                {
View Full Code Here


        proxyGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        Composite proxyGroupComposite = BaseWidgetUtils.createColumnContainer( proxyGroup, 2, 1 );

        BaseWidgetUtils.createLabel( proxyGroupComposite, "Proxy port:", 1 );
        proxyPortCombo = BaseWidgetUtils.createCombo( proxyGroupComposite, new String[0], -1, 1 );
        proxyPortCombo.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "[0-9]*" ) )
                {
                    e.doit = false;
                }
                if ( serverPortCombo.getText().length() > 4 && e.text.length() > 0 )
                {
                    e.doit = false;
                }
            }
        } );

        Group serverGroup = BaseWidgetUtils.createGroup( composite, "LDAP Server", 1 );
        serverGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

        useConnectionButton = BaseWidgetUtils.createRadiobutton( serverGroup,
            "Use settings from an existing connection:", 1 );

        Composite connectionComposite = BaseWidgetUtils.createColumnContainer( serverGroup, 4, 1 );

        BaseWidgetUtils.createRadioIndent( connectionComposite, 1 );
        BaseWidgetUtils.createLabel( connectionComposite, "Connection:", 1 );
        connectionText = BaseWidgetUtils.createReadonlyText( connectionComposite, "", 1 );
        connectionButton = BaseWidgetUtils.createButton( connectionComposite, "B&rowse...", 1 );

        Label connectionInformationLabel = BaseWidgetUtils.createLabel( connectionComposite,
            "(Warning: This feature requires the LDAP Browser Plugin.)", 1 );
        connectionInformationLabel.setLayoutData( new GridData( SWT.RIGHT, SWT.NONE, true, false, 4, 1 ) );

        useThisSettingsButton = BaseWidgetUtils.createRadiobutton( serverGroup, "Use this settings:", 1 );

        Composite settingsComposite = BaseWidgetUtils.createColumnContainer( serverGroup, 3, 1 );
        BaseWidgetUtils.createRadioIndent( settingsComposite, 1 );
        BaseWidgetUtils.createLabel( settingsComposite, "Hostname:", 1 );
        serverHostCombo = BaseWidgetUtils.createCombo( settingsComposite, new String[0], -1, 1 );

        BaseWidgetUtils.createRadioIndent( settingsComposite, 1 );
        BaseWidgetUtils.createLabel( settingsComposite, "Port:", 1 );
        serverPortCombo = BaseWidgetUtils.createCombo( settingsComposite, new String[0], -1, 1 );
        serverPortCombo.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "[0-9]*" ) )
                {
View Full Code Here

        GridData gridData = new GridData();
        gridData.horizontalSpan = 1;
        gridData.widthHint = 9 * 3;
        lengthText.setLayoutData( gridData );
        lengthText.setTextLimit( 3 );
        lengthText.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
                {
                    e.doit = false;
                }
                if ( "".equals( lengthText.getText() ) && e.text.matches( "[0]" ) ) //$NON-NLS-1$ //$NON-NLS-2$
                {
                    e.doit = false;
                }
            }
        } );

        // Characters Label
        Label charactersLabel = new Label( abbreviateComposite, SWT.NONE );
        charactersLabel.setText( Messages.getString( "HierarchyViewPreferencePage.characters." ) ); //$NON-NLS-1$

        // Secondary Label Group
        Group secondaryLabelGroup = new Group( composite, SWT.NONE );
        secondaryLabelGroup.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
        secondaryLabelGroup.setText( Messages.getString( "HierarchyViewPreferencePage.Secondary_label" ) ); //$NON-NLS-1$
        secondaryLabelGroup.setLayout( new GridLayout() );
        Composite secondaryLabelGroupComposite = new Composite( secondaryLabelGroup, SWT.NONE );
        gl = new GridLayout( 1, false );
        gl.marginHeight = gl.marginWidth = 0;
        secondaryLabelGroupComposite.setLayout( gl );
        secondaryLabelGroupComposite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

        secondaryLabelButtonDisplay = new Button( secondaryLabelGroupComposite, SWT.CHECK );
        secondaryLabelButtonDisplay.setText( Messages
            .getString( "HierarchyViewPreferencePage.Display_secondary_label." ) ); //$NON-NLS-1$

        // Label row composite
        Composite secondaryLabelComposite = new Composite( secondaryLabelGroupComposite, SWT.NONE );
        gl = new GridLayout( 3, false );
        gl.marginHeight = gl.marginWidth = 0;
        secondaryLabelComposite.setLayout( gl );
        gd = new GridData( GridData.FILL_HORIZONTAL );
        gd.horizontalSpan = 1;
        secondaryLabelComposite.setLayoutData( gd );

        // Use Label
        Label useLabel2 = new Label( secondaryLabelComposite, SWT.NONE );
        useLabel2.setText( Messages.getString( "HierarchyViewPreferencePage.Use" ) ); //$NON-NLS-1$

        // Label Combo
        secondaryLabelCombo = new Combo( secondaryLabelComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
        secondaryLabelCombo.setLayoutData( new GridData() );
        secondaryLabelCombo.setItems( new String[]
            { FIRST_NAME, ALL_ALIASES, OID } );
        secondaryLabelCombo.setEnabled( true );

        // As label Label
        Label asLabel2 = new Label( secondaryLabelComposite, SWT.NONE );
        asLabel2.setText( Messages.getString( "HierarchyViewPreferencePage.as_secondary_label." ) ); //$NON-NLS-1$

        // Abbreviate row composite
        Composite abbreviateComposite2 = new Composite( secondaryLabelGroup, SWT.NONE );
        gl = new GridLayout( 3, false );
        gl.marginHeight = gl.marginWidth = 0;
        abbreviateComposite2.setLayout( gl );
        gd = new GridData( GridData.FILL_HORIZONTAL );
        gd.horizontalSpan = 1;
        abbreviateComposite2.setLayoutData( gd );

        // Limit label lenght to Label
        secondaryLabelLimitButton = new Button( abbreviateComposite2, SWT.CHECK );
        secondaryLabelLimitButton.setText( Messages
            .getString( "HierarchyViewPreferencePage.Limit_secondary_label_length_to" ) ); //$NON-NLS-1$
        gd = new GridData();
        gd.horizontalSpan = 1;
        secondaryLabelLimitButton.setLayoutData( gd );

        // Lenght Text
        secondaryLabelLengthText = new Text( abbreviateComposite2, SWT.NONE | SWT.BORDER );
        gridData = new GridData();
        gridData.horizontalSpan = 1;
        gridData.widthHint = 9 * 3;
        secondaryLabelLengthText.setLayoutData( gridData );
        secondaryLabelLengthText.setTextLimit( 3 );
        secondaryLabelLengthText.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
                {
View Full Code Here

            public void modifyText( ModifyEvent e )
            {
                dialogChanged();
            }
        } );
        oidField.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "([0-9]*\\.?)*" ) ) //$NON-NLS-1$
                {
View Full Code Here

                defaultOidLabel.setEnabled( defaultOidCheckbox.getSelection() );
                defaultOidText.setEnabled( defaultOidCheckbox.getSelection() );
            }
        } );

        defaultOidText.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "([0-9]*\\.?)*" ) ) //$NON-NLS-1$
                {
View Full Code Here

        GridData gridData = new GridData();
        gridData.horizontalSpan = 1;
        gridData.widthHint = 9 * 3;
        lengthText.setLayoutData( gridData );
        lengthText.setTextLimit( 3 );
        lengthText.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
                {
View Full Code Here

   
    Label lblTimestampFormat = new Label(this, SWT.NONE);
    lblTimestampFormat.setText("Timestamp format: ");
   
    timestampFormatText = new Text(this, SWT.BORDER);
    timestampFormatText.addVerifyListener(new VerifyListener() {
      public void verifyText(VerifyEvent e) {
        if(Character.isAlphabetic(e.character) &&
            !"GyYMwWDdFEuaHkKhmsSzZX".contains(""+e.character))
          e.doit = false;
      }
View Full Code Here

        else
        {
            String[] portHistory = HistoryUtils.load( BrowserCommonConstants.DIALOGSETTING_KEY_PORT_HISTORY );
            portCombo = BaseWidgetUtils.createCombo( groupComposite, portHistory, -1, 2 );
            portCombo.setText( Integer.toString( port ) );
            portCombo.addVerifyListener( new VerifyListener()
            {
                public void verifyText( VerifyEvent e )
                {
                    if ( !e.text.matches( "[0-9]*" ) )
                    {
View Full Code Here

        limitGroup.setLayout( gl );

        // Count limit
        countLimitLabel = BaseWidgetUtils.createLabel( limitGroup, "&Count Limit:", 1 );
        countLimitText = BaseWidgetUtils.createText( limitGroup, "", 1 );
        countLimitText.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "[0-9]*" ) )
                {
                    e.doit = false;
                }
            }
        } );
        countLimitText.addModifyListener( new ModifyListener()
        {
            public void modifyText( ModifyEvent e )
            {
                notifyListeners();
            }
        } );

        // Time limit
        timeLimitLabel = BaseWidgetUtils.createLabel( limitGroup, "&Time Limit:", 1 );
        timeLimitText = BaseWidgetUtils.createText( limitGroup, "", 1 );
        timeLimitText.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "[0-9]*" ) )
                {
View Full Code Here

        foldingThresholdLabel.setEnabled( enableFoldingButton.getSelection() );
        foldingThresholdText = BaseWidgetUtils.createText( pagingGroupComposite, getPreferenceStore().getString(
            BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_FOLDING_THRESHOLD ), 4, 1 );
        foldingThresholdText.setToolTipText( foldingTooltip );
        foldingThresholdText.setEnabled( enableFoldingButton.getSelection() );
        foldingThresholdText.addVerifyListener( new VerifyListener()
        {
            public void verifyText( VerifyEvent e )
            {
                if ( !e.text.matches( "[0-9]*" ) )
                {
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.VerifyListener

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.