<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Misheto</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Misheto"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Misheto"/>
	<updated>2026-08-12T17:27:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=165648</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=165648"/>
		<updated>2010-04-30T13:45:46Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
There are some new features regarding background, text, header and line color coming with milestone 3. So it&amp;#039;s possible to have e.g. green headers, blue background color and red text. Default value for background color is white and for header color is grey. Default value for line color is the color of background, so the lines aren&amp;#039;t visible. Default text color is black. There is also the possibility to set a second color for background(use property &amp;quot;EvenRowBackgroundColor&amp;quot;) so that the rows will have alternating colors.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
 //features coming with integration of milestone 3&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;LineColor&amp;quot;, 0x000000); //black lines&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;HeaderBackgroundColor&amp;quot;, 0x00AA00);//green headers&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;RowBackgroundColor&amp;quot;, 0x0000CC);//blue odd rows&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;EvenRowBackgroundColor&amp;quot;, 0x00CC00);//green even rows&lt;br /&gt;
 //vertical alignemnet is for all cells the same&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;VerticalAlign&amp;quot;, com.sun.star.style.VerticalAlignment.BOTTOM);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TextColor&amp;quot;, 0xAA0000);//red text&lt;br /&gt;
 //for gaining the focus on TAB key stroke&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Tabstop&amp;quot;, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XGridControl methods&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 some new methods for handling selections are introduced. For more information please visit: &lt;br /&gt;
&lt;br /&gt;
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/grid/XGridControl.html&lt;br /&gt;
&lt;br /&gt;
(Note: The wiki page will be updated after the milestone is integrated).&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to set a tooltip using setToolTip(String[] text, int[] cols). The first parameter shows some fixed text, which can be e.g. some information about the content of the column. If you don&amp;#039;t want to use it, leave the array empty. The second parameter is the array containing the column numbers, which content should be shown in the tooltip. If both parameters are empty arrays, then the tooltip will contain the text of the cell where the mouse cursor currently is.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //content col1: &amp;lt;cont1&amp;gt;&lt;br /&gt;
 //content col2: &amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setToolTip(new String{&amp;quot;content col1: &amp;quot;, &amp;quot;content col2: &amp;quot;}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //&amp;lt;cont1&amp;gt;&lt;br /&gt;
 //&amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setToolTip(new String{}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnListener ===&lt;br /&gt;
The XGridColumnListener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || 110517 || fixed in m3 ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || 110518 || fixed in m3 || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || 110492 || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || 110521 || fixed in m3 ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || 110519 || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || 110520 || fixed in m3 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=165647</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=165647"/>
		<updated>2010-04-30T13:44:11Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
There are some new features regarding background, text, header and line color coming with milestone 3. So it&amp;#039;s possible to have e.g. green headers, blue background color and red text. Default value for background color is white and for header color is grey. Default value for line color is the color of background, so the lines aren&amp;#039;t visible. Default text color is black. There is also the possibility to set a second color for background(use property &amp;quot;EvenRowBackgroundColor&amp;quot;) so that the rows will have alternating colors.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
 //features coming with integration of milestone 3&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;LineColor&amp;quot;, 0x000000); //black lines&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;HeaderBackgroundColor&amp;quot;, 0x00AA00);//green headers&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;RowBackgroundColor&amp;quot;, 0x0000CC);//blue odd rows&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;EvenRowBackgroundColor&amp;quot;, 0x00CC00);//green even rows&lt;br /&gt;
 //vertical alignemnet is for all cells the same&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;VerticalAlign&amp;quot;, com.sun.star.style.VerticalAlignment.BOTTOM);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TextColor&amp;quot;, 0xAA0000);//red text&lt;br /&gt;
 //for gaining the focus on TAB key stroke&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Tabstop&amp;quot;, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XGridControl methods&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 some new methods for handling selections are introduced. For more information please visit: &lt;br /&gt;
&lt;br /&gt;
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/grid/XGridControl.html&lt;br /&gt;
&lt;br /&gt;
(Note: The wiki page will be updated after the milestone is integrated).&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to set a tooltip using setToolTip(String[] text, int[] cols). The first parameter shows some fixed text, which can be e.g. some information about the content of the column. If you don&amp;#039;t want to use it, leave the array empty. The second parameter is the array containing the column numbers, which content should be shown in the tooltip. If both parameters are empty arrays, then the tooltip will contain the text of the cell where the mouse cursor currently is.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //content col1: &amp;lt;cont1&amp;gt;&lt;br /&gt;
 //content col2: &amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setToolTip(new String{&amp;quot;content col1: &amp;quot;, &amp;quot;content col2: &amp;quot;}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //&amp;lt;cont1&amp;gt;&lt;br /&gt;
 //&amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setToolTip(new String{}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnListener ===&lt;br /&gt;
The XGridColumnListener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || 110517 || fixed in m3 ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || 110518 || fixed in m3 || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || 110492 || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || 110521 || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || 110519 || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || 110520 || fixed in m3 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161878</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161878"/>
		<updated>2010-03-31T12:12:37Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
There are some new features regarding background, text, header and line color coming with milestone 3. So it&amp;#039;s possible to have e.g. grey headers, blue background color and red text. Default value for background and header color is white. Default value for line color is the color of background, so the lines aren&amp;#039;t visible. Default text color is black. There is also the possibility to set a second color for background(use property &amp;quot;EvenRowBackgroundColor&amp;quot;) so that the rows will have alternating colors.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
 //features coming with integration of milestone 3&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;LineColor&amp;quot;, 0x000000); //black lines&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;HeaderBackgroundColor&amp;quot;, 0xCCCCCC);//grey headers&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;RowBackgroundColor&amp;quot;, 0x0000CC);//blue odd rows&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;EvenRowBackgroundColor&amp;quot;, 0x00CC00);//green even rows&lt;br /&gt;
 //vertical alignemnet is for all cells the same&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;VerticalAlign&amp;quot;, com.sun.star.style.VerticalAlignment.BOTTOM);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TextColor&amp;quot;, 0xAA0000);//red text&lt;br /&gt;
 //for gaining the focus on TAB key stroke&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Tabstop&amp;quot;, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XGridControl methods&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 some new methods for handling selections are introduced. For more information please visit: &lt;br /&gt;
&lt;br /&gt;
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/grid/XGridControl.html&lt;br /&gt;
&lt;br /&gt;
(Note: The wiki page will be updated after the milestone is integrated).&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to set a tooltip using setToolTip(String[] text, int[] cols). The first parameter shows some fixed text, which can be e.g. some information about the content of the column. If you don&amp;#039;t want to use it, leave the array empty. The second parameter is the array containing the column numbers, which content should be shown in the tooltip. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //content col1: &amp;lt;cont1&amp;gt;&lt;br /&gt;
 //content col2: &amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setToolTip(new String{&amp;quot;content col1: &amp;quot;, &amp;quot;content col2: &amp;quot;}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //&amp;lt;cont1&amp;gt;&lt;br /&gt;
 //&amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setToolTip(new String{}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnListener ===&lt;br /&gt;
The XGridColumnListener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || 110517 || fixed in m3 ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || 110518 || fixed in m3 || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || 110492 || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || 110521 || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || 110519 || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || 110520 || fixed in m3 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161867</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161867"/>
		<updated>2010-03-31T10:35:57Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
There are some new features regarding background, text, header and line color coming with milestone 3. So it&amp;#039;s possible to have e.g. grey headers, blue background color and red text. Default value for background and header color is white. Default value for line color is the color of background, so the lines aren&amp;#039;t visible. Default text color is black. There is also the possibility to set a second color for background(use property &amp;quot;EvenRowBackgroundColor&amp;quot;) so that the rows will have alternating colors.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
 //features coming with integration of milestone 3&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;LineColor&amp;quot;, 0x000000); //black lines&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;HeaderBackgroundColor&amp;quot;, 0xCCCCCC);//grey headers&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;RowBackgroundColor&amp;quot;, 0x0000CC);//blue odd rows&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;EvenRowBackgroundColor&amp;quot;, 0x00CC00);//green even rows&lt;br /&gt;
 //vertical alignemnet is for all cells the same&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;VerticalAlign&amp;quot;, com.sun.star.style.VerticalAlignment.BOTTOM);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TextColor&amp;quot;, 0xAA0000);//red text&lt;br /&gt;
 //for gaining the focus on TAB key stroke&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Tabstop&amp;quot;, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XGridControl methods&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 some new methods for handling selections are introduced. For more information please visit: &lt;br /&gt;
&lt;br /&gt;
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/grid/XGridControl.html&lt;br /&gt;
&lt;br /&gt;
(Note: The wiki page will be updated after the milestone is integrated).&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to set a tooltip using setToolTip(String[] text, int[] cols). The first parameter shows some fixed text, which can be e.g. some information about the content of the column. If you don&amp;#039;t want to use it, leave the array empty. The second parameter is the array containing the column numbers, which content should be shown in the tooltip. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //content col1: &amp;lt;cont1&amp;gt;&lt;br /&gt;
 //content col2: &amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setToolTip(new String{&amp;quot;content col1: &amp;quot;, &amp;quot;content col2: &amp;quot;}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //&amp;lt;cont1&amp;gt;&lt;br /&gt;
 //&amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setToolTip(new String{}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnListener ===&lt;br /&gt;
The XGridColumnListener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed in m3 ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed in m3 || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed in m3 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161797</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161797"/>
		<updated>2010-03-31T09:47:27Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
There are some new features regarding background, text, header and line color coming with milestone 3. So it&amp;#039;s possible to have e.g. grey headers, blue background color and red text. Default value for background and header color is white. Default value for line color is the color of background, so the lines aren&amp;#039;t visible. Default text color is black. There is also the possibility to set a second color for background(use property &amp;quot;EvenRowBackgroundColor&amp;quot;) so that the rows will have alternating colors.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
 //features coming with integration of milestone 3&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;LineColor&amp;quot;, 0x000000); //black lines&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;HeaderBackgroundColor&amp;quot;, 0xCCCCCC);//grey headers&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;RowBackgroundColor&amp;quot;, 0x0000CC);//blue odd rows&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;EvenRowBackgroundColor&amp;quot;, 0x00CC00);//green even rows&lt;br /&gt;
 //vertical alignemnet is for all cells the same&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;VerticalAlign&amp;quot;, com.sun.star.style.VerticalAlignment.BOTTOM);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TextColor&amp;quot;, 0xAA0000);//red text&lt;br /&gt;
 //for gaining the focus on TAB key stroke&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Tabstop&amp;quot;, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XGridControl methods&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 some new methods for handling selections are introduced. For more information please visit: &lt;br /&gt;
&lt;br /&gt;
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/grid/XGridControl.html&lt;br /&gt;
&lt;br /&gt;
(Note: The wiki page will be updated after the milestone is integrated).&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s also possible to set a tooltip using setTooltip(String[] text, int[] cols). The first parameter shows some fixed text, which can be e.g. some information about the content of the column. If you don&amp;#039;t want to use it, leave the array empty. The second parameter is the array containing the column numbers, which content should be shown in the tooltip. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //content col1: &amp;lt;cont1&amp;gt;&lt;br /&gt;
 //content col2: &amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setTooltip(new String{&amp;quot;content col1: &amp;quot;, &amp;quot;content col2: &amp;quot;}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 //sets tooltip with output:&lt;br /&gt;
 //&amp;lt;cont1&amp;gt;&lt;br /&gt;
 //&amp;lt;cont2&amp;gt;&lt;br /&gt;
 xGrid.setTooltip(new String{&amp;quot;&amp;quot;}, new int{0, 1});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnListener ===&lt;br /&gt;
The XGridColumnListener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed in m3 ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed in m3 || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed in m3 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161783</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161783"/>
		<updated>2010-03-31T08:34:05Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* XGridColumnLisener */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
There are some new features regarding background, text, header and line color coming with milestone 3. So it&amp;#039;s possible to have e.g. grey headers, blue background color and red text. Default value for background and header color is white. Default value for line color is the color of background, so the lines aren&amp;#039;t visible. Default text color is black. There is also the possibility to set a second color for background(use property &amp;quot;EvenRowBackgroundColor&amp;quot;) so that the rows will have alternating colors.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
 //features coming with integration of milestone 3&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;LineColor&amp;quot;, 0x000000); //black lines&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;HeaderBackgroundColor&amp;quot;, 0xCCCCCC);//grey headers&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;RowBackgroundColor&amp;quot;, 0x0000CC);//blue odd rows&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;EvenRowBackgroundColor&amp;quot;, 0x00CC00);//green even rows&lt;br /&gt;
 //vertical alignemnet is for all cells the same&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;VerticalAlign&amp;quot;, com.sun.star.style.VerticalAlignment.BOTTOM);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TextColor&amp;quot;, 0xAA0000);//red text&lt;br /&gt;
 //for gaining the focus on TAB key stroke&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Tabstop&amp;quot;, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnListener ===&lt;br /&gt;
The XGridColumnListener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed in m3 ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed in m3 || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed in m3 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161777</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161777"/>
		<updated>2010-03-31T08:22:00Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
There are some new features regarding background, text, header and line color coming with milestone 3. So it&amp;#039;s possible to have e.g. grey headers, blue background color and red text. Default value for background and header color is white. Default value for line color is the color of background, so the lines aren&amp;#039;t visible. Default text color is black. There is also the possibility to set a second color for background(use property &amp;quot;EvenRowBackgroundColor&amp;quot;) so that the rows will have alternating colors.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
 //features coming with integration of milestone 3&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;LineColor&amp;quot;, 0x000000); //black lines&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;HeaderBackgroundColor&amp;quot;, 0xCCCCCC);//grey headers&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;RowBackgroundColor&amp;quot;, 0x0000CC);//blue odd rows&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;EvenRowBackgroundColor&amp;quot;, 0x00CC00);//green even rows&lt;br /&gt;
 //vertical alignemnet is for all cells the same&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;VerticalAlign&amp;quot;, com.sun.star.style.VerticalAlignment.BOTTOM);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TextColor&amp;quot;, 0xAA0000);//red text&lt;br /&gt;
 //for gaining the focus on TAB key stroke&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Tabstop&amp;quot;, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed in m3 ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed in m3 || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed in m3||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed in m3 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161705</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161705"/>
		<updated>2010-03-30T15:58:33Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
There are some new features regarding background, text, header and line color coming with milestone 3. So it&amp;#039;s possible to have e.g. grey headers, blue background color and red text. Default value for background and header color is white. Default value for line color is the color of background, so the lines aren&amp;#039;t visible. Default text color is black. There is also the possibility to set a second color for background(use property &amp;quot;EvenRowBackgroundColor&amp;quot;) so that the rows will have alternating colors.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
 //features coming with integration of milestone 3&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;LineColor&amp;quot;, 0x000000); //black lines&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;HeaderBackgroundColor&amp;quot;, 0xCCCCCC);//grey headers&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;RowBackgroundColor&amp;quot;, 0x0000CC);//blue odd rows&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;EvenRowBackgroundColor&amp;quot;, 0x00CC00);//green even rows&lt;br /&gt;
 //vertical alignemnet is for all cells the same&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;VerticalAlign&amp;quot;, com.sun.star.style.VerticalAlignment.BOTTOM);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TextColor&amp;quot;, 0xAA0000);//red text&lt;br /&gt;
 //for gaining the focus on TAB key stroke&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Tabstop&amp;quot;, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161704</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161704"/>
		<updated>2010-03-30T15:39:55Z</updated>

		<summary type="html">&lt;p&gt;Misheto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In milestone 3 a new method - XGridColumn copyColumn(XGridColumn xColumn) - was added. It&amp;#039;s a convient way to define more columns, which are copies of existing ones. See example:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
 //xColumn3 will be the same as colum1:with same title, width, alignment and not resizable&lt;br /&gt;
 XGridColumn xColumn3 = xGridColumnModel.copyColumn(column1);&lt;br /&gt;
 //set new title&lt;br /&gt;
 xColumn3.setTitle(&amp;quot;Column3&amp;quot;);&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
 xGridColumnModel.addColumn(column3);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The main change in milestone 3 regarding DataModel is the possibility to add not only text but also images. That&amp;#039;s why addRow-method has as second parameter no more string array but object array. Futher supported types are int, double, float.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
 Object oGraphicProvider = xMultiComponentFactory.createInstanceWithContext(&amp;quot;com.sun.star.graphic.GraphicProvider&amp;quot;, m_xContext);&lt;br /&gt;
 XGraphicProvider xGraphicProvider = (XGraphicProvider)     UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);&lt;br /&gt;
 // create the graphic object&lt;br /&gt;
 PropertyValue[] aPropertyValues = new PropertyValue[1];&lt;br /&gt;
 PropertyValue aPropertyValue = new PropertyValue();&lt;br /&gt;
 aPropertyValue.Name = &amp;quot;URL&amp;quot;;&lt;br /&gt;
 aPropertyValue.Value = &amp;quot;file:///c:/myimages/testimage.png&amp;quot;;&lt;br /&gt;
 aPropertyValues[0] = aPropertyValue;&lt;br /&gt;
 XGraphic xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new Object[]{xGraphic, &amp;quot;1,2&amp;quot;, 1.3});&lt;br /&gt;
 //one row which contains only text&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new Object[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;, &amp;quot;1,3&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161703</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161703"/>
		<updated>2010-03-30T15:07:39Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Example */  (checkpoint save)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
In milestone 3 there are some new features regarding columns. Now it is possible  to set width for column, horizontal alignment for the content and define whether a column should be resizeable(default value is true).  &lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
 column1.setColumnWidth(15);&lt;br /&gt;
 column1.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.LEFT);&lt;br /&gt;
 //this column shouldn&amp;#039;t be resizeable&lt;br /&gt;
 column1.setResizeable(false);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
 column2.setColumnWidth(10);&lt;br /&gt;
 column2.setHorizontalAlign(com.sun.star.style.HorizontalAlignment.RIGHT);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161697</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161697"/>
		<updated>2010-03-30T14:13:47Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Event Handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the columns of the grid control. The listener will be invoked by the column.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object column =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, this.context);&lt;br /&gt;
XGridColumn xGridColumn = (XGridColumn) UnoRuntime.queryInterface( XGridColumn.class, column);&lt;br /&gt;
&lt;br /&gt;
xGridColumn.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161696</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161696"/>
		<updated>2010-03-30T14:06:12Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || not yet fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161695</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161695"/>
		<updated>2010-03-30T14:05:50Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || fixed || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || fixed ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161693</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=161693"/>
		<updated>2010-03-30T13:55:34Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Planned Iteration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || 2010-04-30 || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | ready for QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
* Background, align, text settings&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=DomainDeveloper&amp;diff=152556</id>
		<title>DomainDeveloper</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=DomainDeveloper&amp;diff=152556"/>
		<updated>2009-12-14T15:07:24Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Developers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A mapping of names to OOo accounts.&lt;br /&gt;
&lt;br /&gt;
Abbrev.:&lt;br /&gt;
&lt;br /&gt;
* PL : Project Lead&lt;br /&gt;
* CL : Project Co-Lead&lt;br /&gt;
* CC : Community Council Member&lt;br /&gt;
* ESC : Engineering Steering Committee Member &lt;br /&gt;
* CVS : has write access to the OOo CVS repository&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Developers ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name || CVS || @openoffice.org || [[IRC Communication]] || Notes || Affiliation&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Agerskov|Claus Agerskov]]||   || cs||Agerskov, cagerskov||PL Project Management Tool ([http://oopm.openoffice.org oopm])||AgerCon&lt;br /&gt;
|-&lt;br /&gt;
| Volker Ahrendt|| X || va||||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Kai Ahrens|| X || ka || Kai_Ahrens ||PL Graphic Applications||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Rail Aliev || X  || rail || rail ||  Ru and Tr NL Co-lead || Infra-Resource &lt;br /&gt;
|-&lt;br /&gt;
| Gene Anaya||   || ganaya||||||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:JoostAndrae|Joost Andrae]]|| X || ja||ja_||CL qa, release testing en-US builds and releasing/uploading builds and releases||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ericb|Eric Bachard]] || X || ericb||ericb2|| PL Education, Mac OSX/Linux PPC port and vcl/impress hacker || [http://education.openoffice.org Education project], unaffiliated&lt;br /&gt;
|-&lt;br /&gt;
| Kai Backman||  || kaib ||KaiB||||&lt;br /&gt;
|-&lt;br /&gt;
| Sascha Ballach|| X || sab||||||&lt;br /&gt;
|-&lt;br /&gt;
| Jayant Balraj Madavi||   || jayant_madavi||aZEN_JM||Connectivity / Database||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Jörg Barfurth|| X || jb||JoergB||Configuration Util||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Omer Bar-or|| X || cremlae||cremlae||Mac porting||Google Summer of Code&lt;br /&gt;
|-&lt;br /&gt;
| Mathias Bauer|| X || mba||||PL Writer, CL Framework, XML||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Thorsten Behrens|| X || thb||thorsten||vcl/impress/toolkit visionary||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Thomas Benisch|| X || tbe||||Scripting framework||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Stephan Bergmann|| X || sb||||CL UDK||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Andreas Bille|| X || abi||||||&lt;br /&gt;
|-&lt;br /&gt;
| Éric Bischoff|| X || ebischoff||ebischoff||KDE A/B driver||Bureau Cornavin&lt;br /&gt;
|-&lt;br /&gt;
| Nick Blievers|| X || nick||||IRIX||&lt;br /&gt;
|-&lt;br /&gt;
| Daniel Boelzle|| X || dbo||||UNO core/bridges/packages||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Oliver Bolte|| X || obo||||RE||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Cedricbosdo|Cédric Bosdonnat]]|| X || cedricbosdo || cbosdonnat || Writer Filters, ooeclipse integration || Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Rafaella Braconi||   || coni||Rafaella ||PL l10n, Globalization Program Manager||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Michael Brauer|| X || mib||||PL XML||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Oliver Braun|| X || obr||obr||System Integration/Accessibility Hacker||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Andreas Bregas|| X || ab||||StarBasic||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Jörg Brunsmann||   || jbrunsmann||||UDK||&lt;br /&gt;
|-&lt;br /&gt;
| Jörg Budischewski||   || jbu||PyUNO hacker||||&lt;br /&gt;
|-&lt;br /&gt;
| Peter Burow|| X  || pb||plumbumm||UI||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Aidan Butler||   || aidan||||XML filters||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ScottCarr|Scott Carr]] || X  || kcarr||kcarr||PL Documentation||Progbits&lt;br /&gt;
|-&lt;br /&gt;
| Giuseppe Castagno || X || beppec56 || beppec56_  or beppe_c || PDF output||&lt;br /&gt;
|-&lt;br /&gt;
| Colin Charles||   || drbyte||bytee||Malaysian native-lang project||bytebot.net&lt;br /&gt;
|-&lt;br /&gt;
|Jian Hong Cheng || X || chengjh ||  || Writer || IBM Corp.&lt;br /&gt;
|-&lt;br /&gt;
| Xiuzhi Cheng|| X || xzcheng || xiuzhi|| ESC,Xml,ODF|| OOo community&lt;br /&gt;
|-&lt;br /&gt;
| [[User:jza|Alexandro Colorado]]|| X || jza || jza|| CL [[OOoES|ES]] || &lt;br /&gt;
|-&lt;br /&gt;
| Behrend Cornelius|| X || bc||||Wizards||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ccornell|Clayton Cornell]] || X || ccornell || ccornell || Documentation Project co-lead ||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Michael Cziebalski||   || mci||||||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:pdefilippis|Pierre de Filippis]]|| X || pdefilippis||aliscafo||Mac OSX native porting||&lt;br /&gt;
|-&lt;br /&gt;
| Yuri Dario ||   || ydario || Paperino || OS/2 Port || Serenity Systems intl&lt;br /&gt;
|-&lt;br /&gt;
| Andrew Dent|| X ||ace_dent||ace_dent||ui/custom_images||&lt;br /&gt;
|-&lt;br /&gt;
| Naren Devaiah||   || ||ndev||Performance||Intel Corporation&lt;br /&gt;
|-&lt;br /&gt;
| Nitin Dongre||   || ||nitin_BITS||||Novell, Inc.(intern)&lt;br /&gt;
|-&lt;br /&gt;
| Radek Doulik||   || radekdoulik||rodo_||Canvas hacker||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Carsten Driesner|| X || cd|| cd_oo ||PL Framework||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Herbert Duerr|| X || hdu||hdu_hh||GSL||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:bei|Bernd Eilers]]|| X || bei||rfc821||[[EIS]]||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| René Engelhard|| X || rene||_rene_||config_office, Debian packager||Debian&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Pereriksson|Per Eriksson]] || || pereriksson || || CL, MarCon Sweden ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Jbfaure|Jean-Baptiste Faure]]||X||jbfaure||jbfaure ||PL FR native-lang project|| &lt;br /&gt;
|-&lt;br /&gt;
| Hubert Figuière|| X || hub || hub || PPTX || Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Claudio F Filho||   || filhocf||filhocf||Brazilian portuguese Localization||BrOffice.org&lt;br /&gt;
|-&lt;br /&gt;
| Andre Fischer|| X || af||||Impress||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Uwe Fischer || X || ufi || ufiooo || Application Help || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Ken Foskey||   || waratah||waratah||config_office/dmake man||slug.org.au&lt;br /&gt;
|-&lt;br /&gt;
| Duncan Foster||   || dfoster||||||&lt;br /&gt;
|-&lt;br /&gt;
| David Fraser||   || davidfraser||davidfraser||South African translations, multilingual builds||translate.org.za&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Nf|Nils Fuhrmann]]||   || nf||SunNF||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Martin Gallwey|| X || mtg||marty_||XML/Writer/packaging||&lt;br /&gt;
|-&lt;br /&gt;
| Pierre-Andre Galmes || || pagalmes || pagalmes || Chart2 ||StarXpert&lt;br /&gt;
|-&lt;br /&gt;
| Tony Galmiche|| X || tonygalmiche||||FR native-lang project||&lt;br /&gt;
|-&lt;br /&gt;
| Sunil Gandhi||   || ||tyro||||NOSIP&lt;br /&gt;
|-&lt;br /&gt;
|Zemin Gao ||  || gaozemin|| gaozm || Calc || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Sophie Gautier|| X || sgauti|| sophi || ||.&lt;br /&gt;
|-&lt;br /&gt;
| Vladimir Glazounov|| X || vg||||RE||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Laurent Godard || X || laurentgodard || lgodard || CC, PL Extensions, Fr Native-lang Project || inDesko/Nuxeo &lt;br /&gt;
|-&lt;br /&gt;
| Jody Goldberg|| X || jodygoldberg||jody||[[Calc]] spreadsheet-ness||&lt;br /&gt;
|-&lt;br /&gt;
| Dirk Grobler|| X || dg|||| ||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Sg|Steffen Grund]]|| X || sg|| || NetBeans Integration ||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Bettina Haberer||   || bh||||RFEOwner||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Bo Han || X || hanbo || hanbo || VBA Interop || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Ingrid Halama|| X || iha||||Chart||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Chris Halls|| X || haggai||haggai||Debian packager&amp;amp;amp;misc. hacker||Credativ Ltd., Debian&lt;br /&gt;
|-&lt;br /&gt;
| Gregor Hartmann|| X || gh|| Lachs ||Testtool, gsicheck, buildbot||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Bustamam Harun||   || bustamam||||Malaysian stuff||&lt;br /&gt;
|-&lt;br /&gt;
| Kevin Hendricks|| X || khendricks||||PL Lingucomponent, PowerPC||&lt;br /&gt;
|-&lt;br /&gt;
| Con Hennessy||   || cphennessy||cph2 or cph_||hacker &amp;amp;amp; former council person||OpenApp&lt;br /&gt;
|-&lt;br /&gt;
| Ivo Hinkelmann|| X || ihi||ivo||l10n tooling/general/RE||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Eric Hoch|| X || maveric||mav_eric||Mac Porting||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Lutz_Hoeger|Lutz Hoeger]]|| X || lh ||lutzh||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Michael Hönnig|| X || mi||||PL API||&lt;br /&gt;
|-&lt;br /&gt;
| Ilko Höpping|| X || ih||||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Jan Holešovský|| X || kendy||kendy||KDE integration||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Martin Hollmichel|| X || mh||Ratte/Nesshof||PL External, Tools, Porting, CC||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Karl Hong|| X || khong||||i18n, CJK expert||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:icobgr|Hristo Hristov]] ||   || icobgr || icobgr || PL Bulgarian native-lang project ||&lt;br /&gt;
|-&lt;br /&gt;
| Matthias Huetsch|| X || mhu||||Performance/strategy, PL UCB, CC, ESC||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Sven Jacobi|| X || sj||||Escherwizard||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Jörg Jahnke||   || jj||||tooling||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Pavel Janík|| X || pjanik||paveljanik||PL Czech native-lang project, CL l10n, CC, ESC, l10n builds||&lt;br /&gt;
|-&lt;br /&gt;
| Sunil Amitkumar Janki || || sjanki || sjanki || GNU Linux mipsel porter || &lt;br /&gt;
|-&lt;br /&gt;
| Christian Jansen||   || cj ||||Menu and Toolbar?||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Ocke Janssen|| X || oj||Base||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Berry Jia|| X || berryjia||||||&lt;br /&gt;
|-&lt;br /&gt;
| Mingfei Jia || X  || jiamingfei ||   || Lotus Smart Suite filter,MS Word encryption || IBM Corp.&lt;br /&gt;
|-&lt;br /&gt;
| Chuang Jiang ||   || jiangc ||   || || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Pascal Junck||   || pjunck||||||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:pj@openoffice.org|Peter Junge]]|| X || pj|| peter13j|| OOo community contact || &lt;br /&gt;
|-&lt;br /&gt;
| Christian Junker||   || Cyb||christianju||API||Trees For Life&lt;br /&gt;
|-&lt;br /&gt;
| Etsushi Kato || X || ekato ||   || Mac OS X Port || Independent &lt;br /&gt;
|-&lt;br /&gt;
| Hirano Kazunari||   || khirano||||Japanese||&lt;br /&gt;
|-&lt;br /&gt;
| Dhananjay Keskar|| X || dkeskar ||dkeskar||Performance,Buildbot,cat-herder||Intel Corporation&lt;br /&gt;
|-&lt;br /&gt;
| Volodymyr Khrystynych||   || volody||||XML Filter||&lt;br /&gt;
|-&lt;br /&gt;
| Robert Kinsella||   || rkinsella||||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Matthias Klose||   || doko||doko||Ubuntu, gcc, python packager||Canonical, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Laszlo Kovacs||   || lkovacs||||Documentation||&lt;br /&gt;
|-&lt;br /&gt;
| Tobias Krause|| X || tkr||||ucb||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Martin Kretzschmar|| X || mkretzschmar||martink||Gnome / Debian||Student&lt;br /&gt;
|-&lt;br /&gt;
| Will Lachance||   || wlach||wlach_||Word Perfect File Filters||Net Integration Technologies, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Thomas Lange|| X || tl||tl13||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Lars Langhans|| X || lla||||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Hans-Joachim Lankenau|| X || hjs||ause||dmake makefile expert, RE||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Németh László|| X || nemeth||||PL lingucomponent||&lt;br /&gt;
|-&lt;br /&gt;
| Jakob Lechner|| X || jakob_lechner||||Writer||Fabalabs&lt;br /&gt;
|-&lt;br /&gt;
| Michael Leibowitz||  X || mikeleib ||mikeleib||performance||Intel Corporation&lt;br /&gt;
|-&lt;br /&gt;
| Hui Li||   || lihuiibm || Hui_Li ||VBA Interop||IBM Corp.&lt;br /&gt;
|-&lt;br /&gt;
|Jian Li||   || lijian || lijian|| Writer|| &lt;br /&gt;
|-&lt;br /&gt;
| Wind Li|| X || windly||||Address books||&lt;br /&gt;
|-&lt;br /&gt;
| Xing Li || X  || lixxing ||   || Accessibility || IBM Corp.&lt;br /&gt;
|-&lt;br /&gt;
|Weike Liang ||   || liangweike || liangweike || Graphics || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Ping Liao||   || pliao||||||&lt;br /&gt;
|-&lt;br /&gt;
| Tor Lillqvist|| X || tml||tml_||||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Fong Lin || X  || pflin || Fong  || VBA Interop, Scripting, CJK Enhancement || Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Joachim Lingner|| X || jl||||Java, CLI||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Christian Lippka|| X || cl || cl ||Graphic Applications||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Chen Liu||   || liuchenn|| liuchen ||VBA Interop||IBM Corp.&lt;br /&gt;
|-&lt;br /&gt;
|Jianli Liu ||  || liujl|| liujianli || Graphics|| [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Mindy Liu||   || mindyliu||||||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:liutao |Tao Liu]]   || X  || liutao || liutao  ||PL modularization ,PyUNO, Async dialogs,|| &lt;br /&gt;
|-&lt;br /&gt;
| YiSong Liu||  || Liu YiSong || Liu YiSong|| PYUNO || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
|Yu Liu || X  || ch2000liuy || LiuYU  || Swriter || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
|Yuhua Liu ||  || liuyuhua|| yuhua|| ||[[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:fl|Frank Loehmann]]|| X || fl ||frankl||PL [http://ux.openoffice.org User Experience]||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Dl|Dieter Loeschky]]|| X || dl ||||PL: ODF Toolkit||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Philipp Lohmann|| X || pl||PhilippL||VCL/X11 (GSL) hacker||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Michel Loiseleur|| || mloiseleur|| coren`|| Bugfixes ||Linagora&lt;br /&gt;
|-&lt;br /&gt;
| Jackson Low|| X || xxjack12xx||||Porting||&lt;br /&gt;
|-&lt;br /&gt;
| Patrick Luby||   || pluby||||Mac||&lt;br /&gt;
|-&lt;br /&gt;
|Jingrong Luo ||  || Luo Jingrong|| Luo Jingrong|| ||[[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
|Yue Lv ||  || lvyue || lvyue || Calc ||[[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:majun|Jun Ma]]||   ||majun51  ||  ||  writer  || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Prasad Madhav || X || pmadhav || pmadhav || Buildbot || Intern@Intel &lt;br /&gt;
|-&lt;br /&gt;
| Babak Mahbod||   || bmahbod||||||&lt;br /&gt;
|-&lt;br /&gt;
| Martin Maher||   || mmaher||||Writer &amp;amp;amp; Filter chap||&lt;br /&gt;
|-&lt;br /&gt;
| Nakata Maho|| X || maho||_maho_||PL QA, PL JA, FreeBSD guy||Independent&lt;br /&gt;
|-&lt;br /&gt;
|Yonggang Mao || X || maoyonggang|| maoyg|| Calc ||&lt;br /&gt;
|-&lt;br /&gt;
| John Marmion|| X || jmarmion||||||&lt;br /&gt;
|-&lt;br /&gt;
| Andreas Martens|| X || ama||||PL Writer||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Shane M Mathews|| X || smmathews|| smmathews ||[[Impress:_OpenGL_rendered_transitions]]||student&lt;br /&gt;
|-&lt;br /&gt;
| Frank Mau|| X || fma||||tooling||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:smsm1|Shaun McDonald]] || X || smsm1 || shaunmcdonald || Mac Port, buildbot MacPort1 || Graduate&lt;br /&gt;
|-&lt;br /&gt;
| Caolán McNamara|| X || cmc||caolan||CL Writer &amp;amp;amp; Filter man|| [http://www.redhat.com Red Hat Inc.]&lt;br /&gt;
|-&lt;br /&gt;
| Michael Meeks|| X || mmeeks||michael_||ugly hack-er, ESC||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Frank Meies|| X || fme||||Writer||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Federico Mena-Quintero||   || federicomena||federico||perfectionist||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Ismael Merzaq|| X || isma87||ismael_||Mac OSX native porting||Student&lt;br /&gt;
|-&lt;br /&gt;
| Michael Mi||   || mmi||||||&lt;br /&gt;
|-&lt;br /&gt;
| Björn Michaelsen|| X || b_michaelsen ||b_michaelsen|| Writer, Bookmarks, Performance, User Feedback Program ||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Björn Milcke|| X || bm||bm_||Chart||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Petr Mladek||   || pmladek||pmladek||SUSE RPMs, ooo-build releases||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Cyrille Moureaux|| X || cyrillem||Cyrille||||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Mmp|Matthias Müller-Prove]]|| X || mmp|| mprove|| [[User Experience]] || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Bluedwarf|Takashi Nakamoto]]|| || bluedwarf|| || Japanese || Student&lt;br /&gt;
|-&lt;br /&gt;
| Jan Navrátil || X || jnavrati || jnavrati || || [http://www.redhat.com Red Hat Inc.]&lt;br /&gt;
|-&lt;br /&gt;
| Niklas Nebel|| X || nn||||PL [[Calc]]||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Christoph Neumann|| X || cn||||[[UnoApiTest]]||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Frank Neumann|| X || fne||||MacPort||&lt;br /&gt;
|-&lt;br /&gt;
| NicelKM|| X || mnicel||nicel||||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Jan Nieuwenhuizen|| X || jcn||janneke||Layout code, hacker ||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ChristophNoack|Christoph Noack]]|| X || christophnoack ||christoph_n||CL [http://ux.openoffice.org User Experience]||&lt;br /&gt;
|-&lt;br /&gt;
| Bertram Nolte||   || bnolte||||||&lt;br /&gt;
|-&lt;br /&gt;
| Tomas O&amp;#039;Connor||   || toconnor||||Scripting Framework||&lt;br /&gt;
|-&lt;br /&gt;
| Maximilian Odendahl|| X  || mod||mod||[[Notes2]] [[SQL_Syntax_Highlighting]]|| Student / SEPT-Solutions&lt;br /&gt;
|-&lt;br /&gt;
| Takashi Ono || X  || tono ||   || MinGW port || Independent&lt;br /&gt;
|-&lt;br /&gt;
| Lars Oppermann|| X || lo||||||&lt;br /&gt;
|-&lt;br /&gt;
| Rakesh Pandit || X || rakeshpandit|| chacha_chaudhry|| Education Project - Starmath/fix module warnings|| Education Project&lt;br /&gt;
|-&lt;br /&gt;
| Rodrigo Parra Novo|| X || rodarvus||rodarvus||Gnumeric/Abiword OpenDocument Format support and port to Maemo||INdT (Instituto Nokia de Tecnologia)&lt;br /&gt;
|-&lt;br /&gt;
| Pierre Pasteau|| X || pastea_p || pierrep|| Education Project, SeaMonkey migration || Education Project&lt;br /&gt;
|-&lt;br /&gt;
| Edward Peterlin|| X || OPENSTEP||||Mac||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Fpe|Frank Peters]]|| X || fpe||||CL Documentation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Christof Pintaske|| X || cp||||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Ron Piterman||   || rpiterman||||||&lt;br /&gt;
|-&lt;br /&gt;
| Sebastien Plisson|| X  || plipli||plipli||Developer on Aqua port||OO Aqua Port&lt;br /&gt;
|-&lt;br /&gt;
| Noel Power||   || npower||noelp||VBA Interop, Scripting||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Nikolai Pretzell|| X || np || ||Autodoc, code quality||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Jonathan Pryor|| || jpryor || jonp || || Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Canghua Qu||  || quch || Canghua || AutoTest, Graphics || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Volker Quetschke|| X || vq||vq||W32-tcsh/bash build environment and dmake Hacker, ESC||Gravity Waves&lt;br /&gt;
|-&lt;br /&gt;
| Tino Rachui|| X || tra||tinor||GSL/Unix Hacker||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Goran Rakić || X ||goranrakic || || Serbian Native-Lang PL || &lt;br /&gt;
|-&lt;br /&gt;
| [[User:Kr|Kay Ramme]]|| X || kr||||PL UDK||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ErAck|Eike Rathke]]|| X || er||erAck||CL [[Calc]], engine; CL i18n; stricken with number formatter||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Michael Rauch|| X || mrauch||||NetBSD||&lt;br /&gt;
|-&lt;br /&gt;
| Jens-Heiner Rechtien|| X || hr||blauwal||RE; OOo SCM (CVS, CWS tooling); Porting; Compilers||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Daniel Rentz|| X || dr|| drr ||[[Calc]] Excel filter, UI||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Florian Reuter|| X || flr||||Writer filters||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Georg Richter|| X || grichter||georg||Base, native MySQL driver||MySQL AB&lt;br /&gt;
|-&lt;br /&gt;
| G. Roderick Singleton||   || grsingleton||grsingleton||Documentation||pathtech.org&lt;br /&gt;
|-&lt;br /&gt;
| Hennes Rohling|| X || hro||||GSL &amp;amp;amp; Util||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Bibek Sahu||   || Bibek||bibek||Impress pieces||Trees For Life&lt;br /&gt;
|-&lt;br /&gt;
| Andreas Schlüns|| X || as||||Framework||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Ingo Schmidt|| X || is||||(Native) Installation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Jsc|J&amp;amp;uuml;rgen Schmidt]]|| X || jsc||jsc||PL API, PL Extensions, UNO, SDK||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Schmidtm|Matthias Schmidt]] ||   || schmidtm || schmidtm || Mac OSX Aqua Port || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Stephan Schäfer|| X || ssa||ssa||VCL||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Frank Schönheit|| X || fs||FrankS||Database Access, Forms||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Sus|Svante Schubert]]|| X || sus||Svante||XML &amp;amp; ODFTOOLKIT co-lead, ODFDOM project chair, Member of OASIS ODF TC, OASIS OIC TC, OASIS ODF SC Metadata||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Sts|Stella Schulze]]|| X || sts||||[http://ui.openoffice.org/nonav/VisualDesign/ Visual Design]||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Julian Seward || || sewardj || || valgrind ||&lt;br /&gt;
|-&lt;br /&gt;
| Darragh Sherwin||   || dsherwin||darragh||E-Legislation / E-GovSystems||Propylon&lt;br /&gt;
|-&lt;br /&gt;
| Wei Guo Shi || X  || shiwg ||   || Accessibility and Smart Suite filter || IBM Corp.&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Robertzhou | RobertZhou]]||  || robertzhou|| shizhoubo|| [[Framework]] || CS2C&lt;br /&gt;
|-&lt;br /&gt;
| Raul Siddhartha||   || rsiddhartha||raul||GTK File Selector||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Sarah Smith||   || ssmith||||||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:mox|Mox Soini]] || X || mox || Moxed || Mac Porting || &lt;br /&gt;
|-&lt;br /&gt;
| Rajesh Sola||   || rajeshsola||sola||misc.||NOSIP&lt;br /&gt;
|-&lt;br /&gt;
| Kai Sommerfeld|| X || kso||||manager &amp;amp;amp; hacker||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Oliver Specht|| X || os||||PL UI||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Jörg Spindler||   || jspindler||||||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Rescue|Joey Stanford]] ||  || Rescue/k0fcc || Rinchen || CL [http://eo.openoffice.org/ Esperanto native-lang project] || [http://canonical.com Canonical]&lt;br /&gt;
|-&lt;br /&gt;
| Fridrich Štrba|| X || fridrich_strba||Fridrich||Word Perfect Hacker||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Keith Stribley|| X || kstribley||||Graphite fonts, Myanmar l10n||&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Muthusuba|Muthu Subramanian]]|| X || muthusuba||muthusuba||misc.||&lt;br /&gt;
|-&lt;br /&gt;
| Louis Suárez-Potts||   || louis||louis||Community Manager||Collab.net&lt;br /&gt;
|-&lt;br /&gt;
|Quanfa Tang ||  || tqfa|| tangquanfa|| Calc || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| David Tardon || X || dtardon || dtardon || || [http://www.redhat.com Red Hat Inc.]&lt;br /&gt;
|-&lt;br /&gt;
| Stefan Taxhet|| X || st||stx12||CC, interpersonal problem fixer||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Armin Theissen||   || armin||||||&lt;br /&gt;
|-&lt;br /&gt;
| Caio Tiago Oliveira|| X || asrail||asrail||CL QA, release testing pt-BR builds||BrOffice.org&lt;br /&gt;
|-&lt;br /&gt;
| Jan Tietjens||   || tietjens||||||&lt;br /&gt;
|-&lt;br /&gt;
| Rüdiger Timm|| X || rt|| rtimm ||RE||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:mt|Malte Timmermann]]|| X || mt|| Malte || Accessibility, Security, Performance||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Gerhard Tonn||   || tonn||||s390||&lt;br /&gt;
|-&lt;br /&gt;
| Willem van Dorp||   || willem.vandorp||||||&lt;br /&gt;
|-&lt;br /&gt;
| Tom Verbeek|| X || tv|||| ||&lt;br /&gt;
|-&lt;br /&gt;
| Sander Vesik||   || svesik||||||&lt;br /&gt;
|-&lt;br /&gt;
| Daniel Vogelheim|| X || dvo||||XML||&lt;br /&gt;
|-&lt;br /&gt;
| Mikhail Voitenko|| X || mav||mav||Framework||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Robert Vojta|| X || rvojta||rvojta||Mac OS X related issue||&lt;br /&gt;
|-&lt;br /&gt;
| Dirk Völzke|| X || dv||||Installation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
|Xu Ming Wang || X || flyccloud or Wangxum ||  || Calc || IBM Corp.&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Sparcmoz|Jim Watson]]|| X || sparcmoz|| sparcmoz||GNU Linux sparc porter||clug.org.au&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Weiz |Zhao Wei ]] ||   || weiz || weiz || Chart2 || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Armin Weiss|| X || aw||||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Gerd Weiss|| X || gm||||RE||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Dan Williams|| X || fa||dcbw||Mac et. al. hacker|| [http://www.redhat.com Red Hat Inc.]&lt;br /&gt;
|-&lt;br /&gt;
| Oliver Wittmann|| X || od||Writer||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
|[[User:wuy|Yan Wu]] || X || wuy ||   ||Framework ||CS2C&lt;br /&gt;
|-&lt;br /&gt;
| Stephan Wunderlich|| X || sw||||||&lt;br /&gt;
|- &lt;br /&gt;
| Antonio Xu|| X || antoxu || antoxu || Async dialogs, PRC improvements || Intel Corporation&lt;br /&gt;
|-&lt;br /&gt;
|Dehua Xu ||   || xudehua || xudh  ||||&lt;br /&gt;
|-&lt;br /&gt;
| Steve Yin || X  || steve_yin || steve_yin || Microsoft Office file format, PDF, Accessibility, ODF || IBM Corp.&lt;br /&gt;
|-&lt;br /&gt;
| Kohei Yoshida|| X || kohei||kohei_||[[Calc]] hacker, Calc optimization solver developer||Novell, Inc.&lt;br /&gt;
|-&lt;br /&gt;
| Guoqiang Yu|| X || yugq || yugq|| Performance || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Xiaoyang Yu||   || || ||Disk block reordering||Intel Corporation &lt;br /&gt;
|-&lt;br /&gt;
| George Zahopoulos|| X || georgez||||||&lt;br /&gt;
|-&lt;br /&gt;
| Kurt Zenker|| X || kz||smoketester||RE||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Zhangxiaofei|Xiaofei Zhang]]||  || Zhangxiaofei || zhangxiaofei/FelixZ || [[Framework]] ||[[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
|Jianwei Zhao ||   || zhaojianwei || zhaojianwei ||  Swriter  || [[Beijing Redflag Chinese 2000 Software Co., Ltd.|Beijing Redflag CH2000]]&lt;br /&gt;
|-&lt;br /&gt;
| Jeremy Zheng|| X || zhiming || Jeremy || Async dialogs, PRC improvements || Intel Corporation&lt;br /&gt;
|-&lt;br /&gt;
| Mihaela Kedikova|| X || misheto||||grid control||Sun Microsystems&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== QA Engineers ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;2&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name ||CVS||@openoffice.org || [[IRC Communication]] || Interested modules || Notes || Affiliation&lt;br /&gt;
|-&lt;br /&gt;
| Stefan Baltzer||||sba||||writer||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Thorsten Bosbach||X||tbo||||framework, testautomation||framework test automation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Oliver Craemer||X||oc||||[[Calc]], testautomation||calc test automation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Helge Delfs||X||hde||||testautomation, writer||Test automation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Fredrik Haegg||X||fha||||writer, testautomation||Writer test automation||&lt;br /&gt;
|-&lt;br /&gt;
| Hasan Ilter||||hi||||writer, printing, pdf export||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Michael Rüß||||mru||||writer, word im/export||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Éric Savary||||es||||writer, accessibility||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:jsi|Joerg Sievers]]||X||jsi||jsi_sun||chart, xml, testautomation||Chart2, XML test automation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Joerg Skottke||X||jsk||skotti||framework, qa/qatesttool||Framework test automation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Marc Neumann||X||msc||||database, testautomation||Database access test automation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Chris Lukasiak||||clu||||database||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Frank Stecher||||fst||||[[Calc]]||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Jack Warchold|||| jw||||writer, import/export filters||||&lt;br /&gt;
|-&lt;br /&gt;
| Uwe Luebbers||||ul||||framework||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Thorsten Martens||||tm||||framework||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Olaf Felka|||| of||of_sun||framework, installation||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Thomas Klarhoefer||||kla||||chart||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Wolfram Garten||X|| wg||||draw, impress||draw, impress test automation||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Christian Guenther||||cgu||||draw, impress||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Ulf Stroehler||   || us||||||Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Thorsten_Ziehm|Thorsten Ziehm]]||||| thorstenziehm||||||QA lead||Sun Microsystems&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are tracking pending JCAs in the document [[Pending JCAs]].&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Commit Rights]]&lt;br /&gt;
* [[Contributing Patches]]&lt;br /&gt;
* [[User_Experience/Community|User Experience Team]]&lt;br /&gt;
* A map of OOo developers around the world is available at http://www.frappr.com/ooodev, please add yourself to the map if you&amp;#039;re involved in OOo development. It&amp;#039;s just fun to see who&amp;#039;s where :-)&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=149639</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=149639"/>
		<updated>2009-11-25T12:06:41Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Planned Iteration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | nominated ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | in progress ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=149638</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=149638"/>
		<updated>2009-11-25T12:05:51Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Supported Listeners */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | ready for QA ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=145862</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=145862"/>
		<updated>2009-11-04T13:31:12Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Planned Iteration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | done ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-11-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | ready for QA ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=142211</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=142211"/>
		<updated>2009-10-06T09:30:51Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Planned Iteration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-10-16 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | in progress ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=141438</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=141438"/>
		<updated>2009-09-29T10:15:29Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Example */  (checkpoint save)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
oColumn1 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn1.Title = &amp;quot;City&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oColumn2 = createUnoService( &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;)&lt;br /&gt;
oColumn2.Title = &amp;quot;Country&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oColumnModel.addColumn( oColumn1 )&lt;br /&gt;
oColumnModel.addColumn( oColumn2 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oDataModel = createUnoService( &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;)&lt;br /&gt;
&amp;#039;first parameter is for header title if row header exists, else put empty string&lt;br /&gt;
oDataModel.addRow ( &amp;quot;1&amp;quot;, Array( &amp;quot;Hamburg&amp;quot;, &amp;quot;Germany&amp;quot;) )&lt;br /&gt;
oDataModel.addRow ( &amp;quot;2&amp;quot;, Array(&amp;quot;Brisbane&amp;quot;, &amp;quot;Australia&amp;quot;) )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Java&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Basic&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
oModel = oDialogModel.createInstance( &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot; )&lt;br /&gt;
oModel.Name=&amp;quot;Grid1&amp;quot;&lt;br /&gt;
oModel.GridDataModel = oDataModel&lt;br /&gt;
oModel.ColumnModel = oColumnModel&lt;br /&gt;
oModel.ShowColumnHeader = True&lt;br /&gt;
oModel.ShowRowHeader = True&lt;br /&gt;
oDialogModel.insertByName(&amp;quot;Grid1&amp;quot;, oModel )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 ||  || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | in progress ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=140953</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=140953"/>
		<updated>2009-09-22T13:33:00Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Planned Iteration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control. This Wiki page should help you to implement a UNO Grid Control within your own UNO application.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;GridDataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
&lt;br /&gt;
=== Supported Listeners ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039; ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== XGridDataListener ===&lt;br /&gt;
The XGridDataListener supports methods to indicate operations on the data model of the grid control. The listener will be invoked by the data model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridDataEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, this.context);&lt;br /&gt;
xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
xGridDataModel.addDataListener(new XGridDataListener() {&lt;br /&gt;
&lt;br /&gt;
                public void rowAdded(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void rowRemoved(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void dataChanged(GridDataEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XGridColumnLisener ===&lt;br /&gt;
The XGridColumnLisener supports methods to indicate operations on the column model of the grid control. The listener will be invoked by the column model.&lt;br /&gt;
Each event triggered by the listener uses an instance of GridColumnEvent to give details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Object columnModel =  this.m_factory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, this.context);&lt;br /&gt;
XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface( XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
xGridColumnModel.addColumnListener(new XGridColumnListener() {&lt;br /&gt;
&lt;br /&gt;
                public void columnAdded(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnRemoved(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void columnChanged(GridColumnEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XMouseListener ===&lt;br /&gt;
The XMouseListener is currently not full implemented within the grid control. Only the methods &amp;#039;&amp;#039;mousePressed&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mouseRelease&amp;#039;&amp;#039; are supported.&lt;br /&gt;
Use this listener to process mouse events e.g mouse clicks on a row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
XControlContainer xControlCont = (XControlContainer) UnoRuntime.queryInterface(&lt;br /&gt;
                XControlContainer.class, dialog);&lt;br /&gt;
Object objectGrid = xControlCont.getControl(&amp;quot;Grid1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
XGridControl xGridControl = (XGridControl) UnoRuntime.queryInterface(XGridControl.class, objectGrid);&lt;br /&gt;
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, objectGrid);&lt;br /&gt;
&lt;br /&gt;
xWindow.addMouseListener(new XMouseListener() {&lt;br /&gt;
&lt;br /&gt;
                public void mousePressed(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseReleased(MouseEvent arg0) {&lt;br /&gt;
                    if (arg0.ClickCount &amp;gt;= 2) {&lt;br /&gt;
                      int pos = xGridControl.getItemIndexAtPoint(arg0.X, arg0.Y);&lt;br /&gt;
                      // put custom source code here.&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseEntered(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void mouseExited(MouseEvent arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                public void disposing(EventObject arg0) {&lt;br /&gt;
                    throw new UnsupportedOperationException(&amp;quot;Not supported yet.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-09-30 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | in progress ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=136731</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=136731"/>
		<updated>2009-08-05T13:58:41Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Key And Mouse Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;DataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-08-28 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | in progress ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=136730</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=136730"/>
		<updated>2009-08-05T13:56:38Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Planned Iteration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;DataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-08-28 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | in progress ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* exception handling&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Keys&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=136729</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=136729"/>
		<updated>2009-08-05T13:54:06Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Event Handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[Image:Overview_gridcontrol.png]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create new columns:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // #1 column&lt;br /&gt;
 Object column1Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 &lt;br /&gt;
 XGridColumn column1 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column1Obj);&lt;br /&gt;
&lt;br /&gt;
 column1.setTitle(&amp;quot;Column1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 // #2 column&lt;br /&gt;
 Object column2Obj = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.GridColumn&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumn column2 = (XGridColumn) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumn.class, column2Obj);&lt;br /&gt;
&lt;br /&gt;
 column2.setTitle(&amp;quot;Column2&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Add the columns to the column model of the grid control:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object columnModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridColumnModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridColumnModel xGridColumnModel = (XGridColumnModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridColumnModel.class, columnModel);&lt;br /&gt;
&lt;br /&gt;
 xGridColumnModel.addColumn(column1);&lt;br /&gt;
 xGridColumnModel.addColumn(column2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use the data model of the grid control to add rows:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object dataModel = xMultiComponentFactory.createInstanceWithContext(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.DefaultGridDataModel&amp;quot;, m_xContext);&lt;br /&gt;
 XGridDataModel xGridDataModel = (XGridDataModel) UnoRuntime.queryInterface(&lt;br /&gt;
                XGridDataModel.class, dataModel);&lt;br /&gt;
&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;1&amp;quot;, new String[] {&amp;quot;1,1&amp;quot;,&amp;quot;1,2&amp;quot;} );&lt;br /&gt;
 xGridDataModel.addRow(&amp;quot;2&amp;quot;, new String[] {&amp;quot;2,1&amp;quot;,&amp;quot;2,2&amp;quot;} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create the grid model and assign the column and data model:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 Object gridModel = xMultiServiceFactory.createInstance(&lt;br /&gt;
                &amp;quot;com.sun.star.awt.grid.UnoControlGridModel&amp;quot;);&lt;br /&gt;
 XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface(&lt;br /&gt;
                XPropertySet.class, gridModel);&lt;br /&gt;
&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionX&amp;quot;, new Integer(50));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;PositionY&amp;quot;, new Integer(30));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Width&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Height&amp;quot;, new Integer(400));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;Name&amp;quot;, &amp;quot;GridControl&amp;quot;);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;TabIndex&amp;quot;, new Short((short) 0));&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;ColumnModel&amp;quot;, xGridColumnModel);&lt;br /&gt;
 xPSetButton.setPropertyValue(&amp;quot;DataModel&amp;quot;, xGridDataModel);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Event Handling ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Name || Method || Comments&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridDataListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || rowAdded || &lt;br /&gt;
|-&lt;br /&gt;
| || rowRemoved || Invoked after a remove row call. If removedAll was called the GridDataEvent.Index contains &amp;#039;&amp;#039;-1&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| || dataChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridColumnListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || columnAdded|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnRemoved|| &lt;br /&gt;
|-&lt;br /&gt;
| || columnChanged|| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XMouseListener&amp;#039;&amp;#039;&amp;#039; || || &lt;br /&gt;
|-&lt;br /&gt;
| || mousePressed || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseReleased || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseEntered || ||&lt;br /&gt;
|-&lt;br /&gt;
| || mouseExited || ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;XGridSelectionListener&amp;#039;&amp;#039;&amp;#039; || || &amp;#039;&amp;#039;Not yet implemented.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| || selectionChanged ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Description || Task ID || Status || Comments&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || Currently it&amp;#039;s not possible to grain the focus with the &amp;#039;&amp;#039;TAB&amp;#039;&amp;#039; key  || - || new ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;. All data were drawn in a small rectangle in the upper left corner || - || new || &lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;HScroll&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039; and many columns were added. The office crashes if you slide with the scrollbar to the right end. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If the property UnoControlGridModel &amp;#039;&amp;#039;SelectionModel&amp;#039;&amp;#039; is set to &amp;#039;&amp;#039;NONE&amp;#039;&amp;#039;. It&amp;#039;s still possible to navigate with the arrow keys through the grid but mouse actions were ignored. || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || All selection were removed by using left or right arrow keys. Usage of left or right arrow keys shouldn&amp;#039;t have an effect on selection || - || fixed ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | 1 || If text content of a cell doesn&amp;#039;t fit into the cell it&amp;#039;s overwrites the neighbour cell   || - || new ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Planned Iteration==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-07-31 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | QA ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || 2009-08-28 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | in progress ||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Different data types&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
=== Key And Mouse Usage ===&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Action || Selection Modus || Description &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the mouse&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Mouse click in a cell || SINGLE / RANGE / MULTI || Single row selection.  &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + mouse click in a cell || MULTI  || Multiple rows selection possible, if row has been already selected, deselects it.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + mouse click in a cell || RANGE / MULTI  || Multiple rows selection, range is between current row and the chosen one. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | &amp;#039;&amp;#039;&amp;#039;Selection possibilities with the keyboard&amp;#039;&amp;#039;&amp;#039; || ||&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Ctrl + Alt || SINGLE / RANGE / MULTI  || Single row selection, if row has been already selected, deselects it. &lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + UP || RANGE / MULTI ||Multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + DOWN || RANGE / MULTI || Multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + HOME || RANGE / MULTI  || Multiple row selection, range is between current row and top one.&lt;br /&gt;
|-&lt;br /&gt;
|align=center | Shift + END || RANGE / MULTI  || Multiple row selection, range is between current row and bottom one&lt;br /&gt;
.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Keys&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=132152</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=132152"/>
		<updated>2009-06-18T13:31:44Z</updated>

		<summary type="html">&lt;p&gt;Misheto: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Grid Control via UNO API today. The goal is to develop and implement an UNO Grid Control.&lt;br /&gt;
&lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-06-30 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | in progress ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* different data types&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
* Selection&lt;br /&gt;
** only row selection is possible&lt;br /&gt;
** selection possibilities with the mouse&lt;br /&gt;
*** mouse click in a cell: single row selection&lt;br /&gt;
*** Ctrl + mouse click in a cell: multiple rows selection possible, if row has been already selected, deselects it&lt;br /&gt;
*** Shift + mouse click in a cell: multiple rows selection, range is between current row and the chosen one&lt;br /&gt;
** selection possibilities with the keyboard&lt;br /&gt;
*** Ctrl + Alt: single row selection, if row has been already selected, deselects it&lt;br /&gt;
*** Shift + UP: multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one&lt;br /&gt;
*** Shift + DOWN: multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
*** Shift + HOME: multiple row selection, range is between current row and top one&lt;br /&gt;
*** Shift + END: multiple row selection, range is between current row and bottom one&lt;br /&gt;
&lt;br /&gt;
* Keys&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=132150</id>
		<title>API/UNO AWT/Grid Control</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=API/UNO_AWT/Grid_Control&amp;diff=132150"/>
		<updated>2009-06-18T13:13:47Z</updated>

		<summary type="html">&lt;p&gt;Misheto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:UNO Grid Control}}&lt;br /&gt;
=Abstract=&lt;br /&gt;
OpenOffice.org hasn&amp;#039;t a Table or Grid Control via UNO API today. The goal of this feature is to develop and implement a UNO Grid Control. &lt;br /&gt;
==Feature Set==&lt;br /&gt;
* Width for each column&lt;br /&gt;
* Height for each row&lt;br /&gt;
* Each cell has its own data type&lt;br /&gt;
* Column and row header&lt;br /&gt;
* Vertical and horizontal scrollbars&lt;br /&gt;
* Row selection ( Single, Multi, Range )&lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
{| cellpadding=5 cellspacing=0 border=1 style=&amp;quot;border-collapse:collapse;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background-color: #DEDEDE;&amp;quot;&lt;br /&gt;
| Iteration || Due date || Status || Comment || Description || Components&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 1 || 2009-06-30 || style=&amp;quot;background-color: #C0FFC0;&amp;quot; align=center | in progress ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* UnoControl&lt;br /&gt;
* Selection&lt;br /&gt;
* Textdata only&lt;br /&gt;
* Eventhandling&lt;br /&gt;
* Scrollbars&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Scrollbar modi&lt;br /&gt;
* Column and row headers&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open ||  || &lt;br /&gt;
To do:&lt;br /&gt;
* modify column and row size &lt;br /&gt;
* Auto resizing&lt;br /&gt;
* A11y &lt;br /&gt;
||&lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center |4 || || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* different data types&lt;br /&gt;
* A11y &lt;br /&gt;
|| &lt;br /&gt;
* UNO&lt;br /&gt;
** IDL&lt;br /&gt;
** Impl.&lt;br /&gt;
*VCL&lt;br /&gt;
** Impl.&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 ||  || style=&amp;quot;background-color: #FFFF00;&amp;quot; align=center | open||  ||&lt;br /&gt;
To do:&lt;br /&gt;
* Basic IDE&lt;br /&gt;
* Docs/Wiki |&lt;br /&gt;
|&lt;br /&gt;
* IDE&lt;br /&gt;
** Import/Export&lt;br /&gt;
**UI&lt;br /&gt;
* Doc&lt;br /&gt;
**Wiki&lt;br /&gt;
**SDK-Examples&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Grid specification==&lt;br /&gt;
&lt;br /&gt;
* Selection&lt;br /&gt;
** only row selection is possible&lt;br /&gt;
** selection possibilities with the mouse&lt;br /&gt;
*** mouse click in a cell: single row selection&lt;br /&gt;
*** Ctrl + mouse click in a cell: multiple rows selection possible, if row has been already selected, deselects it&lt;br /&gt;
*** Shift + mouse click in a cell: multiple rows selection, range is between current row and the chosen one&lt;br /&gt;
** selection possibilities with the keyboard&lt;br /&gt;
*** Ctrl + Alt: single row selection, if row has been already selected, deselects it&lt;br /&gt;
*** Shift + UP: multiple rows selection above current row, if rows above the current one have been already selected, they can be deselected one by one&lt;br /&gt;
*** Shift + DOWN: multiple rows selection beneath current row, if rows beneath the current one have been already selected, they can be deselected one by one&lt;br /&gt;
*** Shift + HOME: multiple row selection, range is between current row and top one&lt;br /&gt;
*** Shift + END: multiple row selection, range is between current row and bottom one&lt;br /&gt;
&lt;br /&gt;
* Keys&lt;br /&gt;
* Resizing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:UNO AWT]]&lt;/div&gt;</summary>
		<author><name>Misheto</name></author>
	</entry>
</feed>