Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.preference
Class IntegerFieldEditor

java.lang.Object
  extended by 

org.eclipse.jface.preference.FieldEditor
      extended by 

org.eclipse.jface.preference.StringFieldEditor
          extended by 
org.eclipse.jface.preference.IntegerFieldEditor

public class IntegerFieldEditor
extends StringFieldEditor

A field editor for an integer type preference.


Field Summary
 
Fields inherited from class org.eclipse.jface.preference. StringFieldEditor
oldValue, UNLIMITED, VALIDATE_ON_FOCUS_LOST, VALIDATE_ON_KEY_STROKE
 
Fields inherited from class org.eclipse.jface.preference. FieldEditor
HORIZONTAL_GAP, IS_VALID, VALUE
 
Constructor Summary
protected IntegerFieldEditor ()
          Creates a new integer field editor
  IntegerFieldEditor ( String name, String labelText, Composite parent)
          Creates an integer field editor.
  IntegerFieldEditor ( String name, String labelText, Composite parent, int textLimit)
          Creates an integer field editor.
 
Method Summary
protected  boolean checkState ()
          Checks whether the text input field contains a valid value or not.
protected  void doLoad ()
          Initializes this field editor with the preference value from the preference store.
protected  void doLoadDefault ()
          Initializes this field editor with the default preference value from the preference store.
protected  void doStore ()
          Stores the preference value from this field editor into the preference store.
 int getIntValue ()
          Returns this field editor's current value as an integer.
 void setValidRange (int min, int max)
          Sets the range of valid values for this field.
 
Methods inherited from class org.eclipse.jface.preference. StringFieldEditor
adjustForNumColumns, doCheckState, doFillIntoGrid, getErrorMessage, getNumberOfControls, getStringValue, getTextControl, getTextControl, isEmptyStringAllowed, isValid, refreshValidState, setEmptyStringAllowed, setEnabled, setErrorMessage, setFocus, setStringValue, setTextLimit, setValidateStrategy, showErrorMessage, valueChanged
 
Methods inherited from class org.eclipse.jface.preference. FieldEditor
applyFont, checkParent, clearErrorMessage, clearMessage, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, createControl, dispose, fillIntoGrid, fireStateChanged, fireValueChanged, getFieldEditorFontName, getLabelControl, getLabelControl, getLabelText, getPage, getPreferenceName, getPreferencePage, getPreferenceStore, init, load, loadDefault, presentsDefaultValue, setButtonLayoutData, setLabelText, setPage, setPreferenceName, setPreferencePage, setPreferenceStore, setPresentsDefaultValue, setPropertyChangeListener, showErrorMessage, showMessage, store
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerFieldEditor

protected IntegerFieldEditor()
Creates a new integer field editor


IntegerFieldEditor

public IntegerFieldEditor(
String name,
                          
String labelText,
                          
Composite parent)
Creates an integer field editor.

Parameters:
name - the name of the preference this field editor works on
labelText - the label text of the field editor
parent - the parent of the field editor's control

IntegerFieldEditor

public IntegerFieldEditor(
String name,
                          
String labelText,
                          
Composite parent,
                          int textLimit)
Creates an integer field editor.

Parameters:
name - the name of the preference this field editor works on
labelText - the label text of the field editor
parent - the parent of the field editor's control
textLimit - the maximum number of characters in the text.
Method Detail

setValidRange

public void setValidRange(int min,
                          int max)
Sets the range of valid values for this field.

Parameters:
min - the minimum allowed value (inclusive)
max - the maximum allowed value (inclusive)

checkState

protected boolean checkState()
Description copied from class: StringFieldEditor
Checks whether the text input field contains a valid value or not.

Overrides:
checkState in class StringFieldEditor
Returns:
true if the field value is valid, and false if invalid

doLoad

protected void doLoad()
Description copied from class: FieldEditor
Initializes this field editor with the preference value from the preference store.

Subclasses must implement this method to properly initialize the field editor.

Overrides:
doLoad in class StringFieldEditor

doLoadDefault

protected void doLoadDefault()
Description copied from class: FieldEditor
Initializes this field editor with the default preference value from the preference store.

Subclasses must implement this method to properly initialize the field editor.

Overrides:
doLoadDefault in class StringFieldEditor

doStore

protected void doStore()
Description copied from class: FieldEditor
Stores the preference value from this field editor into the preference store.

Subclasses must implement this method to save the entered value into the preference store.

Overrides:
doStore in class StringFieldEditor

getIntValue

public int getIntValue()
                throws 
NumberFormatException
Returns this field editor's current value as an integer.

Returns:
the value
Throws:
NumberFormatException - if the String does not contain a parsable integer

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire