ooodev.adapter.form.runtime.filter_controller_partial module
- class ooodev.adapter.form.runtime.filter_controller_partial.FilterControllerPartial(component, interface=com.sun.star.form.runtime.XFilterController)[source]
Bases:
object
Partial Class for XFilterController.
This interface does not really provide an own functionality, it is only for easier runtime identification of form components.
- Parameters:
component (XFilterController) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.form.runtime.XFilterController)[source]
Constructor
- Parameters:
component (XFilterController) – UNO Component that implements
com.sun.star.form.runtime.XFilterController
.interface (UnoInterface, optional) – The interface to be validated. Defaults to
None
.
- Return type:
None
- add_filter_controller_listener(listener)[source]
Registers a listener to be notified of certain changes in the form based filter.
Registering the same listener multiple times results in multiple notifications of the same event, and also requires multiple revocations of the listener.
- Return type:
None
- Parameters:
listener (com.sun.star.form.runtime.XFilterControllerListener) –
- append_empty_disjunctive_term()[source]
Appends an empty disjunctive term to the list of terms.
- Return type:
None
- get_filter_component(component)[source]
Retrieves the filter component with the given index.
The filter control has the same control model as the control which it stands in for. Consequently, you can use this method to obtain the database column which the filter control works on, by examining the control model’s BoundField property.
- Raises:
com.sun.star.lang.IndexOutOfBoundsException –
IndexOutOfBoundsException
- Return type:
XControl
- Parameters:
component (int) –
- get_predicate_expressions()[source]
retrieves the entirety of the predicate expressions represented by the filter controller.
Each element of the returned sequence is a disjunctive term, having exactly FilterComponents elements, which denote the single predicate expressions of this term.
- Return type:
Tuple
[Tuple
[str
,...
],...
]
- remove_disjunctive_term(term)[source]
removes a given disjunctive term
- Raises:
com.sun.star.lang.IndexOutOfBoundsException –
IndexOutOfBoundsException
- Return type:
None
- Parameters:
term (int) –
- remove_filter_controller_listener(listener)[source]
Revokes a listener which was previously registered to be notified of certain changes in the form based filter.
- Return type:
None
- Parameters:
listener (com.sun.star.form.runtime.XFilterControllerListener) –
- set_predicate_expression(component, term, predicate_expression)[source]
sets a given predicate expression
- Raises:
com.sun.star.lang.IndexOutOfBoundsException –
IndexOutOfBoundsException
- Return type:
None
- Parameters:
component (int) –
term (int) –
predicate_expression (str) –
- property active_term: int
Gets/Sets - Denotes the active term of the filter controller.
- Return type:
int
- property disjunctive_terms: int
Gets the number of disjunctive terms of the filter expression represented by the form based filter.
- Return type:
int
- property filter_components: int
Gets the number of filter components, or filter controls, which the filter controller is responsible for.
This number is constant during one session of the form based filter.
- Return type:
int