Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.dialogs.datatableview
Class NullCapableFieldPrompt

java.lang.Object
  extended by com.ibm.etools.iseries.rse.ui.dialogs.datatableview.NullCapableFieldPrompt
Direct Known Subclasses:
HexFieldPrompt

public class NullCapableFieldPrompt
extends Object

Class NullCapableFieldPrompt: Provide a widget which combines a Text entry field with a trailing button to toggle a null value state for the field, disabling (and blanking) the text part when null. For prompting for database fields with ALWNULL DDS keyword. It was simpler to setup this class for both standard fields and ALWNULL fields, from the point of view of the callers. Further decided to link in the the ISeriesDataTableColumnAdapter instance, to be able to directly link to it's data type validation from calls to here. Further decided to link in the Dialog instance calling this, so that the validity checks here and on column adapter can call the setErrorMesage() and setPageComplete() in the dialog. (And set up the common parent dialog class ISeriesDataTableViewPromptDialog for the 2 dialogs which use this class.)


Field Summary
static String copyright
           
protected  boolean limitExceeded
           
protected  String savedValue
           
protected  Text text
           
 
Constructor Summary
NullCapableFieldPrompt(Composite parent, ISeriesDataTableColumnAdapter col, ISeriesDataTableViewPromptDialog dialog)
           
 
Method Summary
 void addModifyListener()
           
protected  void createInnerComposite(Composite composite)
           
static NullCapableFieldPrompt fieldPromptFactory(Composite parent, ISeriesDataTableColumnAdapter col, ISeriesDataTableViewPromptDialog dialog)
           
 Control getPromptControl()
           
 String getText()
           
 Text getTextControl()
           
static int getWidthHint(int charLength, Drawable control)
           
 boolean hasKeyValue()
           
 boolean isSet()
          Considered set if a value is entered or NULL is toggled on.
protected  void resetLimitExceeded()
           
 void setCanBeEmptyPartialKey(boolean canBeEmptyPartialKey)
           
 void setNull()
           
 void setPromptToolTip(String tip)
           
 void setText(String s)
           
 void setTextLimit(int limit)
           
 void signalLimitExceeded()
           
 SystemMessage validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

text

protected Text text

savedValue

protected String savedValue

limitExceeded

protected boolean limitExceeded
Constructor Detail

NullCapableFieldPrompt

public NullCapableFieldPrompt(Composite parent,
                              ISeriesDataTableColumnAdapter col,
                              ISeriesDataTableViewPromptDialog dialog)
Method Detail

fieldPromptFactory

public static NullCapableFieldPrompt fieldPromptFactory(Composite parent,
                                                        ISeriesDataTableColumnAdapter col,
                                                        ISeriesDataTableViewPromptDialog dialog)

createInnerComposite

protected void createInnerComposite(Composite composite)

getWidthHint

public static int getWidthHint(int charLength,
                               Drawable control)

setNull

public void setNull()

addModifyListener

public void addModifyListener()

setText

public void setText(String s)

setTextLimit

public void setTextLimit(int limit)

setPromptToolTip

public void setPromptToolTip(String tip)

getText

public String getText()

getPromptControl

public Control getPromptControl()

getTextControl

public Text getTextControl()

validate

public SystemMessage validate()

hasKeyValue

public boolean hasKeyValue()

signalLimitExceeded

public void signalLimitExceeded()

resetLimitExceeded

protected void resetLimitExceeded()

isSet

public boolean isSet()
Considered set if a value is entered or NULL is toggled on.

Returns:

setCanBeEmptyPartialKey

public void setCanBeEmptyPartialKey(boolean canBeEmptyPartialKey)
Parameters:
canBeEmptyPartialKey - the canBeEmptyPartialKey to set

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.