Class InfobaseAssociationsTableViewer
- java.lang.Object
-
- org.eclipse.jface.viewers.Viewer
-
- org.eclipse.jface.viewers.ContentViewer
-
- org.eclipse.jface.viewers.StructuredViewer
-
- org.eclipse.jface.viewers.ColumnViewer
-
- org.eclipse.jface.viewers.AbstractTableViewer
-
- org.eclipse.jface.viewers.TableViewer
-
- org.eclipse.jface.viewers.CheckboxTableViewer
-
- com._1c.g5.v8.dt.platform.services.ui.infobases.InfobaseAssociationsTableViewer
-
- All Implemented Interfaces:
IInfobaseAccessSettingsChangeListener
,IInfobaseSynchronizationListener
,ICheckable
,IInputProvider
,IInputSelectionProvider
,IPostSelectionProvider
,ISelectionProvider
public class InfobaseAssociationsTableViewer extends CheckboxTableViewer implements IInfobaseAccessSettingsChangeListener, IInfobaseSynchronizationListener
Check box table viewer for infobase associations. Check state listening and providing are intended to be added by clients.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jface.viewers.StructuredViewer
StructuredViewer.ColorAndFontCollector, StructuredViewer.ColorAndFontCollectorWithProviders
-
-
Field Summary
-
Fields inherited from class org.eclipse.jface.viewers.Viewer
WIDGET_DATA_KEY
-
-
Constructor Summary
Constructors Constructor Description InfobaseAssociationsTableViewer(org.eclipse.swt.widgets.Table table, org.eclipse.swt.widgets.Composite parent, IInfobaseSynchronizationManager infobaseSynchronizationManager, IInfobaseAccessManager infobaseAccessManager, IInfobaseAssociationManager infobaseAssociationManager, PlatformServicesUiFactory uiFactory)
Constructor ofInfobaseAssociationsTableViewer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearNotAssociated(boolean refresh)
Clear all not associated infobases from the viewer input.void
clearStructuredInput()
Clears structured input of the viewer - no infobases will be shown.protected TableViewerColumn
createColumn(String headerName, int style)
Create default table viewer column.protected void
createColumns(org.eclipse.jface.layout.TableColumnLayout columnLayout)
Create table viewer columns.void
dispose()
Dispose viewer resources.void
equalityStateChanged(InfobaseReference infobase, InfobaseEqualityState state)
Notifies that infobase equality state was changed for the given infobase.Method can be invoked multiple times, one time per state changes.Collection<InfobaseReference>
getInput()
Collection<InfobaseReference>
getStructuredInput()
Returns infobase association table input.protected void
handleDoubleClick()
Handles table viewer double click.void
infobaseAccessSettingsChanged(InfobaseReference infobase, IInfobaseAccessSettings settings, boolean reconnectRequired)
Notifies that infobase access settings was stored for the given infobase.void
installationAccessSettingsChanged(org.eclipse.core.resources.IProject project, InfobaseReference infobase, IResolvableRuntimeInstallation installation)
Notifies that installation access settings was stored for the given infobase.void
setStructuredInput(Collection<InfobaseReference> infobases, org.eclipse.core.resources.IProject project)
Set infobase association table viewer content.void
showDefaultInfobaseBolded(boolean boldDefault)
Show default infobase withBOLD
style.void
synchronizationStateChanged(InfobaseReference infobase, InfobaseSynchronizationState state)
Notifies that infobase synchronization state was changed for the given infobase.-
Methods inherited from class org.eclipse.jface.viewers.CheckboxTableViewer
addCheckStateListener, createTable, doUpdateItem, getChecked, getCheckedElements, getGrayed, getGrayedElements, handleSelect, newCheckList, preservingSelection, removeCheckStateListener, setAllChecked, setAllGrayed, setChecked, setCheckedElements, setCheckStateProvider, setGrayed, setGrayedElements
-
Methods inherited from class org.eclipse.jface.viewers.TableViewer
createViewerEditor, doClear, doClearAll, doDeselectAll, doFindItem, doGetColumn, doGetColumnCount, doGetItem, doGetItemCount, doGetItems, doGetSelection, doGetSelectionIndices, doIndexOf, doRemove, doRemove, doRemoveAll, doResetItem, doSelect, doSetItemCount, doSetSelection, doSetSelection, doShowItem, doShowSelection, getControl, getItemAt, getTable, getViewerRowFromItem, internalCreateNewRowPart, refresh, refresh, remove, setSelection
-
Methods inherited from class org.eclipse.jface.viewers.AbstractTableViewer
add, add, assertContentProviderType, clear, doFindInputItem, getColumnViewerOwner, getElementAt, getLabelProvider, getRawChildren, getSelectionFromWidget, handleDispose, hookControl, indexForElement, inputChanged, insert, internalRefresh, internalRefresh, remove, replace, reveal, setContentProvider, setItemCount, setSelectionToWidget
-
Methods inherited from class org.eclipse.jface.viewers.ColumnViewer
applyEditorValue, cancelEditing, checkBusy, editElement, getCell, getCellEditors, getCellModifier, getColumnProperties, getColumnViewerEditor, getItem, getLabelProvider, getViewerRow, hookEditingSupport, isBusy, isCellEditorActive, refresh, refresh, setBusy, setCellEditors, setCellModifier, setColumnProperties, setColumnViewerEditor, setLabelProvider, triggerEditorActivationEvent, update
-
Methods inherited from class org.eclipse.jface.viewers.StructuredViewer
addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertElementsNotNull, associate, buildLabel, disassociate, equals, filter, findItem, findItems, fireDoubleClick, fireOpen, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilteredChildren, getFilters, getRoot, getSelection, getSortedChildren, getSorter, getStructuredSelection, handleDoubleSelect, handleInvalidSelection, handleLabelProviderChanged, handleOpen, handlePostSelect, hasFilters, internalUpdate, mapElement, needsRefilter, refresh, refresh, refreshItem, removeDoubleClickListener, removeFilter, removeOpenListener, removePostSelectionChangedListener, resetFilters, setComparator, setComparer, setFilters, setInput, setSelectionToWidget, setSorter, setUseHashlookup, testFindItem, testFindItems, unmapAllElements, unmapElement, unmapElement, update, updateItem, updateSelection, usingElementMap
-
Methods inherited from class org.eclipse.jface.viewers.ContentViewer
getContentProvider, labelProviderChanged
-
Methods inherited from class org.eclipse.jface.viewers.Viewer
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider
addSelectionChangedListener, removeSelectionChangedListener, setSelection
-
-
-
-
Constructor Detail
-
InfobaseAssociationsTableViewer
public InfobaseAssociationsTableViewer(org.eclipse.swt.widgets.Table table, org.eclipse.swt.widgets.Composite parent, IInfobaseSynchronizationManager infobaseSynchronizationManager, IInfobaseAccessManager infobaseAccessManager, IInfobaseAssociationManager infobaseAssociationManager, PlatformServicesUiFactory uiFactory)
Constructor ofInfobaseAssociationsTableViewer
.- Parameters:
table
- the table control to create viewer for, cannot benull
parent
- the parent composite with only one table created on it (forTableColumnLayout
providing), cannot benull
infobaseSynchronizationManager
- the infobase syncrhonization manager, cannot benull
infobaseAccessManager
- the infobase access manager, cannot benull
infobaseAssociationManager
- the infobase association manager, cannot benull
uiFactory
- the UI platform services factory, cannot benull
-
-
Method Detail
-
infobaseAccessSettingsChanged
public void infobaseAccessSettingsChanged(InfobaseReference infobase, IInfobaseAccessSettings settings, boolean reconnectRequired)
Description copied from interface:IInfobaseAccessSettingsChangeListener
Notifies that infobase access settings was stored for the given infobase.- Specified by:
infobaseAccessSettingsChanged
in interfaceIInfobaseAccessSettingsChangeListener
- Parameters:
infobase
- the infobase that access settings was canged, cannot benull
settings
- the changed infobase access settings, cannot benull
reconnectRequired
-true
if reconnect required,false
otherwise
-
installationAccessSettingsChanged
public void installationAccessSettingsChanged(org.eclipse.core.resources.IProject project, InfobaseReference infobase, IResolvableRuntimeInstallation installation)
Description copied from interface:IInfobaseAccessSettingsChangeListener
Notifies that installation access settings was stored for the given infobase.- Specified by:
installationAccessSettingsChanged
in interfaceIInfobaseAccessSettingsChangeListener
- Parameters:
project
- the project that installation settings was canged, cannot benull
infobase
- the infobase that installation settings was canged, cannot benull
installation
- the new installation settings, cannot benull
-
synchronizationStateChanged
public void synchronizationStateChanged(InfobaseReference infobase, InfobaseSynchronizationState state)
Description copied from interface:IInfobaseSynchronizationListener
Notifies that infobase synchronization state was changed for the given infobase. Method can be invoked multiple times, one time per state changes.- Specified by:
synchronizationStateChanged
in interfaceIInfobaseSynchronizationListener
- Parameters:
infobase
- the infobase, which synchronization state was changed, cannot benull
state
- the new synchronization state, cannot benull
-
equalityStateChanged
public void equalityStateChanged(InfobaseReference infobase, InfobaseEqualityState state)
Description copied from interface:IInfobaseSynchronizationListener
Notifies that infobase equality state was changed for the given infobase.Method can be invoked multiple times, one time per state changes.- Specified by:
equalityStateChanged
in interfaceIInfobaseSynchronizationListener
- Parameters:
infobase
- the infobase, which equality state was changed, cannot benull
state
- the new equality state, cannot benull
-
getInput
public Collection<InfobaseReference> getInput()
- Specified by:
getInput
in interfaceIInputProvider
- Overrides:
getInput
in classContentViewer
-
setStructuredInput
public void setStructuredInput(Collection<InfobaseReference> infobases, org.eclipse.core.resources.IProject project)
Set infobase association table viewer content.- Parameters:
infobases
- collection of infobases to set for input, cannot benull
project
- the project to set infobase association viewer input for, cannot benull
-
clearStructuredInput
public void clearStructuredInput()
Clears structured input of the viewer - no infobases will be shown.
-
getStructuredInput
public Collection<InfobaseReference> getStructuredInput()
Returns infobase association table input.Clients may modify this collection and then refresh table.
- Returns:
- infobase association table input, never
null
-
dispose
public void dispose()
Dispose viewer resources.
-
showDefaultInfobaseBolded
public void showDefaultInfobaseBolded(boolean boldDefault)
Show default infobase withBOLD
style.- Parameters:
boldDefault
- whether need to default infobase withBOLD
style
-
clearNotAssociated
public void clearNotAssociated(boolean refresh)
Clear all not associated infobases from the viewer input.- Parameters:
refresh
- whether need to refresh viewer after clearing
-
createColumns
protected void createColumns(org.eclipse.jface.layout.TableColumnLayout columnLayout)
Create table viewer columns.- Parameters:
columnLayout
- column layout, cannot benull
-
createColumn
protected TableViewerColumn createColumn(String headerName, int style)
Create default table viewer column. Column is set as resizable and moveable.- Parameters:
headerName
- column header name, cannot benull
style
- column style- Returns:
- table viewer column, never
null
-
handleDoubleClick
protected void handleDoubleClick()
Handles table viewer double click. Default implementation opens selected infobase access settings.
-
-