本文整理匯總了Java中org.eclipse.jface.preference.IntegerFieldEditor.setEmptyStringAllowed方法的典型用法代碼示例。如果您正苦於以下問題:Java IntegerFieldEditor.setEmptyStringAllowed方法的具體用法?Java IntegerFieldEditor.setEmptyStringAllowed怎麽用?Java IntegerFieldEditor.setEmptyStringAllowed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.preference.IntegerFieldEditor
的用法示例。
在下文中一共展示了IntegerFieldEditor.setEmptyStringAllowed方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createIntegerFieldEditor
import org.eclipse.jface.preference.IntegerFieldEditor; //導入方法依賴的package包/類
protected IntegerFieldEditor createIntegerFieldEditor(final String name, final String label, final Composite parent, final FieldEditorDetails details) {
final IntegerFieldEditor fieldEditor = new IntegerFieldEditor(name, label, parent);
if (details != null) {
if (details.getEmptyStringAllowed() != null) {
fieldEditor.setEmptyStringAllowed(details.getEmptyStringAllowed());
}
if (details.getNumberMinimum() != null && details.getNumberMaximum() != null) {
fieldEditor.setValidRange(details.getNumberMinimum().intValue(), details.getNumberMaximum().intValue());
fieldEditor.setTextLimit(Math.max(Integer.toString(details.getNumberMaximum().intValue()).length(), Integer.toString(details.getNumberMinimum().intValue()).length()));
}
if (details.getTextLimit() != null) {
fieldEditor.setTextLimit(details.getTextLimit());
}
}
return fieldEditor;
}
示例2: createFieldEditors
import org.eclipse.jface.preference.IntegerFieldEditor; //導入方法依賴的package包/類
/**
* Creates the field editors. Field editors are abstractions of
* the common GUI blocks needed to manipulate various types
* of preferences. Each field editor knows how to save and
* restore itself.
*/
@Override
public void createFieldEditors() {
Composite parent = getFieldEditorParent();
String valueString = EnsembleProperties.getProperty(P_TEMPLATE_PLAN_URI_EDITABLE);
if (valueString == null || Boolean.FALSE != Boolean.parseBoolean(valueString)) {
addField(new StringFieldEditor(P_TEMPLATE_PLAN_URI, "Template plan URI", parent));
}
addField(new BooleanFieldEditor(P_CHECK_CUSTODIAN, "Check custodian when saving", parent));
addField(new BooleanFieldEditor(P_CROSS_EDITOR_SELECTIONS, "Share selections across editors", parent));
Label reorderByTimeLabel=new Label(parent, SWT.None);
reorderByTimeLabel.setText("Reorder by time usually uses the start time of an activity \nor activity group unless the duration in hours is longer than large plan item duration.");
GridData reorderByTimeLayout = new GridData();
reorderByTimeLayout.horizontalSpan=2;
reorderByTimeLabel.setLayoutData(reorderByTimeLayout);
IntegerFieldEditor reorderByTimeField=new IntegerFieldEditor(P_WATERFALL_LARGE_ELEMENT_DURATION_IN_HOURS, "", parent);
reorderByTimeField.setLabelText("Large Plan Item Duration");
reorderByTimeField.setEmptyStringAllowed(false);
reorderByTimeField.setValidRange(0, 10000);
addField(reorderByTimeField);
}
示例3: createFieldEditors
import org.eclipse.jface.preference.IntegerFieldEditor; //導入方法依賴的package包/類
/**
* Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself.
*/
@Override
public void createFieldEditors ()
{
final IntegerFieldEditor fieldEditor = new IntegerFieldEditor ( PreferenceConstants.P_DEFAULT_CHUNK_SIZE, "&Default chunk size:", getFieldEditorParent () );
fieldEditor.setEmptyStringAllowed ( false );
fieldEditor.setValidRange ( 1, Integer.MAX_VALUE );
fieldEditor.setValidateStrategy ( StringFieldEditor.VALIDATE_ON_KEY_STROKE );
addField ( fieldEditor );
}
示例4: createFieldEditors
import org.eclipse.jface.preference.IntegerFieldEditor; //導入方法依賴的package包/類
/**
* Add the ZAP preferences to the preferences page.
*/
@Override
protected void createFieldEditors() {
FileFieldEditor zapJarLocation = new FileFieldEditor(ZAP_JAR_LOCATION, "ZAP JAR Location:",
getFieldEditorParent());
zapJarLocation.setEmptyStringAllowed(false);
addField(zapJarLocation);
DirectoryFieldEditor zapSessionDirectory = new DirectoryFieldEditor(ZAP_SESSION_DIRECTORY,
"ZAP Session Directory", getFieldEditorParent());
zapSessionDirectory.setEmptyStringAllowed(false);
addField(zapSessionDirectory);
StringFieldEditor zapSessionName = new StringFieldEditor(ZAP_SESSION_NAME, "ZAP Session Name",
getFieldEditorParent());
zapSessionName.setEmptyStringAllowed(false);
addField(zapSessionName);
IntegerFieldEditor zapProxyPort = new IntegerFieldEditor(ZAP_PROXY_PORT, "ZAP Proxy Port:",
getFieldEditorParent());
zapProxyPort.setValidRange(0, 99999);
zapProxyPort.setEmptyStringAllowed(false);
addField(zapProxyPort);
StringFieldEditor zapApiKey = new StringFieldEditor(ZAP_API_KEY, "ZAP API Key", getFieldEditorParent());
zapApiKey.setEmptyStringAllowed(false);
addField(zapApiKey);
}
示例5: createFieldEditors
import org.eclipse.jface.preference.IntegerFieldEditor; //導入方法依賴的package包/類
@Override
protected void createFieldEditors() {
BooleanFieldEditor markersEnabled = new BooleanFieldEditor(MARKERS_ENABLED, "Enable Markers and Quick-fixes", getFieldEditorParent());
addField(markersEnabled);
IntegerFieldEditor runtime = new IntegerFieldEditor(RUNTIME, "Time for EvoSuite to improve code coverage (s)", getFieldEditorParent());
runtime.setEmptyStringAllowed(false);
runtime.setValidRange(0, Integer.MAX_VALUE);
addField(runtime);
IntegerFieldEditor roamtime = new IntegerFieldEditor(ROAMTIME, "Inactive time before other classes will be tested (s)", getFieldEditorParent());
addField(roamtime);
BooleanFieldEditor uncoveredLines = new BooleanFieldEditor(UNCOVERED_MARKER, "Show lines EvoSuite couldn't cover", getFieldEditorParent());
addField(uncoveredLines);
BooleanFieldEditor removedLines = new BooleanFieldEditor(REMOVED_MARKER, "Show lines the compiler may have removed", getFieldEditorParent());
addField(removedLines);
BooleanFieldEditor auto = new BooleanFieldEditor(AUTOMATIC_TEST_ON_SAVE, "Automatic test on save", getFieldEditorParent());
addField(auto);
BooleanFieldEditor cleanupImports = new BooleanFieldEditor(ORGANIZE_IMPORTS, "Organize imports", getFieldEditorParent());
addField(cleanupImports);
BooleanFieldEditor printComments = new BooleanFieldEditor(TEST_COMMENTS, "Print test comments", getFieldEditorParent());
addField(printComments);
}
示例6: createContents
import org.eclipse.jface.preference.IntegerFieldEditor; //導入方法依賴的package包/類
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;
}