Java Code Examples for org.eclipse.jface.preference.IntegerFieldEditor#setPropertyChangeListener()
The following examples show how to use
org.eclipse.jface.preference.IntegerFieldEditor#setPropertyChangeListener() .
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
Source File: LogViewerPreferences.java From LogViewer with Eclipse Public License 2.0 | 5 votes |
private void createBacklogField(Composite composite) { backlogEditor = new IntegerFieldEditor(ILogViewerConstants.PREF_BACKLOG,LogViewerPlugin.getResourceString("preferences.backlog.label.text"),composite); //$NON-NLS-1$ backlogEditor.setPreferenceStore(doGetPreferenceStore()); backlogEditor.setPage(this); backlogEditor.setTextLimit(Integer.toString(ILogViewerConstants.MAX_BACKLOG).length()); backlogEditor.setErrorMessage(LogViewerPlugin.getResourceString("preferences.backlog.label.errortext",new Object[]{new Integer(ILogViewerConstants.MAX_BACKLOG)})); //$NON-NLS-1$ backlogEditor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); backlogEditor.setValidRange(0,ILogViewerConstants.MAX_BACKLOG); backlogEditor.load(); backlogEditor.setPropertyChangeListener(validityChangeListener); }
Example 2
Source File: LogViewerPreferences.java From LogViewer with Eclipse Public License 2.0 | 5 votes |
private void createReadBufferField(Composite composite) { bufferEditor = new IntegerFieldEditor(ILogViewerConstants.PREF_BUFFER,LogViewerPlugin.getResourceString("preferences.buffer.label.text"),composite); //$NON-NLS-1$ bufferEditor.setPreferenceStore(doGetPreferenceStore()); bufferEditor.setPage(this); bufferEditor.setTextLimit(Integer.toString(ILogViewerConstants.MAX_TAIL_BUFFER_SIZE).length()); bufferEditor.setErrorMessage(LogViewerPlugin.getResourceString("preferences.buffer.label.errortext",new Object[]{new Integer(ILogViewerConstants.MAX_TAIL_BUFFER_SIZE)})); //$NON-NLS-1$ bufferEditor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); bufferEditor.setValidRange(0,ILogViewerConstants.MAX_TAIL_BUFFER_SIZE); bufferEditor.load(); bufferEditor.setPropertyChangeListener(validityChangeListener); }
Example 3
Source File: LogViewerPreferences.java From LogViewer with Eclipse Public License 2.0 | 5 votes |
private void createReadWaitField(Composite composite) { readWaitEditor = new IntegerFieldEditor(ILogViewerConstants.PREF_READWAIT,LogViewerPlugin.getResourceString("preferences.readwait.label.text"),composite); //$NON-NLS-1$ readWaitEditor.setPreferenceStore(doGetPreferenceStore()); readWaitEditor.setPage(this); readWaitEditor.setTextLimit(Integer.toString(ILogViewerConstants.MAX_READWAIT_SIZE).length()); readWaitEditor.setErrorMessage(LogViewerPlugin.getResourceString("preferences.readwait.label.errortext",new Object[]{new Integer(ILogViewerConstants.MAX_READWAIT_SIZE)})); //$NON-NLS-1$ readWaitEditor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); readWaitEditor.setValidRange(0,ILogViewerConstants.MAX_READWAIT_SIZE); readWaitEditor.load(); readWaitEditor.setPropertyChangeListener(validityChangeListener); }
Example 4
Source File: PreviewDataPreferencePage.java From birt with Eclipse Public License 1.0 | 4 votes |
protected Control createContents( Composite parent ) { UIUtil.bindHelp( parent, IHelpContextIds.PREFERENCE_BIRT_PREVIEW_DATA_ID ); Composite cmpTop = new Composite( parent, SWT.NONE ); GridLayout layout = new GridLayout( 1, false ); cmpTop.setLayout( layout ); GridData gd = new GridData( GridData.FILL_HORIZONTAL ); cmpTop.setLayoutData( gd ); createDispalyRowLimitGroup( cmpTop ); // txtMaxRowLevelMember = new IntegerFieldEditor( PREVIEW_MAX_ROW_LEVEL_MEMBER, // Messages.getString( "designer.preview.preference.resultset.maxrowlevelmember.description" ), cmpTop ); //$NON-NLS-1$ // txtMaxRowLevelMember.setPage( this ); // txtMaxRowLevelMember.setValidateStrategy( StringFieldEditor.VALIDATE_ON_KEY_STROKE ); // txtMaxRowLevelMember.setEmptyStringAllowed( false ); // txtMaxRowLevelMember.setPropertyChangeListener( new IPropertyChangeListener( ) { // // public void propertyChange( PropertyChangeEvent event ) // { // if ( event.getProperty( ).equals( FieldEditor.IS_VALID ) ) // setValid( txtMaxRowLevelMember.isValid( ) ); // } // } ); // // txtMaxColumnLevelMember = new IntegerFieldEditor( PREVIEW_MAX_COLUMN_LEVEL_MEMBER, // Messages.getString( "designer.preview.preference.resultset.maxcolumnlevelmember.description" ), cmpTop ); //$NON-NLS-1$ // txtMaxColumnLevelMember.setPage( this ); // txtMaxColumnLevelMember.setValidateStrategy( StringFieldEditor.VALIDATE_ON_KEY_STROKE ); // txtMaxColumnLevelMember.setEmptyStringAllowed( false ); // txtMaxColumnLevelMember.setPropertyChangeListener( new IPropertyChangeListener( ) { // // public void propertyChange( PropertyChangeEvent event ) // { // if ( event.getProperty( ).equals( FieldEditor.IS_VALID ) ) // setValid( txtMaxColumnLevelMember.isValid( ) ); // } // } ); txtMaxInMemoryCubeSize = new IntegerFieldEditor( PREVIEW_MAX_IN_MEMORY_CUBE_SIZE, Messages.getString( "designer.preview.preference.resultset.maxinmemorycubesize.description" ), cmpTop ); //$NON-NLS-1$ txtMaxInMemoryCubeSize.setPage( this ); txtMaxInMemoryCubeSize.setValidateStrategy( StringFieldEditor.VALIDATE_ON_KEY_STROKE ); txtMaxInMemoryCubeSize.setEmptyStringAllowed( false ); txtMaxInMemoryCubeSize.setPropertyChangeListener( new IPropertyChangeListener( ) { public void propertyChange( PropertyChangeEvent event ) { if ( event.getProperty( ).equals( FieldEditor.IS_VALID ) ) setValid( txtMaxInMemoryCubeSize.isValid( ) ); } } ); initControlValues( ); return cmpTop; }