rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMatrixItemEditor Class Reference

Matrix Item Editor class. More...

#include <ilviews/gadgets/matrix.h>

Inheritance diagram for IlvMatrixItemEditor:
IlvDefaultMatrixItemEditor

List of all members.

Public Member Functions

 IlvMatrixItemEditor (IlvMatrix *matrix, IlUShort col, IlUShort row)
 Constructor.
virtual void applyTo () const =0
 Is called to apply the editor value into the matrix.
virtual void cancel ()
 Cancels the editing.
IlUShort getColumn () const
 Returns the edited column.
IlvGraphicgetEditorField () const
 Returns the graphic object used to edit.
IlvMatrixgetMatrix () const
 Returns the matrix being edited.
IlUShort getRow () const
 Returns the edited row.
virtual IlBoolean handleEvent (IlvEvent &event)
 Is called by the matrix when an event occurs while editing.
virtual void initFrom () const =0
 Is called to initialize the editor.
virtual void validate ()
 Validates the editing.

Protected Member Functions

void setEditorField (IlvGraphic *g)
 Sets the graphic object used to edit the item.

Detailed Description

Matrix Item Editor class.

Library: ilvadvgdt

The base class for the editors of IlvAbstractMatrixItem objects. A matrix item editor is created through a factory of the class IlvMatrixItemEditorFactory. The editor must call setEditorField from its constructor to set the graphic object that will be used for editing. In most cases, an interactor must be set on this graphic object to call the validate method when the editing is to be finished.

See also:
IlvMatrixItemEditorFactory.

Constructor & Destructor Documentation

IlvMatrixItemEditor::IlvMatrixItemEditor ( IlvMatrix matrix,
IlUShort  col,
IlUShort  row 
)

Constructor.

Parameters:
matrix The matrix where the editor will be used for editing.
col The column of the matrix where the editor will be used for editing.
row The row of the matrix where the editor will be used for editing.

Member Function Documentation

virtual void IlvMatrixItemEditor::applyTo (  )  const [pure virtual]

Is called to apply the editor value into the matrix.

The implementation must change the edited matrix item using the editor field.

See also:
getMatrix, getColumn, getRow.

Implemented in IlvDefaultMatrixItemEditor.

virtual void IlvMatrixItemEditor::cancel (  )  [virtual]

Cancels the editing.

This method should be called by the interactor of the graphic object used for the editing to cancel the editing.

IlUShort IlvMatrixItemEditor::getColumn (  )  const

Returns the edited column.

Returns:
The edited column.
IlvGraphic* IlvMatrixItemEditor::getEditorField (  )  const

Returns the graphic object used to edit.

Returns:
The graphic object used to edit.
IlvMatrix* IlvMatrixItemEditor::getMatrix (  )  const

Returns the matrix being edited.

Returns:
The matrix being edited.
IlUShort IlvMatrixItemEditor::getRow (  )  const

Returns the edited row.

Returns:
The edited row.
virtual IlBoolean IlvMatrixItemEditor::handleEvent ( IlvEvent event  )  [virtual]

Is called by the matrix when an event occurs while editing.

The default implementation handles the IlvEscape to cancel an editing, the IlvReturn key to validate an editing, and some special keys like arrows keys to validate an editing and move the selection in the matrix. Any other event is sent to the interactor of the editor field.

Parameters:
event The event.
Returns:
IlTrue if the event was consumed, IlFalse otherwise.
See also:
getEditorField
virtual void IlvMatrixItemEditor::initFrom (  )  const [pure virtual]

Is called to initialize the editor.

The implementation must initialize the editor field using the data located in the matrix.

See also:
getMatrix, getColumn, getRow.

Implemented in IlvDefaultMatrixItemEditor.

void IlvMatrixItemEditor::setEditorField ( IlvGraphic g  )  [protected]

Sets the graphic object used to edit the item.

The previous graphic object, if any, is deleted.

Parameters:
g The new graphic object.
virtual void IlvMatrixItemEditor::validate (  )  [virtual]

Validates the editing.

This method should be called by the interactor of the graphic object used for the editing to validate the editing.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.