LibreOffice LibreOffice 25.8 SDK API Reference

Included Services | Exported Interfaces | Public Attributes | List of all members
GridControl Service Referencepublished

specifies a model for a control which can display form data in a table-like way. More...

`import"GridControl.idl";`

Inheritance diagram for GridControl:

## Included Services
service | com::sun::star::form::FormControlModel
service | com::sun::star::form::FormComponents
| provides basic functionality of a container of com::sun::star::form::FormComponents. More...
Included Services inherited from FormControlModel
service | com::sun::star::awt::UnoControlModel
service | com::sun::star::form::FormComponent
Included Services inherited from UnoControlModel
service | com::sun::star::awt::UnoControlDialogElement
| This service is present when the control model is embedded in an UnoControlDialogModel. More...

## Exported Interfaces
interface | com::sun::star::form::XGridColumnFactory
| allows to create column models to be inserted into the control model. More...
interface | com::sun::star::view::XSelectionSupplier
| gives access to the currently selection. More...
interface | com::sun::star::form::XReset
| resets the control. More...
Exported Interfaces inherited from FormControlModel
interface | com::sun::star::beans::XFastPropertySet
| This optional interface gives an efficient access to all properties at once or an ability to set more than one property at once. More...
interface | com::sun::star::beans::XPropertyState
| This optional interface gives access to the state of the properties, e.g. More...
Exported Interfaces inherited from UnoControlModel
interface | com::sun::star::awt::XControlModel
interface | com::sun::star::lang::XComponent
interface | com::sun::star::beans::XPropertySet
interface | com::sun::star::beans::XMultiPropertySet
interface | com::sun::star::io::XPersistObject
interface | com::sun::star::util::XCloneable
Exported Interfaces inherited from FormComponent
interface | com::sun::star::form::XFormComponent
| identifies the component as a candidate for being part of a form. More...
interface | com::sun::star::lang::XComponent
| allows life-time control of form components. More...
interface | com::sun::star::container::XNamed
| Each FormComponent must supply a name for identification. More...
interface | com::sun::star::beans::XPropertySet
| gives access to the properties. More...
interface | com::sun::star::io::XPersistObject
| Each FormComponent must be able to be stored into and read from a stream. More...
interface | com::sun::star::beans::XPropertyBag
| allows to associate arbitrary properties with the form component More...
Exported Interfaces inherited from XPropertyBag
interface | com::sun::star::beans::XPropertySet
interface | com::sun::star::beans::XPropertyContainer
interface | com::sun::star::beans::XPropertyAccess
Exported Interfaces inherited from FormComponents
interface | com::sun::star::container::XContainer
| allows to register listeners to be notified of changes in the container. More...
interface | com::sun::star::container::XNameContainer
| allows to add/remove elements by name. More...
interface | com::sun::star::container::XIndexContainer
| gives access to the elements by index. More...
interface | com::sun::star::container::XEnumerationAccess
| creates an enumeration of the elements. More...
interface | com::sun::star::script::XEventAttacherManager
| This interface has to be implemented to supply the scripting environment for the contained components. More...

## Public Attributes
short | Border
| returns the border style of the control. More...
long | BorderColor
| specifies the color of the border, if present More...
boolean | Enabled
| determines whether the control is enabled or disabled. More...
com::sun::star::awt::FontDescriptor | FontDescriptor
| contains the font attributes of the text in the control. More...
long | RowHeight
| specifies the height of a row of the grid. More...
boolean | Tabstop
| determines whether the control can be reached by the tabulator key. More...
com::sun::star::util::Color | TextColor
| specifies the text color (RGB) of the control. More...
Public Attributes inherited from FormControlModel
short | ClassId
| specifies the ID for classification of the component. More...
short | TabIndex
| determines the relative taborder of the control associated with the model. More...
string | Tag
| used for additional information. More...
Public Attributes inherited from UnoControlModel
string | DefaultControl
| specifies the service name of the default control for this model. More...
Public Attributes inherited from FormComponent
string | Name
| the name of the component. More...

## Additional Inherited Members
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More...
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object. More...
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list. More...
Public Member Functions inherited from XPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value of the property with the specified name. More...
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XPropertyChangeListener to the specified property. More...
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XPropertyChangeListener from the listener list. More...
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XVetoableChangeListener to the specified property with the name PropertyName. More...
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XVetoableChangeListener from the listener list. More...
Public Member Functions inherited from XMultiPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValues ([in] sequence< string > aPropertyNames, [in] sequence< any > aValues) raises ( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the values to the properties with the specified names. More...
sequence< any > | getPropertyValues ([in] sequence< string > aPropertyNames)
void | addPropertiesChangeListener ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener)
| adds an XPropertiesChangeListener to the specified property with the specified names. More...
void | removePropertiesChangeListener ([in] com::sun::star::beans::XPropertiesChangeListener xListener)
| removes an XPropertiesChangeListener from the listener list. More...
void | firePropertiesChangeEvent ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener)
| fires a sequence of PropertyChangeEvents to the specified listener. More...
Public Member Functions inherited from XPersistObject
string | getServiceName ()
| gives the service name of the object More...
void | write ([in] com::sun::star::io::XObjectOutputStream OutStream) raises ( com::sun::star::io::IOException )
| writes all the persistent data of the object to the stream. More...
void | read ([in] com::sun::star::io::XObjectInputStream InStream) raises ( com::sun::star::io::IOException )
| reads all the persistent data of the object from the stream. More...
Public Member Functions inherited from XCloneable
com::sun::star::util::XCloneable | createClone ()
| creates a copy of the object. More...
Public Member Functions inherited from XChild
com::sun::star::uno::XInterface | getParent ()
| grants access to the object containing this content. More...
void | setParent ([in] com::sun::star::uno::XInterface Parent) raises ( com::sun::star::lang::NoSupportException )
| sets the parent to this object. More...
Public Member Functions inherited from XNamed
string | getName ()
void | setName ([in] string aName)
| sets the programmatic name of the object. More...
Public Member Functions inherited from XContainer
void | addContainerListener ([in] com::sun::star::container::XContainerListener xListener)
| adds the specified listener to receive events when elements are inserted or removed. More...
void | removeContainerListener ([in] com::sun::star::container::XContainerListener xListener)
| removes the specified listener so it does not receive any events from this container. More...
Public Member Functions inherited from XNameContainer
void | insertByName ([in] string aName, [in] any aElement) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException, com::sun::star::lang::WrappedTargetException )
| inserts the given element at the specified name. More...
void | removeByName ([in] string Name) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
| removes the element with the specified name. More...
Public Member Functions inherited from XNameReplace
void | replaceByName ([in] string aName, [in] any aElement) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
| replaces the element with the specified name with the given element. More...
Public Member Functions inherited from XNameAccess
any | getByName ([in] string aName) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
sequence< string > | getElementNames ()
boolean | hasByName ([in] string aName)
Public Member Functions inherited from XElementAccess
type | getElementType ()
boolean | hasElements ()
Public Member Functions inherited from XIndexContainer
void | insertByIndex ([in] long Index, [in] any Element) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IndexOutOfBoundsException, com::sun::star::lang::WrappedTargetException )
| inserts the given element at the specified index. More...
void | removeByIndex ([in] long Index) raises ( com::sun::star::lang::IndexOutOfBoundsException, com::sun::star::lang::WrappedTargetException )
| removes the element at the specified index. More...
Public Member Functions inherited from XIndexReplace
void | replaceByIndex ([in] long Index, [in] any Element) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IndexOutOfBoundsException, com::sun::star::lang::WrappedTargetException )
| replaces the element at the specified index with the given element. More...
Public Member Functions inherited from XIndexAccess
long | getCount ()
any | getByIndex ([in] long Index) raises ( com::sun::star::lang::IndexOutOfBoundsException, com::sun::star::lang::WrappedTargetException )
Public Member Functions inherited from XEnumerationAccess
com::sun::star::container::XEnumeration | createEnumeration ()
Public Member Functions inherited from XEventAttacherManager
void | registerScriptEvent ([in] long nIndex, [in] com::sun::star::script::ScriptEventDescriptor aScriptEvent) raises ( com::sun::star::lang::IllegalArgumentException )
| registers one event for an object identified by its index. More...
void | registerScriptEvents ([in] long nIndex, [in] sequence< com::sun::star::script::ScriptEventDescriptor > aScriptEvents) raises ( com::sun::star::lang::IllegalArgumentException )
| registers several events for an object identified by its index. More...
void | revokeScriptEvent ([in] long nIndex, [in] string aListenerType, [in] string aEventMethod, [in] string aRemoveListenerParam) raises ( com::sun::star::lang::IllegalArgumentException )
| revokes the registration of an event. More...
void | revokeScriptEvents ([in] long nIndex) raises ( com::sun::star::lang::IllegalArgumentException )
| revokes all events which are registered for the given index. More...
void | insertEntry ([in] long nIndex) raises ( com::sun::star::lang::IllegalArgumentException )
| creates an empty entry at the given position. More...
void | removeEntry ([in] long nIndex) raises ( com::sun::star::lang::IllegalArgumentException )
| removes the entry at the given position. More...
sequence< com::sun::star::script::ScriptEventDescriptor > | getScriptEvents ([in] long Index) raises ( com::sun::star::lang::IllegalArgumentException )
void | attach ([in] long nIndex, [in] com::sun::star::uno::XInterface xObject, [in] any aHelper) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::ServiceNotRegisteredException )
| attaches all the ScriptEvents which are registered for the given index to the given object. More...
void | detach ([in] long nIndex, [in] com::sun::star::uno::XInterface xObject) raises ( com::sun::star::lang::IllegalArgumentException )
| detaches all the ScriptEvents from the given object which are registered at this object for the given index. More...
void | addScriptListener ([in] com::sun::star::script::XScriptListener xListener) raises ( com::sun::star::lang::IllegalArgumentException )
| adds an XScriptListener that will be notified when an event takes place. More...
void | removeScriptListener ([in] com::sun::star::script::XScriptListener Listener) raises ( com::sun::star::lang::IllegalArgumentException )
| removes a XScriptListener from the listener list. More...
Public Member Functions inherited from XGridColumnFactory
com::sun::star::beans::XPropertySet | createColumn ([in] string aColumnType) raises ( com::sun::star::lang::IllegalArgumentException )
| creates a new column object More...
sequence< string > | getColumnTypes ()
| returns a list of available column types. More...
Public Member Functions inherited from XSelectionSupplier
boolean | select ([in] any xSelection) raises ( com::sun::star::lang::IllegalArgumentException )
| selects the object represented by xSelection if it is known and selectable in this object. More...
any | getSelection ()
void | addSelectionChangeListener ([in] com::sun::star::view::XSelectionChangeListener xListener)
| registers an event listener, which is called when the selection changes. More...
void | removeSelectionChangeListener ([in] com::sun::star::view::XSelectionChangeListener xListener)
| unregisters an event listener which was registered with XSelectionSupplier::addSelectionChangeListener(). More...
Public Member Functions inherited from XReset
void | reset ()
| resets a component to some default value. More...
void | addResetListener ([in] com::sun::star::form::XResetListener aListener)
| adds the specified listener to receive events related to resetting the component. More...
void | removeResetListener ([in] com::sun::star::form::XResetListener aListener)
| removes the specified listener More...
Protected Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...
Protected Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More...
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object. More...
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list. More...
Protected Member Functions inherited from XPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value of the property with the specified name. More...
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XPropertyChangeListener to the specified property. More...
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XPropertyChangeListener from the listener list. More...
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XVetoableChangeListener to the specified property with the name PropertyName. More...
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XVetoableChangeListener from the listener list. More...
Protected Member Functions inherited from XMultiPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValues ([in] sequence< string > aPropertyNames, [in] sequence< any > aValues) raises ( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the values to the properties with the specified names. More...
sequence< any > | getPropertyValues ([in] sequence< string > aPropertyNames)
void | addPropertiesChangeListener ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener)
| adds an XPropertiesChangeListener to the specified property with the specified names. More...
void | removePropertiesChangeListener ([in] com::sun::star::beans::XPropertiesChangeListener xListener)
| removes an XPropertiesChangeListener from the listener list. More...
void | firePropertiesChangeEvent ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener)
| fires a sequence of PropertyChangeEvents to the specified listener. More...
Protected Member Functions inherited from XPersistObject
string | getServiceName ()
| gives the service name of the object More...
void | write ([in] com::sun::star::io::XObjectOutputStream OutStream) raises ( com::sun::star::io::IOException )
| writes all the persistent data of the object to the stream. More...
void | read ([in] com::sun::star::io::XObjectInputStream InStream) raises ( com::sun::star::io::IOException )
| reads all the persistent data of the object from the stream. More...
Protected Member Functions inherited from XCloneable
com::sun::star::util::XCloneable | createClone ()
| creates a copy of the object. More...
Protected Member Functions inherited from XPropertyContainer
void | addProperty ([in] string Name, [in] short Attributes, [in] any DefaultValue) raises ( com::sun::star::beans::PropertyExistException, com::sun::star::beans::IllegalTypeException, com::sun::star::lang::IllegalArgumentException )
| adds a property to the object. More...
void | removeProperty ([in] string Name) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::NotRemoveableException )
| removes a property from the object. More...
Protected Member Functions inherited from XPropertyAccess
sequence< com::sun::star::beans::PropertyValue > | getPropertyValues ()
void | setPropertyValues ([in] sequence< com::sun::star::beans::PropertyValue > aProps) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the values of given properties. More...
Protected Member Functions inherited from XFastPropertySet
void | setFastPropertyValue ([in] long nHandle, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value to the property with the specified name. More...
any | getFastPropertyValue ([in] long nHandle) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
Protected Member Functions inherited from XPropertyState
com::sun::star::beans::PropertyState | getPropertyState ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException )
sequence< com::sun::star::beans::PropertyState > | getPropertyStates ([in] sequence< string > aPropertyName) raises ( com::sun::star::beans::UnknownPropertyException )
void | setPropertyToDefault ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException )
| Sets the property to default value. More...
any | getPropertyDefault ([in] string aPropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
Protected Attributes inherited from UnoControlDialogElement
long | Height
| specifies the height of the control. More...
string | Name
| specifies the name of the control. More...
string | PositionX
| specifies the horizontal position of the control. More...
string | PositionY
| specifies the vertical position of the control. More...
long | Step
| specifies the step of the control. More...
short | TabIndex
| specifies the tabindex of the control. More...
string | Tag
| specifies the tag of the control. More...
long | Width
| specifies the width of the control. More...

## Detailed Description

specifies a model for a control which can display form data in a table-like way.

In opposite to other form controls, grid controls do not only display the single current value of a column they are bound to. Moreover, they do display not only the current row of the form, but all rows (at least potentially, limited by the control size, of course).

The table rows in a grid control correspond to the rows in the DataForm the control belongs to, and the columns correspond to single columns of the form's row set.

Columns of a grid control are modeled by own objects, too. They are very similar to usual com::sun::star::form::DataAwareControlModels modeling other "single-value" controls, but they are not described as own services. Instead, they need to be created using the com::sun::star::form::XGridColumnFactory interface.

## Exported Interfaces

## ◆ com::sun::star::form::FormComponents

service com::sun::star::form::FormComponents

provides basic functionality of a container of com::sun::star::form::FormComponents.

All the container-related methods of this service related to control models, this is what are the container elements for a GridControl.

As the com::sun::star::form::FormComponents service also specifies the com::sun::star::script::XEventAttacherManager service, grid control models also provide a scripting environment for their columns.

## ◆ com::sun::star::form::FormControlModel

service com::sun::star::form::FormControlModel

## Exported Interfaces

## ◆ com::sun::star::form::XGridColumnFactory

interface com::sun::star::form::XGridColumnFactory

allows to create column models to be inserted into the control model.

Note that the object returned by the com::sun::star::form::XGridColumnFactory::createColumn() method is not part of the grid control, yet. It needs to be inserted using any of the container interfaces.

You always need to use this interface for creating columns for the grid control. Column models not created this way will not be accepted when inserted later on.

## ◆ com::sun::star::form::XReset

interface com::sun::star::form::XReset

resets the control.

The reset of the control is forwarded to all its elements, means to all the column models. As grid columns are very much like data-aware stand-alone controls, you can find a description of the reset functionality in com::sun::star::form::DataAwareControlModel::XReset.

## ◆ com::sun::star::view::XSelectionSupplier

interface com::sun::star::view::XSelectionSupplier

gives access to the currently selection.

In a grid control, single columns can be selected (at most one at a time).
For various unfortunate reasons, this selection is an aspect of the model, not of the control as you would expect.

This interface is deprecated, new implementations should not use it anymore, as it is to be superseded by a solution which is bound to the control, not the model.

Deprecated:

## Member Data Documentation

## ◆ Border

short Border
| property

returns the border style of the control.

    0: No border
    1: 3D border
    2: simple border

## ◆ BorderColor

long BorderColor
| optional property

specifies the color of the border, if present

Not every border style (see Border) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting.

Since
  OOo 2.0

## ◆ Enabled

boolean Enabled
| property

determines whether the control is enabled or disabled.

## ◆ FontDescriptor

com::sun::star::awt::FontDescriptor FontDescriptor
| property

contains the font attributes of the text in the control.

## ◆ RowHeight

long RowHeight
| property

specifies the height of a row of the grid.

If the value is set to `NULL`, the height is determined automatically according to the current font used.

See also
  GridControl::FontDescriptor

## ◆ Tabstop

boolean Tabstop
| property

determines whether the control can be reached by the tabulator key.

## ◆ TextColor

com::sun::star::util::Color TextColor
| property

specifies the text color (RGB) of the control.

The documentation for this service was generated from the following file:

- com/sun/star/form/component/GridControl.idl