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
Answertopia.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 FileFieldEditor


java.lang.Object
  extended by 

org.eclipse.jface.preference.FieldEditor
      extended by 

org.eclipse.jface.preference.StringFieldEditor
          extended by 

org.eclipse.jface.preference.StringButtonFieldEditor
              extended by 
org.eclipse.jface.preference.FileFieldEditor

public class FileFieldEditor
extends StringButtonFieldEditor

A field editor for a file path type preference. A standard file dialog appears when the user presses the change button.


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 FileFieldEditor ()
          Creates a new file field editor
  FileFieldEditor ( String name, String labelText, boolean enforceAbsolute, Composite parent)
          Creates a file field editor.
  FileFieldEditor ( String name, String labelText, boolean enforceAbsolute, int validationStrategy, Composite parent)
          Creates a file field editor.
  FileFieldEditor ( String name, String labelText, Composite parent)
          Creates a file field editor.
 
Method Summary
protected   String changePressed ()
          Notifies that this field editor's change button has been pressed.
protected  boolean checkState ()
          Checks whether the text input field contains a valid value or not.
 void setFileExtensions ( String[] extensions)
          Sets this file field editor's file extension filter.
 
Methods inherited from class org.eclipse.jface.preference. StringButtonFieldEditor
adjustForNumColumns, doFillIntoGrid, getChangeControl, getNumberOfControls, getShell, setChangeButtonText, setEnabled
 
Methods inherited from class org.eclipse.jface.preference. StringFieldEditor
doCheckState, doLoad, doLoadDefault, doStore, getErrorMessage, getStringValue, getTextControl, getTextControl, isEmptyStringAllowed, isValid, refreshValidState, setEmptyStringAllowed, 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

FileFieldEditor

protected FileFieldEditor()
Creates a new file field editor


FileFieldEditor

public FileFieldEditor(
String name,
                       
String labelText,
                       
Composite parent)
Creates a file 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

FileFieldEditor

public FileFieldEditor(
String name,
                       
String labelText,
                       boolean enforceAbsolute,
                       
Composite parent)
Creates a file field editor.

Parameters:
name - the name of the preference this field editor works on
labelText - the label text of the field editor
enforceAbsolute - true if the file path must be absolute, and false otherwise
parent - the parent of the field editor's control

FileFieldEditor

public FileFieldEditor(
String name,
                       
String labelText,
                       boolean enforceAbsolute,
                       int validationStrategy,
                       
Composite parent)
Creates a file field editor.

Parameters:
name - the name of the preference this field editor works on
labelText - the label text of the field editor
enforceAbsolute - true if the file path must be absolute, and false otherwise
validationStrategy - either StringFieldEditor.VALIDATE_ON_KEY_STROKE to perform on the fly checking, or StringFieldEditor.VALIDATE_ON_FOCUS_LOST (the default) to perform validation only after the text has been typed in
parent - the parent of the field editor's control.
Since:
3.4
See Also:
StringFieldEditor.VALIDATE_ON_KEY_STROKE, StringFieldEditor.VALIDATE_ON_FOCUS_LOST
Method Detail

changePressed

protected 
String changePressed()
Description copied from class: StringButtonFieldEditor
Notifies that this field editor's change button has been pressed.

Subclasses must implement this method to provide a corresponding new string for the text field. If the returned value is null, the currently displayed value remains.

Specified by:
changePressed in class StringButtonFieldEditor
Returns:
the new string to display, or null to leave the old string showing

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

setFileExtensions

public void setFileExtensions(
String[] extensions)
Sets this file field editor's file extension filter.

Parameters:
extensions - a list of file extension, or null to set the filter to the system's default value

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