Click or drag to resize

WorksheetController Class

Controller for worksheet views.
Inheritance Hierarchy
SystemObject
  Altaxo.Gui.WorkbenchAbstractViewContent
    Altaxo.Gui.Worksheet.ViewingWorksheetController

Namespace: Altaxo.Gui.Worksheet.Viewing
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public class WorksheetController : AbstractViewContent, 
	IWorksheetController, IMVCANController, IMVCAController, IMVCController, IDisposable, 
	IApplyController

The WorksheetController type exposes the following members.

Constructors
 NameDescription
Public methodWorksheetController(DataTable) Initializes a new instance of the WorksheetController class for the specified table.
Public methodWorksheetController(WorksheetLayout) Creates a WorksheetController which shows the table data using the specified layout.
Public methodWorksheetController(WorksheetViewLayout) Initializes a new instance of the WorksheetController class for the specified view layout.
Top
Properties
 NameDescription
Public propertyAreColumnsOrRowsSelected Returns true if one or more columns, rows or property columns or rows are selected.
Public propertyAreDataCellsSelected Returns true if one or more data columns or rows are selected.
Public propertyArePropertyCellsSelected Returns true if one or more property columns or rows are selected.
Public propertyCloseCommand Gets the command that closes the view content.
(Inherited from AbstractViewContent)
Public propertyCloseWithSolution Gets whether this view content should be closed when the solution is closed.
(Inherited from AbstractViewContent)
Public propertyContentId Gets or sets the content identifier. Here, the content identifier is calculated of the reference hash of the document. Setting is not implemented here.
(Inherited from AbstractViewContent)
Public propertyDataTable This returns the Table that is managed by this controller.
Public propertyEnableCopy Gets a value indicating whether the copy command is currently enabled.
Public propertyEnableCut Gets a value indicating whether the cut command is currently enabled.
Public propertyEnableDelete Gets a value indicating whether the delete command is currently enabled.
Public propertyEnablePaste Gets a value indicating whether the paste command is currently enabled.
Public propertyEnableSelectAll Gets a value indicating whether the select-all command is currently enabled.
Public propertyFirstVisibleColumn Gets or sets the index of the first visible data column.
Public propertyFirstVisiblePropertyColumn Gets the index of the first visible property column.
Public propertyFirstVisibleTableRow Gets the index of the first visible table row.
Public propertyFullyVisibleColumns Gets the number of fully visible data columns.
Public propertyFullyVisiblePropertyColumns Gets the number of fully visible property columns.
Public propertyFullyVisibleTableRows Gets the number of fully visible table rows.
Public propertyHorzScrollMaximum Gets or sets the maximum horizontal scroll position.
Public propertyHorzScrollPos Gets or sets the horizontal scroll position.
Public propertyIconSource Gets or sets the icon source.
(Inherited from AbstractViewContent)
Public propertyInfoTip Gets or sets the informational tooltip for the view content.
(Inherited from AbstractViewContent)
Public propertyInitiallyFocusedControl Gets the control which has focus initially.
(Inherited from AbstractViewContent)
Public propertyIsActive Gets or sets a value indicating whether the view of this instance is active in the UI.
(Inherited from AbstractViewContent)
Public propertyIsContentVisible Gets a value indicating whether the content of this document window is visible (it is if either IsActive or IsSelected is visible.
(Inherited from AbstractViewContent)
Public propertyIsDirty If this property returns true the content has changed since the last load/save operation.
(Inherited from AbstractViewContent)
Public propertyIsDisposed Gets a value indicating whether the view content has been disposed.
(Inherited from AbstractViewContent)
Public propertyIsDisposeInProgress Gets or sets a value indicating whether disposal is in progress.
(Inherited from AbstractViewContent)
Public propertyIsReadOnly Gets if the view content is read-only (can be saved only when choosing another file name).
(Inherited from AbstractViewContent)
Public propertyIsSelected Gets or sets a value indicating whether the view of this instance is selected (e.g. inside its container).
(Inherited from AbstractViewContent)
Public propertyIsViewOnly Gets if the view content is view-only (cannot be saved at all).
(Inherited from AbstractViewContent)
Public propertyIsVisible Gets or sets the visibility of the document. If false, the document tab header is not visible (but the document itself maybe visible !). If true, the document tab header is visible (if it fits in the bar), and the document is visible, if it is selected, too.
(Inherited from AbstractViewContent)
Public propertyLastFullyVisibleColumn Gets the index of the last fully visible data column.
Public propertyLastFullyVisiblePropertyColumn Gets the index of the last fully visible property column.
Public propertyLastFullyVisibleTableRow Gets the index of the last fully visible table row.
Public propertyLastVisibleTableRow Gets the index of the last visible table row.
Public propertyModelObject Gets the model (document) that this controller manages.
(Overrides AbstractViewContentModelObject)
Public propertyRemainingEnabledPropertyColumnsReturns the remaining number of property columns that could be shown below the current scroll position.
Public propertySelectedDataColumns Gets the currently selected data columns.
Public propertySelectedDataRows Returns the currently selected data rows.
Public propertySelectedPropertyColumns Returns the currently selected property columns.
Public propertySelectedPropertyRows Returns the currently selected property rows if property cells are selected alone. If not selected alone, the SelectedColumn property is returned.
Public propertyServices Gets or sets the service container for the view content.
(Inherited from AbstractViewContent)
Public propertyTableAreaHeight Gets the height of the visible table area.
Public propertyTableAreaWidth Gets the width of the visible table area.
Public propertyTitle Gets/Sets the title of the current tab page. This value will be passed through the string parser before being displayed.
(Inherited from AbstractViewContent)
Public propertyTotalEnabledPropertyColumnsReturns number of property columns that are enabled for been shown on the grid.
Public propertyUseDocumentCopy Sets whether or not a copy of the document is used. If set to true, a copy of the document is used, so if the controller is not applied, all changes can be reverted. If set to false, no copy must be made. The document is directly changed by the controller, and changes cannot be reverted. Use the last option if a controller higher in the hierarchy has already made a copy of the document.
Public propertyVerticalPositionOfFirstVisibleDataRow This returns the vertical position of the first visible data row.;
Public propertyVerticalScrollPosition The vertical scroll position is defined as following: If 0 (zero), the data row 0 is the first visible line (after the column header). If positive, the data row with the number of VertScrollPos is the first visible row. If negative, the property column with index PropertyColumnCount+VertScrollPos is the first visible line.
Public propertyVertScrollMaximum Gets or sets the maximum vertical scroll position.
Public propertyViewObject Gets or sets the GUI element that shows the model to the user.
(Overrides AbstractViewContentViewObject)
Public propertyVisibleColumns Gets the number of visible data columns.
Public propertyVisiblePropertyColumns Gets the number of visible property columns.
Public propertyVisibleTableRows Gets the number of visible table rows.
Public propertyWorksheetLayout Gets the worksheet layout managed by this controller.
Top
Methods
 NameDescription
Public methodAdjustXScrollBarMaximum Recalculates the maximum value of the horizontal scroll bar.
Public methodAdjustXScrollBarViewPortSizeAdjusts the X scroll bar viewport size (= size of the thumb). Should be called after the X scrollbar maximum is adjusted or when the width of the columns changes considerably. Here, we want to avoid that the thumb size changing while we scroll through the worksheet. Thus, we calculate an average value for the thumb size that is the relation of the table-area width and the total width of all data columns.
Public methodAdjustYScrollBarMaximum Recalculates the maximum value of the vertical scroll bar.
Public methodApply Called when the user input has to be applied to the document being controlled. Returns if apply is successful.
Public methodBuildNavPoint Builds an INavigationPoint for the current position.
(Inherited from AbstractViewContent)
Protected methodCanClose Determines whether the view content can be closed.
(Inherited from AbstractViewContent)
Public methodClearAllSelections Clears all selections of columns, rows or property columns.
Public methodClearIsDirty Clears the dirty state.
(Inherited from AbstractViewContent)
Public methodCopy Copies the current cell-edit selection or the selected worksheet items.
Public methodCreateResizingPositions Rebuilds the cached list of column-divider positions used for column resizing.
Public methodCut Cuts the current cell-edit selection or the selected worksheet items.
Public methodDelete Deletes the current cell-edit content, the current selection, or the worksheet itself.
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Overrides AbstractViewContentDispose)
Public methodEhPropertyDataChanged Handles changes in worksheet property-column data.
Public methodEhTable_Changed Handles changes of the worksheet table, for example table renaming.
Public methodEhTableDataChanged Handles changes in worksheet data values.
Protected methodEhTitleLocalizationChanged Updates the title when the localized title changes.
(Inherited from AbstractViewContent)
Public methodEhView_HorzScrollBarScroll Handles scrolling of the horizontal scrollbar in the view.
Public methodEhView_KeyDown Handles keyboard navigation commands from the view.
Public methodEhView_TableAreaMouseClick Handles mouse clicks in the table area.
Public methodEhView_TableAreaMouseDoubleClick Handles mouse double-clicks in the table area.
Public methodEhView_TableAreaMouseDown Handles mouse-button presses over the table area.
Public methodEhView_TableAreaMouseMove Handles mouse movement over the table area.
Public methodEhView_TableAreaMouseUp Handles mouse-button release over the table area.
Public methodEhView_TableAreaMouseWheel Handles the mouse wheel event.
Public methodEhView_TableAreaSizeChanged Handles changes in the size of the table area.
Public methodEhView_VertScrollBarScroll Handles scrolling of the vertical scrollbar in the view.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetDataColumnStyle Retrieves the column style for the data column with index i.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetPropertyColumnStyle Retrieves the column style for the property column with index i.
Public methodGetService(Type)Gets the service object of the specified type.
(Inherited from AbstractViewContent)
Public methodGetServiceT Gets a required service of the specified type.
(Inherited from AbstractViewContent)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInitializeDocument Initializes the controller with the document.
Protected methodInternalInitializeWorksheetLayout Initializes the controller with the specified worksheet layout.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodNavigateCellEdit Moves the cell editor to the next editable cell.
Protected methodNavigatePropertyCellEdit Moves the cell editor to the next property cell.
Protected methodNavigateTableCellEdit Moves the cell editor to the next data cell.
Public methodNotifyContentIdChanged Can be used to notify the view content that the ContentId maybe has changed.
(Inherited from AbstractViewContent)
Protected methodOnClose Closes the view content.
(Inherited from AbstractViewContent)
Public methodOnIsDirtyChanged Raises notifications that the dirty state has changed.
(Inherited from AbstractViewContent)
Protected methodOnLeftClickDataCell Handles a left-click on a data cell.
Protected methodOnLeftClickDataColumnHeader Handles a left-click on a data-column header.
Protected methodOnLeftClickDataRowHeader Handles a left-click on a data-row header.
Protected methodOnLeftClickOutsideAll Raises the event for a left-click outside all worksheet areas.
Protected methodOnLeftClickPropertyCell Handles a left-click on a property cell.
Protected methodOnLeftClickPropertyColumnHeader Handles a left-click on a property-column header.
Protected methodOnLeftClickTableHeader Raises the event for a left-click on the table header.
Protected methodOnPropertyChanged Raises the PropertyChanged event.
(Inherited from AbstractViewContent)
Protected methodOnRightClickDataCell Raises the event for a right-click on a data cell.
Protected methodOnRightClickDataColumnHeader Raises the event for a right-click on a data-column header and shows the context menu.
Protected methodOnRightClickDataRowHeader Raises the event for a right-click on a data-row header and shows the context menu.
Protected methodOnRightClickOutsideAll Raises the event for a right-click outside all worksheet areas and shows the context menu.
Protected methodOnRightClickPropertyCell Raises the event for a right-click on a property cell.
Protected methodOnRightClickPropertyColumnHeader Raises the event for a right-click on a property-column header and shows the context menu.
Protected methodOnRightClickTableHeader Raises the event for a right-click on the table header and shows the context menu.
Public methodPaste Pastes clipboard content into the active cell editor or worksheet selection.
Public methodRevert Try to revert changes to the model, i.e. restores the original state of the model.
Public methodSelectAll Selects all data columns in the worksheet.
Protected methodSetCachedNumberOfDataColumns Updates the cached number of data columns.
Protected methodSetCachedNumberOfDataRows Updates the cached number of data rows.
Protected methodSetCachedNumberOfPropertyColumns Updates the cached number of property columns.
Public methodSetDirty Sets the dirty state.
(Inherited from AbstractViewContent)
Public methodSetDisposeInProgress Announces that this view content is about to be disposed very soon. The view content should remain passiv (e.g. should not react to events any more), but should not release its resources yet (this is done later in Dispose).
(Inherited from AbstractViewContent)
Protected methodSetLocalizedInfoTip Sets a localized info tip that will update automatically when the language changes.
(Inherited from AbstractViewContent)
Protected methodSetLocalizedTitle Sets a localized title that will update automatically when the language changes.
(Inherited from AbstractViewContent)
Protected methodSetMemberVariablesToDefault Set the member variables to default values. Intended only for use in constructors and deserialization code.
Protected methodSetScrollPositionTo SetScrollPositions only sets the scroll positions, and not Invalidates the Area!
Public methodTableAreaInvalidate Forces redraw of the table.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTriggerRedrawing Forces the view to redraw its table area, updating the display to reflect any recent changes.
Top
Events
 NameDescription
Public eventDataCellRightClicked Occurs when a data cell is clicked with the right mouse button.
Public eventDataColumnHeaderRightClicked Occurs when a data-column header is clicked with the right mouse button.
Public eventDataRowHeaderRightClicked Occurs when a data-row header is clicked with the right mouse button.
Public eventDisposed Occurs when the view content has been disposed.
(Inherited from AbstractViewContent)
Public eventIsDirtyChanged Occurs when the dirty state changes.
(Inherited from AbstractViewContent)
Public eventOutsideAllLeftClicked Occurs when the user left-clicks outside any worksheet area.
Public eventOutsideAllRightClicked Occurs when the user right-clicks outside any worksheet area.
Public eventPropertyCellRightClicked Occurs when a property cell is clicked with the right mouse button.
Public eventPropertyChangedOccurs when a property value changes.
(Inherited from AbstractViewContent)
Public eventPropertyColumnHeaderRightClicked Occurs when a property-column header is clicked with the right mouse button.
Public eventTableHeaderLeftClicked Occurs when the table header is clicked with the left mouse button.
Public eventTableHeaderRightClicked Occurs when the table header is clicked with the right mouse button.
Top
Fields
 NameDescription
Protected field_cellEdit_IsArmed Indicates whether cell editing is currently armed.
Protected field_cellEdit_IsModified Indicates whether the current cell-edit content was modified.
Protected field_columnWidthResizingPositionsList of x positions where the horizontal resizing cursor should be shown in order to resize the columns.
Protected field_columnWidthResizingPositionsFirstColumnIndexIndex of the first data column that was shown when the list of resizing positions was created.
Protected field_isActive Stores whether the view content is active.
(Inherited from AbstractViewContent)
Protected field_isSelected Stores whether the view content is selected.
(Inherited from AbstractViewContent)
Protected field_isVisible Stores whether the view content is visible.
(Inherited from AbstractViewContent)
Protected field_lastSelectionTypeWhich selection was done last: selection (i) a data column, (ii) a data row, or (iii) a property column.
Protected field_numberOfPropertyCols Cached number of property columns.
Protected field_numberOfTableCols Cached number of table columns.
Protected field_numberOfTableRows Cached number of table rows.
Protected field_selectedDataColumns Holds the indizes to the selected data columns.
Protected field_selectedDataRows Holds the indizes to the selected rows.
Protected field_selectedPropertyColumns Holds the indizes to the selected property columns.
Protected field_selectedPropertyRows Holds the indizes to the selected property rows (but only in case property cells are selected alone).
Protected field_tableHolds the data table cached from the layout.
Protected field_title Stores the current title.
(Inherited from AbstractViewContent)
Protected field_titleToBeLocalized Stores the localized title source.
(Inherited from AbstractViewContent)
Protected field_weakEventHandlerDataColumnChanged Weak event handler for data-column changes.
Protected field_weakEventHandlerForLayout_TunneledEvent Weak event handler for tunneled events raised by the worksheet layout.
Protected field_weakEventHandlerForTable_Changed Weak event handler for changes on the worksheet table.
Protected field_weakEventHandlerForTable_TunneledEvent Weak event handler for tunneled events raised by the worksheet table.
Protected field_weakEventHandlerPropertyColumnChanged Weak event handler for property-column changes.
Protected field_worksheetLayout Holds the worksheet layout controlled by this instance.
Top
See Also