Package com._1c.g5.v8.dt.ui.validation
Class ChecksViewerControl
java.lang.Object
com._1c.g5.v8.dt.ui.validation.ChecksViewerControl
- Direct Known Subclasses:
ChecksViewerPreferencesControl
Base control class for vewing/selecting validation cheks,
-
Constructor Summary
ConstructorsConstructorDescriptionChecksViewerControl
(ChecksViewerProvider checksViewerProvider) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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[]
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 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<ChecksTreeProvider.ChecksTreeNode>
Returns writable selected check objectsboolean
isDirty()
Returns the dirty stateboolean
Indicates that check tree viewer is created.void
refresh()
Refreshes this viewer starting with the given element.void
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
Updates highlights
-
Constructor Details
-
ChecksViewerControl
Creates a new instance.- Parameters:
checksViewerProvider
- Cheks viewer provider, cannot benull
-
-
Method Details
-
isTreeViewerInitialized
public boolean isTreeViewerInitialized()Indicates that check tree viewer is created.- Returns:
true
if tree viewer is initialized
-
setSelection
Sets a new selection for this viewer and optionally makes it visible.- Parameters:
selection
- the new selection, can benull
- See Also:
-
setTreeChecked
public void setTreeChecked(boolean checked) Sets check state for all elements.- Parameters:
checked
- checked- See Also:
-
refresh
public void refresh()Refreshes this viewer starting with the given element.- See Also:
-
refresh
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:
-
setDirty
public void setDirty(boolean dirty) Sets the dirty state- Parameters:
dirty
- the dirty to set- See Also:
-
isDirty
public boolean isDirty()Returns the dirty state- Returns:
- the dirty
- See Also:
-
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:
-
getChecksViewerProvider
Returns check viewer provider- Returns:
ChecksViewerProvider
, nevernull
-
getSelectedCheckObjects
public org.eclipse.core.databinding.observable.value.WritableValue<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
-