Package com._1c.g5.v8.dt.md.ui.dialogs
Class AbstractSubsystemsPanel
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- com._1c.g5.v8.dt.ui.dialog.AbstractViewerPanel
-
- com._1c.g5.v8.dt.md.ui.dialogs.AbstractSubsystemsPanel
-
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public abstract class AbstractSubsystemsPanel extends AbstractViewerPanel
Basic panel for populating filter by subsystems.
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.ui.dialog.AbstractViewerPanel
IMG_CHECKED, searchFilterWithHistory, singleSelect, toolBar, toolBarDeselectAllElement, toolBarSelectAllElement, viewer
-
-
Constructor Summary
Constructors Constructor Description AbstractSubsystemsPanel(org.eclipse.swt.widgets.Composite parent, IFilterBySubsystemsManager filterBySubsystemsManager, boolean oneProjectMode, FilterBySubsystemsSettings filterSettings, IDtProjectManager dtProjectManager)
Creates new instance ofAbstractSubsystemsPanel
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addViewerFilter(ViewerFilter filter)
Adds filter to viewer.void
changeActionEnable()
Changes actions enable state.protected void
checkAll(boolean state)
Checks all elements.protected abstract ITreeContentProvider
createContentProvider()
Creates the tree content provider.List<Object>
getVisibleItemData()
Returns data of visible items.protected void
initToolbarActions()
Inits toolbar actions.protected void
initViewer(Object input)
Inits viewer properties.void
removeViewerFilter(ViewerFilter filter)
Removes viewer filter.void
saveFilterSettings()
Saves filter settings.void
setCheckedElements(Object... elements)
Sets the given elements as elements.void
setIncludeObjectsFromParentSubsystems(boolean includeObjectsFromParentSubsystems)
Sets whether to include objects from parent subsystems.void
setIncludeObjectsFromSubordinateSubsystems(boolean includeObjectsFromSubordinateSubsystems)
Sets whether to include objects from subordinate subsystems.protected void
setState(Object node, boolean checked)
Sets node check state and updates its subtree and parents.protected void
updateCurrentModel(Object element, boolean checked)
Updates element with new checked state.-
Methods inherited from class com._1c.g5.v8.dt.ui.dialog.AbstractViewerPanel
addViewerDoubleClickListener, changeViewerCheckState, createCheckboxTreeViewer, createSearch, createToolbarActions, doDoubleClick, getCheckedElements, getDescendants, getGrayedElements, getItemsOfType, getOnlyCheckedElements, getViewerInput, hasCheckedElements, removeViewerDoubleClickListener, setChecked, setFocusToSearchLine, setGrayedElements, setLabelText, setUncheckedElements, setViewerInput, updateTree
-
Methods 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, toString
-
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
-
Methods 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, 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, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
-
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
-
-
-
-
Constructor Detail
-
AbstractSubsystemsPanel
public AbstractSubsystemsPanel(org.eclipse.swt.widgets.Composite parent, IFilterBySubsystemsManager filterBySubsystemsManager, boolean oneProjectMode, FilterBySubsystemsSettings filterSettings, IDtProjectManager dtProjectManager)
Creates new instance ofAbstractSubsystemsPanel
.- Parameters:
parent
- the parent composite, cannot benull
filterBySubsystemsManager
- the filter by subsystems manager, cannot benull
oneProjectMode
- whether to show only one projectresourceLookup
- the resource lookup, cannot benull
filterSettings
- initial filter settings, cannot benull
dtProjectManager
- the DT project manager, cannot benull
-
-
Method Detail
-
setIncludeObjectsFromSubordinateSubsystems
public void setIncludeObjectsFromSubordinateSubsystems(boolean includeObjectsFromSubordinateSubsystems)
Sets whether to include objects from subordinate subsystems.- Parameters:
includeObjectsFromSubordinateSubsystems
- whether to include objects from subordinate subsystems
-
setIncludeObjectsFromParentSubsystems
public void setIncludeObjectsFromParentSubsystems(boolean includeObjectsFromParentSubsystems)
Sets whether to include objects from parent subsystems.- Parameters:
includeObjectsFromParentSubsystems
- whether to include objects from parent subsystems
-
addViewerFilter
public void addViewerFilter(ViewerFilter filter)
Description copied from class:AbstractViewerPanel
Adds filter to viewer.- Overrides:
addViewerFilter
in classAbstractViewerPanel
- Parameters:
filter
- the viewer filter, can not benull
-
removeViewerFilter
public void removeViewerFilter(ViewerFilter filter)
Description copied from class:AbstractViewerPanel
Removes viewer filter.- Overrides:
removeViewerFilter
in classAbstractViewerPanel
- Parameters:
filter
- the filter, can not benull
-
setCheckedElements
public void setCheckedElements(Object... elements)
Description copied from class:AbstractViewerPanel
Sets the given elements as elements.- Overrides:
setCheckedElements
in classAbstractViewerPanel
- Parameters:
elements
- the given elements, can not benull
-
getVisibleItemData
public List<Object> getVisibleItemData()
Returns data of visible items.- Returns:
- list of data of visible items, never
null
-
saveFilterSettings
public void saveFilterSettings()
Saves filter settings.
-
changeActionEnable
public void changeActionEnable()
Description copied from class:AbstractViewerPanel
Changes actions enable state.- Overrides:
changeActionEnable
in classAbstractViewerPanel
-
createContentProvider
protected abstract ITreeContentProvider createContentProvider()
Creates the tree content provider.- Returns:
- the tree content provider, never
null
-
initViewer
protected void initViewer(Object input)
Description copied from class:AbstractViewerPanel
Inits viewer properties.- Specified by:
initViewer
in classAbstractViewerPanel
- Parameters:
input
- the viewer input, may benull
-
setState
protected void setState(Object node, boolean checked)
Description copied from class:AbstractViewerPanel
Sets node check state and updates its subtree and parents.- Overrides:
setState
in classAbstractViewerPanel
- Parameters:
node
- the target node, can not benull
checked
- the check value
-
checkAll
protected void checkAll(boolean state)
Description copied from class:AbstractViewerPanel
Checks all elements.- Overrides:
checkAll
in classAbstractViewerPanel
- Parameters:
state
- the check state
-
initToolbarActions
protected void initToolbarActions()
Description copied from class:AbstractViewerPanel
Inits toolbar actions.- Overrides:
initToolbarActions
in classAbstractViewerPanel
-
updateCurrentModel
protected void updateCurrentModel(Object element, boolean checked)
Updates element with new checked state.- Parameters:
element
- the element to update, cannot benull
checked
- the new checked state
-
-