Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.ui.builders
Class TextFieldBuilder

java.lang.Object
  extended by oracle.javatools.ui.builders.TextFieldBuilder


public final class TextFieldBuilder
extends java.lang.Object

A builder of TextFields. Intruct the builder what kind of text field is required, call build() and the builder will return a BuiltTextField containing the UI and helper methods for accessing the text field.


Constructor Summary
TextFieldBuilder()
           

 

Method Summary
 BuiltTextField build()
          Construct a text field according to the previously given specifications
 void setColumns(int columns)
          Set the number of characters wide the text field should be
 void setCompletion(java.util.Collection<java.lang.String> completions)
          Supply strings that will be used to populate a helper popup to aid the user to complete the text field entry
 void setCompletion(CompletionProvider completionProvider)
          Supply a completion provider to populate a popup that helps the user complete the text field entry
 void setEditable(boolean editable)
          Set whether the text field is editable
 void setEnabled(boolean enabled)
          set whether the text field is enabled
 void setExpands(boolean expands)
          Set whether the field will expand when it has focus to display text that is too large for its regular size.
 void setHint(java.lang.String hint)
          Set a hint that appears below the text field
 void setLabel(java.lang.String label)
          Tell the builder to build a label for the text field with the given string This is more useful that constructing a label separately as the label should enable and disable in sync with the field.
 void setPrompt(java.lang.String prompt)
          Set a prompt that appears in the field when it is empty as an indicator of what to enter, or the purpose of the field (e.g.
 void setText(java.lang.String text)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

TextFieldBuilder

public TextFieldBuilder()

Method Detail

build

public BuiltTextField build()
Construct a text field according to the previously given specifications
Returns:
a BuiltTextField containing the UI

setText

public void setText(java.lang.String text)
Parameters:
text - the initial text in the field

setLabel

public void setLabel(java.lang.String label)
Tell the builder to build a label for the text field with the given string This is more useful that constructing a label separately as the label should enable and disable in sync with the field. The builder takes care of doing this automatically.

If building a form type layout then the label can be extracted via builtComponent.getLabel() and added to the form in the correctly aligned position.

Parameters:
label - the label for the field

setHint

public void setHint(java.lang.String hint)
Set a hint that appears below the text field
Parameters:
hint -

setPrompt

public void setPrompt(java.lang.String prompt)
Set a prompt that appears in the field when it is empty as an indicator of what to enter, or the purpose of the field (e.g. "Search")
Parameters:
prompt -

setExpands

public void setExpands(boolean expands)
Set whether the field will expand when it has focus to display text that is too large for its regular size.
Parameters:
expands -

setEditable

public void setEditable(boolean editable)
Set whether the text field is editable
Parameters:
editable -

setEnabled

public void setEnabled(boolean enabled)
set whether the text field is enabled
Parameters:
enabled -

setColumns

public void setColumns(int columns)
Set the number of characters wide the text field should be
Parameters:
columns -

setCompletion

public void setCompletion(CompletionProvider completionProvider)
Supply a completion provider to populate a popup that helps the user complete the text field entry
Parameters:
completionProvider -

setCompletion

public void setCompletion(java.util.Collection<java.lang.String> completions)
Supply strings that will be used to populate a helper popup to aid the user to complete the text field entry
Parameters:
completions - a collection of completions for the popup

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.