Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Field gadget class. More...
#include <ilviews/dataccess/gadgets/dbfield.h>
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 IliFormat & | f_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 IliInputMask & | f_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 IliValue & | f_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. | |
IlvFont * | getLabelFont () const |
Returns the label font. | |
IlvColor * | getLabelForeground () const |
Returns the foreground color of the label. | |
const IlvPoint & | getLabelPosition () const |
Returns the position of the label. | |
IliDbFieldStyle | getStyle () const |
Returns the current style of the DbField gadget. | |
IliFieldItf * | getSubField () |
Returns the internal IliFieldItf object that implements the current DbField style. | |
const IliFieldItf * | getSubField () 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. |
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
.
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.
display | The display. | |
rect | The location. | |
style | The style. | |
thickness | The border thickness. | |
palette | The palette. |
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.
IlTrue
if successful. Reimplemented from IliFieldItf.
virtual void IliDbField::f_enableCompletion | ( | IlBoolean | ) | [virtual] |
Sets the completion property of the field.
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.
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] |
virtual const IliFormat& IliDbField::f_getFormat | ( | ) | const [virtual] |
Returns the format used to derive the external representation of the field from its internal value.
Reimplemented from IliFieldItf.
virtual const char* IliDbField::f_getLabel | ( | ) | const [virtual] |
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.
Reimplemented from IliFieldItf.
virtual IlShort IliDbField::f_getMaxLength | ( | ) | const [virtual] |
Returns the maximum length allowed for the external representation of the field.
Reimplemented from IliFieldItf.
Returns the value of the field.
internal | If IlTrue , the returned value does not necessarily reflect the state of the field as the user sees it. |
Reimplemented from IliFieldItf.
virtual IlBoolean IliDbField::f_hasLabel | ( | ) | const [virtual] |
Returns IlTrue
if the field gadget can display a label.
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.
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.
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.
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.
align | The alignment. |
Reimplemented from IliFieldItf.
virtual void IliDbField::f_setConstrained | ( | IlBoolean | flag | ) | [virtual] |
Sets the constrained property of the field.
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.
name | The column name. |
Reimplemented from IliFieldItf.
Sets the foreign table of the field.
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.
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.
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.
flag | The input-modified attribute. |
Reimplemented from IliFieldItf.
virtual void IliDbField::f_setLabel | ( | const char * | label | ) | [virtual] |
virtual void IliDbField::f_setMask | ( | const IliInputMask & | msk | ) | [virtual] |
virtual void IliDbField::f_setMaxLength | ( | IlShort | vmax | ) | [virtual] |
Sets the maximum length allowed for the external representation of the field.
vmax | The maximum length. |
Reimplemented from IliFieldItf.
virtual void IliDbField::f_setReadOnly | ( | IlBoolean | flag | ) | [virtual] |
Sets the read-only property for the field.
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.
val | The value. | |
internal | If IlFalse , then the external representation and the display of the field are automatically updated. |
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.
count | The row count. |
Reimplemented from IliFieldItf.
IlvFont* IliDbField::getLabelFont | ( | ) | const |
Returns the label font.
IlvColor* IliDbField::getLabelForeground | ( | ) | const |
Returns the foreground color of the label.
const IlvPoint& IliDbField::getLabelPosition | ( | ) | const |
Returns the position of the label.
IliDbFieldStyle IliDbField::getStyle | ( | ) | const |
Returns the current style of the DbField gadget.
IliFieldItf* IliDbField::getSubField | ( | ) |
Returns the internal IliFieldItf
object that implements the current DbField style.
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.
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.
font | The font. |
void IliDbField::setLabelForeground | ( | IlvColor * | color | ) |
Sets the foreground color of the label.
color | The foreground color. |
void IliDbField::setLabelPosition | ( | const IlvPoint & | pos | ) |
Sets the position of the label.
pos | The position. |
virtual void IliDbField::setStyle | ( | IliDbFieldStyle | style | ) | [virtual] |
Sets the style of the DbField gadget.
style | The new style. |
© 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.