1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module awt
{ module grid
{
24 /** This interfaces provides access to the selection of row for UnoControlGrid.
26 @since LibreOffice 3.4
28 published
interface XGridRowSelection
34 /** selects a given row
37 denotes the index of the row to select
39 @throws ::com::sun::star::lang::IndexOutOfBoundsException
40 if <code>RowIndex</code> does not denote a valid row index
42 void selectRow
( [in] long RowIndex
)
43 raises
( ::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
45 /** Deselects all selected rows.
47 void deselectAllRows
();
49 /** removes the selection for a given row
52 denotes the index of the row to deselect
54 void deselectRow
( [in] long RowIndex
)
55 raises
( ::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
57 /** Returns the indices of all selected rows.
59 a sequence of indices.
61 sequence
< long > getSelectedRows
();
63 /** Returns whether rows are selected.
65 `TRUE` if and only if at least one row is selected.
67 boolean hasSelectedRows
();
69 /** Returns whether a specific row is selected.
72 the index of a row. If the value does not denote a valid row index, i.e. is smaller than <code>0</code>
73 or greater than the number of rows, this is silently ignored, and `FALSE` is returned.
76 `TRUE` if and only if there is a row with the given index, and it is selected currently.
78 boolean isRowSelected
( [in] long RowIndex
);
80 /** Adds a listener for the GridSelectionEvent posted after the grid changes.
84 void addSelectionListener
( [in] XGridSelectionListener listener
);
86 /** Removes a listener previously added with addSelectionListener().
88 the listener to remove.
90 void removeSelectionListener
( [in] XGridSelectionListener listener
);
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */