Package com._1c.g5.v8.dt.ui.validation
Class ChecksViewerControl
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.validation.ChecksViewerControl
-
public abstract class ChecksViewerControl extends Object
Base control class for vewing/selecting validation cheks,
-
-
Constructor Summary
Constructors Constructor Description ChecksViewerControl(ChecksViewerProvider checksViewerProvider)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createAdditionalControls(org.eclipse.swt.widgets.Composite parent)
Creates additional controls at the end of the contents.protected void
createHeader(org.eclipse.swt.widgets.Composite parent)
Creates header part of the controlObject[]
getCheckedElements()
Returns a list of checked elements in this viewer's tree, including currently hidden ones that are marked as checked but are under a collapsed ancestor.ChecksViewerProvider
getChecksViewerProvider()
Returns check viewer providerorg.eclipse.swt.widgets.Control
getControl(org.eclipse.swt.widgets.Composite parent)
Provides the control with contents.org.eclipse.core.databinding.observable.value.WritableValue<com._1c.g5.v8.dt.internal.ui.validation.ChecksTreeProvider.ChecksTreeNode>
getSelectedCheckObjects()
Returns writable selected check objectsboolean
isDirty()
Returns the dirty stateboolean
isTreeViewerInitialized()
Indicates that check tree viewer is created.void
refresh()
Refreshes this viewer starting with the given element.void
refresh(Object element, boolean updateLabels)
Refreshes this viewer starting with the given element.void
setDirty(boolean dirty)
Sets the dirty statevoid
setSelection(ISelection selection)
Sets a new selection for this viewer and optionally makes it visible.void
setTreeChecked(boolean checked)
Sets check state for all elements.protected void
updateIdHighlight()
Updates highlights
-
-
-
Constructor Detail
-
ChecksViewerControl
public ChecksViewerControl(ChecksViewerProvider checksViewerProvider)
Creates a new instance.- Parameters:
checksViewerProvider
- Cheks viewer provider, cannot benull
-
-
Method Detail
-
isTreeViewerInitialized
public boolean isTreeViewerInitialized()
Indicates that check tree viewer is created.- Returns:
true
if tree viewer is initialized
-
setSelection
public void setSelection(ISelection selection)
Sets a new selection for this viewer and optionally makes it visible.- Parameters:
selection
- the new selection, can benull
- See Also:
Viewer.setSelection(ISelection)
-
setTreeChecked
public void setTreeChecked(boolean checked)
Sets check state for all elements.- Parameters:
checked
- checked- See Also:
ChecksTreeViewer.setTreeChecked(boolean)
-
refresh
public void refresh()
Refreshes this viewer starting with the given element.- See Also:
Viewer.refresh()
-
refresh
public void refresh(Object element, boolean updateLabels)
Refreshes this viewer starting with the given element. Labels are updated as described inrefresh(boolean updateLabels)
.- Parameters:
element
- the element, nevernull
updateLabels
-true
to update labels for existing elements,false
to only update labels as needed, assuming that labels for existing elements are unchanged.- See Also:
ColumnViewer.refresh(Object, boolean)
-
setDirty
public void setDirty(boolean dirty)
Sets the dirty state- Parameters:
dirty
- the dirty to set- See Also:
ChecksTreeViewer.setDirty(boolean)
-
isDirty
public boolean isDirty()
Returns the dirty state- Returns:
- the dirty
- See Also:
ChecksTreeViewer.isDirty()
-
getCheckedElements
public Object[] getCheckedElements()
Returns a list of checked elements in this viewer's tree, including currently hidden ones that are marked as checked but are under a collapsed ancestor.- Returns:
- the array of checked elements, never
null
- See Also:
CheckboxTreeViewer.getCheckedElements()
-
getChecksViewerProvider
public ChecksViewerProvider getChecksViewerProvider()
Returns check viewer provider- Returns:
ChecksViewerProvider
, nevernull
-
getSelectedCheckObjects
public org.eclipse.core.databinding.observable.value.WritableValue<com._1c.g5.v8.dt.internal.ui.validation.ChecksTreeProvider.ChecksTreeNode> getSelectedCheckObjects()
Returns writable selected check objects- Returns:
- selected check objects, never
null
-
getControl
public org.eclipse.swt.widgets.Control getControl(org.eclipse.swt.widgets.Composite parent)
Provides the control with contents.- Parameters:
parent
- the parent composite, cannot benull
- Returns:
Control
, nevernull
-
createHeader
protected void createHeader(org.eclipse.swt.widgets.Composite parent)
Creates header part of the control- Parameters:
parent
- the parent composite, cannot benull
-
updateIdHighlight
protected void updateIdHighlight()
Updates highlights
-
createAdditionalControls
protected void createAdditionalControls(org.eclipse.swt.widgets.Composite parent)
Creates additional controls at the end of the contents.- Parameters:
parent
- the parent composite, cannot benull
-
-