rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliDbField Class Reference

Field gadget class. More...

#include <ilviews/dataccess/gadgets/dbfield.h>

Inheritance diagram for IliDbField:
IlvGadget IliFieldItf IlvSimpleGraphic IlvGraphic

List of all members.

Public Member Functions

 IliDbField (IlvDisplay *display, const IlvRect &rect, IliDbFieldStyle style=IliEntryFieldStyle, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes a DbField gadget that initially resembles an entry field.
virtual IlBoolean f_complete ()
 Updates the internal value of the field, according to its current external representation and its foreign table, provided completion is enabled for the field.
virtual void f_enableCompletion (IlBoolean)
 Sets the completion property of the field.
virtual IlBoolean f_externalToInternal ()
 Updates the internal value of a field according to its current external representation.
virtual IlvAlignment f_getAlignment () const
 Returns the text alignment of the field.
virtual const IliFormatf_getFormat () const
 Returns the format used to derive the external representation of the field from its internal value.
virtual const char * f_getLabel () const
 Returns the label displayed by the field gadget.
virtual const IliInputMaskf_getMask () const
 Returns the input mask used to edit values in the field.
virtual IlShort f_getMaxLength () const
 Returns the maximum length allowed for the external representation of the field.
virtual const IliValuef_getValue (IlBoolean internalP=IlFalse) const
 Returns the value of the field.
virtual IlBoolean f_hasLabel () const
 Returns IlTrue if the field gadget can display a label.
virtual void f_internalToExternal ()
 Updates the external representation of the field and its display according to its current internal value.
virtual IlBoolean f_isConsistent () const
 Returns IlTrue if the internal value of the field corresponds to its current external representation.
virtual IlBoolean f_isInputModified () const
 Returns IlTrue if the external representation has been edited by the end-user.
virtual IlBoolean f_isReadOnly () const
 Returns IlTrue if the field is read-only.
virtual void f_selectTextForAppend ()
 Deselects all the text and positions the editing caret at the end of the text, provided the field gadget supports text selection.
virtual void f_selectTextForOverwrite ()
 Selects all the text, provided the field gadget supports text selection.
virtual void f_setAlignment (IlvAlignment pos)
 Sets the text alignment of the field.
virtual void f_setConstrained (IlBoolean)
 Sets the constrained property of the field.
virtual void f_setForeignDisplayColumnName (const char *)
 Sets the name of the column of the foreign table that will serve as a result, when the table is used as a map to convert internal values into external representations.
virtual void f_setForeignTable (IliTable *, IlBoolean owner=IlFalse)
 Sets the foreign table of the field.
virtual void f_setForeignValueColumnName (const char *)
 Sets the name of the column of the foreign table that will serve as a key, when the table is used as a map to convert internal values into external representations.
virtual void f_setFormat (const IliFormat &)
 Sets the format used to derive the external representation of the field from its internal value.
virtual void f_setInputModified (IlBoolean f)
 Sets the input-modified attribute of the field.
virtual void f_setLabel (const char *)
 Sets the label of the field gadget.
virtual void f_setMask (const IliInputMask &)
 Sets the input mask.
virtual void f_setMaxLength (IlShort)
 Sets the maximum length allowed for the external representation of the field.
virtual void f_setReadOnly (IlBoolean f)
 Sets the read-only property for the field.
virtual IlBoolean f_setValue (const IliValue &, IlBoolean internalP=IlFalse)
 Sets the value of the field.
virtual void f_setVisibleRowsCount (IlInt)
 Sets the number of rows to be displayed when the foreign table is displayed.
IlvFontgetLabelFont () const
 Returns the label font.
IlvColorgetLabelForeground () const
 Returns the foreground color of the label.
const IlvPointgetLabelPosition () const
 Returns the position of the label.
IliDbFieldStyle getStyle () const
 Returns the current style of the DbField gadget.
IliFieldItfgetSubField ()
 Returns the internal IliFieldItf object that implements the current DbField style.
const IliFieldItfgetSubField () const
 Returns the internal IliFieldItf object that implements the current DbField style.
void putLabelAtLeft ()
 Changes the position of the label so that it appears to the left of the gadget.
void putLabelOnTop ()
 Changes the position of the label so that it appears above the gadget.
void setLabelFont (IlvFont *font)
 Sets the label font.
void setLabelForeground (IlvColor *color)
 Sets the foreground color of the label.
void setLabelPosition (const IlvPoint &pos)
 Sets the position of the label.
virtual void setStyle (IliDbFieldStyle style)
 Sets the style of the DbField gadget.

Detailed Description

Field gadget class.

Library: dbgadget

The IliDbField class defines gadgets that can dynamically change their look and feel. An IliDbField has the following properties: A style that determines the look and feel of the gadget. It may be one of the following values:

A label that will be displayed near the gadget. The label can be positioned anywhere unless the style is either IliToggleStyle or IliToggleSelectorStyle.

See also:
IliEntryField, IliDbFieldStyle.

Constructor & Destructor Documentation

IliDbField::IliDbField ( IlvDisplay display,
const IlvRect rect,
IliDbFieldStyle  style = IliEntryFieldStyle,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Initializes a DbField gadget that initially resembles an entry field.

Parameters:
display The display.
rect The location.
style The style.
thickness The border thickness.
palette The palette.

Member Function Documentation

virtual IlBoolean IliDbField::f_complete (  )  [virtual]

Updates the internal value of the field, according to its current external representation and its foreign table, provided completion is enabled for the field.

For more information on completion, see the f_iscompletionEnabled member function.

Returns:
IlTrue if successful.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_enableCompletion ( IlBoolean   )  [virtual]

Sets the completion property of the field.

Parameters:
flag If IlTrue, the completion property is on.

Reimplemented from IliFieldItf.

virtual IlBoolean IliDbField::f_externalToInternal (  )  [virtual]

Updates the internal value of a field according to its current external representation.

Returns:
IlTrue if successful and IlFalse otherwise. Note that this may fail due to the fact that not all external representations can be converted to a value object. For example, this is especially true for text fields that are used to edit numeric or date values.

Reimplemented from IliFieldItf.

virtual IlvAlignment IliDbField::f_getAlignment (  )  const [virtual]

Returns the text alignment of the field.

Returns:
The alignment.

Reimplemented from IliFieldItf.

virtual const IliFormat& IliDbField::f_getFormat (  )  const [virtual]

Returns the format used to derive the external representation of the field from its internal value.

Returns:
The format.

Reimplemented from IliFieldItf.

virtual const char* IliDbField::f_getLabel (  )  const [virtual]

Returns the label displayed by the field gadget.

Returns:
The label.

Reimplemented from IliFieldItf.

virtual const IliInputMask& IliDbField::f_getMask (  )  const [virtual]

Returns the input mask used to edit values in the field.

Currently, the classes that take into account the input mask are: IliEntryField and its subclasses.

Returns:
The mask.

Reimplemented from IliFieldItf.

virtual IlShort IliDbField::f_getMaxLength (  )  const [virtual]

Returns the maximum length allowed for the external representation of the field.

Returns:
The maximum.

Reimplemented from IliFieldItf.

virtual const IliValue& IliDbField::f_getValue ( IlBoolean  internal = IlFalse  )  const [virtual]

Returns the value of the field.

Parameters:
internal If IlTrue, the returned value does not necessarily reflect the state of the field as the user sees it.
Returns:
The value.

Reimplemented from IliFieldItf.

virtual IlBoolean IliDbField::f_hasLabel (  )  const [virtual]

Returns IlTrue if the field gadget can display a label.

Returns:
IlTrue if the field gadget can display a label.

Reimplemented from IliFieldItf.

virtual IlBoolean IliDbField::f_isConsistent (  )  const [virtual]

Returns IlTrue if the internal value of the field corresponds to its current external representation.

A return value of IlFalse means that the external representation of the field has been edited by the end-user since the last time one of the member functions, f_setValue, f_externalToInternal, f_internalToExternal or f_complete was successfully called.

Returns:
IlTrue if the internal value of the field corresponds to its current external representation.

Reimplemented from IliFieldItf.

virtual IlBoolean IliDbField::f_isInputModified (  )  const [virtual]

Returns IlTrue if the external representation has been edited by the end-user.

Returns:
IlTrue if the external representation has been edited by the end-user since the last time one of the member functions, f_setValue, f_externalToInternal, f_internalToExternal, or f_complete was successfully called.

Reimplemented from IliFieldItf.

virtual IlBoolean IliDbField::f_isReadOnly (  )  const [virtual]

Returns IlTrue if the field is read-only.

Returns:
IlTrue if the field is read-only.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setAlignment ( IlvAlignment  align  )  [virtual]

Sets the text alignment of the field.

Parameters:
align The alignment.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setConstrained ( IlBoolean  flag  )  [virtual]

Sets the constrained property of the field.

Parameters:
flag If IlTrue the constrained property is on.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setForeignDisplayColumnName ( const char *  name  )  [virtual]

Sets the name of the column of the foreign table that will serve as a result, when the table is used as a map to convert internal values into external representations.

Parameters:
name The column name.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setForeignTable ( IliTable tbl,
IlBoolean  owner = IlFalse 
) [virtual]

Sets the foreign table of the field.

Parameters:
tbl The table.
owner Determines whether the field will own the table.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setForeignValueColumnName ( const char *  name  )  [virtual]

Sets the name of the column of the foreign table that will serve as a key, when the table is used as a map to convert internal values into external representations.

Parameters:
name The column name.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setFormat ( const IliFormat fmt  )  [virtual]

Sets the format used to derive the external representation of the field from its internal value.

Parameters:
fmt The format.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setInputModified ( IlBoolean  flag  )  [virtual]

Sets the input-modified attribute of the field.

This member function is presented here for completeness. However, it should be used with care since it may cause the field, and other related components, to be in error with regard to the current state of the field.

Parameters:
flag The input-modified attribute.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setLabel ( const char *  label  )  [virtual]

Sets the label of the field gadget.

Parameters:
label The label.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setMask ( const IliInputMask msk  )  [virtual]

Sets the input mask.

Parameters:
msk The mask.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setMaxLength ( IlShort  vmax  )  [virtual]

Sets the maximum length allowed for the external representation of the field.

Parameters:
vmax The maximum length.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setReadOnly ( IlBoolean  flag  )  [virtual]

Sets the read-only property for the field.

Parameters:
flag The read-only flag.

Reimplemented from IliFieldItf.

virtual IlBoolean IliDbField::f_setValue ( const IliValue val,
IlBoolean  internal = IlFalse 
) [virtual]

Sets the value of the field.

Parameters:
val The value.
internal If IlFalse, then the external representation and the display of the field are automatically updated.
Returns:
IlTrue if successful, and IlFalse otherwise.

Reimplemented from IliFieldItf.

virtual void IliDbField::f_setVisibleRowsCount ( IlInt  count  )  [virtual]

Sets the number of rows to be displayed when the foreign table is displayed.

Parameters:
count The row count.

Reimplemented from IliFieldItf.

IlvFont* IliDbField::getLabelFont (  )  const

Returns the label font.

Returns:
The label font.
IlvColor* IliDbField::getLabelForeground (  )  const

Returns the foreground color of the label.

Returns:
The foreground color of the label.
const IlvPoint& IliDbField::getLabelPosition (  )  const

Returns the position of the label.

Returns:
The position of the label.
IliDbFieldStyle IliDbField::getStyle (  )  const

Returns the current style of the DbField gadget.

Returns:
The current style.
IliFieldItf* IliDbField::getSubField (  ) 

Returns the internal IliFieldItf object that implements the current DbField style.

Returns:
The internal IliFieldItf object that implements the current DbField style. If the style is IliEntryFieldStyle, this member function returns an IliEntryField gadget, if the style is IliDbTextStyle it returns an IliDbText gadget, and so on.
const IliFieldItf* IliDbField::getSubField (  )  const

Returns the internal IliFieldItf object that implements the current DbField style.

Returns:
The internal IliFieldItf object that implements the current DbField style. If the style is IliEntryFieldStyle, this member function returns an IliEntryField gadget, if the style is IliDbTextStyle it returns an IliDbText gadget, and so on.
void IliDbField::setLabelFont ( IlvFont font  ) 

Sets the label font.

Parameters:
font The font.
void IliDbField::setLabelForeground ( IlvColor color  ) 

Sets the foreground color of the label.

Parameters:
color The foreground color.
void IliDbField::setLabelPosition ( const IlvPoint pos  ) 

Sets the position of the label.

Parameters:
pos The position.
virtual void IliDbField::setStyle ( IliDbFieldStyle  style  )  [virtual]

Sets the style of the DbField gadget.

Parameters:
style The new style.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.