Class OOoTable
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.libreoffice.ide.eclipse.core.gui.AbstractTable
org.libreoffice.ide.eclipse.core.gui.OOoTable
- All Implemented Interfaces:
org.eclipse.jface.viewers.ISelectionProvider,org.eclipse.swt.graphics.Drawable
This class creates the whole OOo table with it's viewer and content provider. This class encloses an OOo editor
dialog.
-
Field Summary
Fields inherited from class org.libreoffice.ide.eclipse.core.gui.AbstractTable
mTable, mTableViewerFields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandleFields inherited from class org.eclipse.swt.widgets.Widget
handle -
Constructor Summary
ConstructorsConstructorDescriptionOOoTable(org.eclipse.swt.widgets.Composite pParent) Main constructor of the OOo Table. -
Method Summary
Modifier and TypeMethodDescriptionprotected ITableElementaddLine()Method called after an action on the Add button.voidFill the table with the preferences from the OOOS_CONFIG file.protected voidhandleDoubleClick(org.eclipse.jface.viewers.DoubleClickEvent event) Method called when a double click event has been raised by the table.protected org.libreoffice.ide.eclipse.core.internal.model.AbstractOOoopenDialog(org.libreoffice.ide.eclipse.core.internal.model.AbstractOOo ooo) This method create and calls the dialog box to be launched on LibreOffice edition or LibreOffice creation.protected ITableElementMethod called after an action on the Remove button.voidSaves the OOos in the OOOS_CONFIG file.Methods inherited from class org.libreoffice.ide.eclipse.core.gui.AbstractTable
addLine, addSelectionChangedListener, createCellEditors, createContent, dispose, getLines, getSelection, removeSelectionChangedListener, setSelection, setToolTipTextMethods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsModeMethods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updateMethods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, addTypedListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData
-
Constructor Details
-
OOoTable
public OOoTable(org.eclipse.swt.widgets.Composite pParent) Main constructor of the OOo Table. It's style can't be configured like other SWT composites. When using a OOo Table, you should add all the necessary Layouts and Layout Data to display it correctly.- Parameters:
pParent- Composite parent of the table.
-
-
Method Details
-
getPreferences
public void getPreferences()Fill the table with the preferences from the OOOS_CONFIG file. -
savePreferences
public void savePreferences()Saves the OOos in the OOOS_CONFIG file. -
addLine
Method called after an action on the Add button. This method should be overridden to customize the table.- Overrides:
addLinein classAbstractTable- Returns:
- the new table line to add.
-
removeLine
Method called after an action on the Remove button. This method should be overridden to customize the table.- Overrides:
removeLinein classAbstractTable- Returns:
- the table line removed or
nullif none was removed.
-
handleDoubleClick
protected void handleDoubleClick(org.eclipse.jface.viewers.DoubleClickEvent event) Method called when a double click event has been raised by the table. This implementation doesn't perform any action and is intended to be overridden.- Overrides:
handleDoubleClickin classAbstractTable- Parameters:
event- the double click event raised
-
openDialog
protected org.libreoffice.ide.eclipse.core.internal.model.AbstractOOo openDialog(org.libreoffice.ide.eclipse.core.internal.model.AbstractOOo ooo) This method create and calls the dialog box to be launched on LibreOffice edition or LibreOffice creation. The parameterpOoocould be null: in this case, a new one will be created. Otherwise the fields of the old one will be changed. This is useful for OOo editing: the object reference is the same.- Parameters:
ooo- the LibreOffice instance to show in the dialog- Returns:
- the modified or created LibreOffice instance
-