Class ViewScrollBar
- class ooodev.dialog.dl_control.view.view_scroll_bar.ViewScrollBar(component)[source]
Bases:
UnoControlScrollBarComp
View for the scroll bar control.
- Parameters:
component (UnoControlScrollBar) –
- __init__(component)
Constructor
- Parameters:
component (Any) – Component that implements
com.sun.star.awt.UnoControlScrollBar
service.
- add_adjustment_listener(listener)
Registers an adjustment event listener.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XAdjustmentListener) –
- 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_window_listener(listener)
Adds a window listener to the object.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XWindowListener) –
- 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
- draw(x, y)
Draws the object at the specified position.
If the output should be clipped, the caller has to set the clipping region.
- get_block_increment()
Gets the currently set increment for a block move.
- Return type:
int
- get_context()
Gets the context of the control.
- Return type:
XInterface
- get_graphics()
Gets the output device which was set using the method XView.setGraphics().
- Return type:
XGraphics
- get_line_increment()
Gets the currently set increment for a single line move.
- Return type:
int
- get_maximum()
Gets the currently set maximum scroll value of the scroll bar.
- Return type:
int
- get_model()
Gets the model for this control.
- Return type:
XControlModel
- get_orientation()
Gets the currently set ScrollBarOrientation of the scroll bar.
- Return type:
ScrollBarOrientationEnum
- get_peer()
Gets the peer which was previously created or set.
- Return type:
XWindowPeer
- 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_value()
Gets the current scroll value of the scroll bar.
- Return type:
int
- get_view()
Gets the view of this control.
- Return type:
XView
- is_design_mode()
Returns
True
if the control is in design mode,False
otherwise.- Return type:
bool
- is_transparent()
Returns
True
if the control is transparent,False
otherwise.- Return type:
bool
- remove_adjustment_listener(listener)
Un-registers an adjustment event listener.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XAdjustmentListener) –
- 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_window_listener(listener)
Removes the specified window listener from the listener list.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XWindowListener) –
- set_block_increment(n)
Sets the increment for a block move.
- Return type:
None
- Parameters:
n (int) –
- set_context(ctx)
Sets the context of the control.
- Return type:
None
- Parameters:
ctx (com.sun.star.uno.XInterface) –
- 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_enable(enable)
Enables or disables the window depending on the parameter.
- Return type:
None
- Parameters:
enable (bool) –
- 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_line_increment(n)
Sets the increment for a single line move.
- Return type:
None
- Parameters:
n (int) –
- set_maximum(n)
Sets the maximum scroll value of the scroll bar.
- Return type:
None
- Parameters:
n (int) –
- set_model(model)
Sets a model for the control.
- Return type:
bool
- Parameters:
model (com.sun.star.awt.XControlModel) –
- set_orientation(n)
Sets the ScrollBarOrientation of the scroll bar.
0:
HORIZONTAL
1:
VERTICAL
- Parameters:
n (int | ScrollBarOrientationEnum) – ScrollBarOrientation value.
- Return type:
None
- 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_value(n)
Sets the scroll value of the scroll bar.
- Return type:
None
- Parameters:
n (int) –
- set_values(val, visible, max_scroll)
Sets the scroll value, visible area and maximum scroll value of the scroll bar.
- Return type:
None
- Parameters:
val (int) –
visible (int) –
max_scroll (int) –
- set_visible(visible)
Shows or hides the window depending on the parameter.
- Return type:
None
- Parameters:
visible (bool) –
- set_visible_size(size)
Sets the visible size of the scroll bar.
- Return type:
None
- Parameters:
size (int | UnitT) –
- 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) –
- property component: com.sun.star.awt.UnoControlScrollBar
UnoControlScrollBar Component
- Return type:
UnoControlScrollBar