Class ViewCurrencyField
- class ooodev.dialog.dl_control.view.view_currency_field.ViewCurrencyField(component)[source]
Bases:
UnoControlCurrencyFieldComp
,SpinFieldPartial
View for the Currency Field control.
- Parameters:
component (UnoControlCurrencyField) –
- __init__(component)[source]
Constructor
- Parameters:
component (Any) – Component that implements
com.sun.star.awt.UnoControlCurrencyField
service.
- add_event_listener(listener)
Adds an event listener to the component.
- Parameters:
listener (XEventListener) – The event listener to be added.
- Return type:
None
- add_focus_listener(listener)
Adds a focus listener to the object.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XFocusListener) –
- add_key_listener(listener)
Adds a key listener to the object.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XKeyListener) –
- add_mouse_listener(listener)
Adds a mouse listener to the object.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XMouseListener) –
- add_mouse_motion_listener(listener)
Adds a mouse motion listener to the object.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XMouseMotionListener) –
- add_paint_listener(listener)
Adds a paint listener to the object.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XPaintListener) –
- add_spin_listener(listener)
Registers a listener for spin events.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XSpinListener) –
- add_text_listener(listener)
Registers a text event listener.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XTextListener) –
- add_window_listener(listener)
Adds a window listener to the object.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XWindowListener) –
- calc_adjusted_size(width, height)
Calculates the adjusted size for a given maximum size.
- create_peer(toolkit, parent)
Creates a child window on the screen.
If the parent is
None
, then the desktop window of the toolkit is the parent.- Return type:
None
- Parameters:
toolkit (com.sun.star.awt.XToolkit) –
parent (com.sun.star.awt.XWindowPeer) –
- dispose()
Disposes the component.
- Return type:
None
- down()
Decreases the value by one step.
- Return type:
None
- draw(x, y)
Draws the object at the specified position.
If the output should be clipped, the caller has to set the clipping region.
- enable_repeat(repeat)
Enables/disables automatic repeat mode.
- Return type:
None
- Parameters:
repeat (bool) –
- first()
Sets the value to the previously set lower value.
- Return type:
None
- get_columns_and_lines()
Returns the ideal number of columns and lines for displaying this text.
- Returns:
Number of columns and lines.
- Return type:
Tuple[int, int]
- get_context()
Gets the context of the control.
- Return type:
XInterface
- get_decimal_digits()
Gets the currently set number of decimals.
- Return type:
int
- get_first()
Gets the currently set first value which is set on POS1 key.
- Return type:
float
- get_graphics()
Gets the output device which was set using the method XView.setGraphics().
- Return type:
XGraphics
- get_last()
Gets the currently set last value which is set on END key.
- Return type:
float
- get_max()
Gets the currently set maximum value that can be entered by the user.
- Return type:
float
- get_max_text_len()
Gets the currently set maximum text length.
- Return type:
int
- get_min()
Gets the currently set minimum value that can be entered by the user.
- Return type:
float
- get_minimum_size()
Gets the minimum size for this component.
- Returns:
Minimum size in pixel units.
- Return type:
Note
Use
get_minimum_size_text_layout()
to get the minimum size for a given number of columns and lines.
- get_minimum_size_text_layout(cols, lines)
Returns the minimum size for a given number of columns and lines.
- Return type:
- Parameters:
cols (int) –
lines (int) –
- get_model()
Gets the model for this control.
- Return type:
XControlModel
- get_peer()
Gets the peer which was previously created or set.
- Return type:
XWindowPeer
- get_preferred_size()
Gets the preferred size for this component.
- Returns:
Preferred size in pixel units.
- Return type:
- get_selected_text()
Gets the currently selected text.
- Return type:
str
- get_selection()
Gets the current user selection.
- Return type:
Selection
- get_size()
Gets the size of the object in device units.
A device must be set before.
- Returns:
Size of the object in pixel units.
- Return type:
- get_spin_size()
Gets the currently set increment value for the spin button.
- Return type:
float
- get_text()
Gets the text of the component.
- Return type:
str
- get_value()
Gets the value which is currently displayed in the currency field.
- Return type:
float
- get_view()
Gets the view of this control.
- Return type:
XView
- insert_text(sel, text)
Inserts text at the specified position.
- Return type:
None
- Parameters:
sel (com.sun.star.awt.Selection) –
text (str) –
Hint
Selection
can be imported fromooo.dyn.awt.selection
.
- is_design_mode()
Returns
True
if the control is in design mode,False
otherwise.- Return type:
bool
- is_editable()
Gets if the text is editable by the user.
- Return type:
bool
- is_strict_format()
Gets whether the format is currently checked during user input.
- Return type:
bool
- is_transparent()
Returns
True
if the control is transparent,False
otherwise.- Return type:
bool
- last()
Sets the value to the previously set upper value.
- Return type:
None
- remove_event_listener(listener)
Removes an event listener from the component.
- Parameters:
listener (XEventListener) – The event listener to be removed.
- Return type:
None
- remove_focus_listener(listener)
Removes the specified focus listener from the listener list.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XFocusListener) –
- remove_key_listener(listener)
Removes the specified key listener from the listener list.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XKeyListener) –
- remove_mouse_listener(listener)
Removes the specified mouse listener from the listener list.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XMouseListener) –
- remove_mouse_motion_listener(listener)
Removes the specified mouse motion listener from the listener list.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XMouseMotionListener) –
- remove_paint_listener(listener)
Removes the specified paint listener from the listener list.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XPaintListener) –
- remove_spin_listener(listener)
Un-registers a listener for spin events.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XSpinListener) –
- remove_text_listener(listener)
Un-registers a text event listener.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XTextListener) –
- remove_window_listener(listener)
Removes the specified window listener from the listener list.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XWindowListener) –
- set_context(ctx)
Sets the context of the control.
- Return type:
None
- Parameters:
ctx (com.sun.star.uno.XInterface) –
- set_decimal_digits(digits)
Sets the number of decimals.
- Return type:
None
- Parameters:
digits (int) –
- set_design_mode(on)
Sets the design mode for use in a design editor.
Normally the control will be painted directly without a peer.
- Return type:
None
- Parameters:
on (bool) –
- set_editable(editable)
Makes the text editable for the user or read-only.
- Return type:
None
- Parameters:
editable (bool) –
- set_enable(enable)
Enables or disables the window depending on the parameter.
- Return type:
None
- Parameters:
enable (bool) –
- set_first(value)
sets the first value to be set on POS1 key.
- Return type:
None
- Parameters:
value (float) –
- set_focus()
sets the focus to the window.
- Return type:
None
- set_graphics(device)
Sets the output device.
- Return type:
bool
- Parameters:
device (com.sun.star.awt.XGraphics) –
- set_last(value)
Sets the last value to be set on END key.
- Return type:
None
- Parameters:
value (float) –
- set_max(value)
Sets the maximum value that can be entered by the user.
- Return type:
None
- Parameters:
value (float) –
- set_max_text_len(length)
Sets the maximum text length.
- Return type:
None
- Parameters:
length (int) –
- set_min(value)
Sets the minimum value that can be entered by the user.
- Return type:
None
- Parameters:
value (float) –
- set_model(model)
Sets a model for the control.
- Return type:
bool
- Parameters:
model (com.sun.star.awt.XControlModel) –
- set_pos_size(x, y, width, height, flags=15)
Sets the outer bounds of the window.
- Parameters:
x (int, UnitT) – The x-coordinate of the window. In
Pixels
orUnitT
.y (int, UnitT) – The y-coordinate of the window. In
Pixels
orUnitT
.width (int, UnitT) – The width of the window. In
Pixels
orUnitT
.height (int, UnitT) – The height of the window. In
Pixels
orUnitT
.flags (int, UnitT) – A combination of
com.sun.star.awt.PosSize
flags. Default set toPosSize.POSSIZE
.
- Return type:
None
See also
- set_selection(selection)
Sets the user selection.
- Return type:
None
- Parameters:
selection (com.sun.star.awt.Selection) –
Hint
Selection
can be imported fromooo.dyn.awt.selection
.
- set_spin_size(value)
sets the increment value for the spin button.
- Return type:
None
- Parameters:
value (float) –
- set_strict_format(strict)
Determines if the format is checked during user input.
- Return type:
None
- Parameters:
strict (bool) –
- set_text(text)
Sets the text of the component.
- Return type:
None
- Parameters:
text (str) –
- set_value(value)
Sets the value which is displayed in the currency field.
- Return type:
None
- Parameters:
value (float) –
- set_visible(visible)
Shows or hides the window depending on the parameter.
- Return type:
None
- Parameters:
visible (bool) –
- set_zoom(x, y)
Sets the zoom factor.
The zoom factor only affects the content of the view, not the size.
- Return type:
None
- Parameters:
x (float) –
y (float) –
- up()
Increases the value by one step.
- Return type:
None
- property component: com.sun.star.awt.UnoControlCurrencyField
UnoControlCurrencyField Component
- Return type:
UnoControlCurrencyField