Package com.iizigo.vs
Class TablePanel
- All Implemented Interfaces:
- IComplexOperationSelection,- IContextMenuContributor,- IContextMenuContributorFormControl<Viewer>,- IFilterListener,- ISavePanel,- IVirtualSpacePanel,- EventListener,- IVSColumnBestValueListener,- IVSColumnListener,- IVSComponentListener,- IVSComponentState,- IVSTableListener,- EventListener,- DisposeListener,- Drawable,- SWTEventListener
public class TablePanel extends CustomSashForm implements IVirtualSpacePanel, DisposeListener, EventListener, IFilterListener, IComplexOperationSelection, IVSColumnListener, IVSTableListener, IContextMenuContributor, ISavePanel
Panel used to display a selected Table in the VirtualSpace.
- Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from class com.iizix.swt.CustomSashForm- CustomSashForm.ICustomSashFormListener- Nested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState- IVSComponentState.State
- Field Summary- Fields inherited from class com.iizix.swt.CustomSashForm- ARROW_DRAWN_INDEX, ARROW_HEIGHT, ARROW_MARGIN, ARROW_TYPE_INDEX, ARROW_WIDTH, arrowColor, borderColor, currentSashInfo, customSashFormListeners, DOWN_HIDE_ARROW, DOWN_RESTORE_ARROW, HEIGHT_INDEX, HIDE_ARROWS, inMouseClick, NO_HIDE_DOWN, NO_HIDE_LEFT, NO_HIDE_RIGHT, NO_HIDE_UP, noHideDown, noHideUp, sashBorders, UP_HIDE_ARROW, UP_RESTORE_ARROW, WIDTH_INDEX, X_INDEX, Y_INDEX- Fields inherited from class org.eclipse.swt.custom.SashForm- SASH_WIDTH
- Method SummaryModifier and TypeMethodDescription- void- appendMenuItems- (Viewer viewer, IzMenu menu, DesignerProp target) Called to append menu items.- boolean- doAddExpandCollapseAll- (Viewer viewer, IzMenu menu, DesignerProp target) Checks if expand/collapse all menu items should be added.- void- doComplexOperationSelection- (GProp<?>[] props) Performs the selection of the components.- getBestVSColumnHeaderValueType- (VSRelativeReference<?> reference) Requests the value type that would best suit the listener.Override this method to return the initial selection that is suitable for restoring a selection using- doComplexOperationSelection(GProp []).Gets the default target when none other is found for the pop-up menu in the viewer.- booleanChecks if this interface returns the selection before the operation takes place or not.- void- onBroken- (VSRelativeReference<?> reference, VSColumnHeader column) Called when the property reference has been broken, i.e.- void- onBroken- (VSRelativeReference<?> reference, VSTable table) Called when the property reference has been broken, i.e.- void- onCellStateChanged- (VSField cell, IVSComponentState.State state, boolean on) Called when the cell changes state.- void- onCellValueChanged- (VSColumnHeader column, VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the cell value is set in the column.- void- onCellValueChanged- (VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the cell value is set.- void- onConnections- (IVSColumnListener[] listeners) Called to update the connections.- void- onConnections- (IVSTableListener[] listeners) Called to update the connections.- void- onEditedProperty- (GProp<?> comp) Selection changed for panel.- voidProperty event.- voidCalled when a filter text has been applied.- void- onParentStateChanged- (IVSComponent parent, IVSComponentState.State state, boolean on) Called when the parent changes state.- void- onResolved- (VSRelativeReference<?> reference, VSColumnHeader column) Called when the property reference has been resolved.- void- onResolved- (VSRelativeReference<?> reference, VSTable table) Called when the property reference has been resolved.- void- onRowAdded- (VSColumnHeader column, VSRow row, int rowIndex) Called when a row has been added to the table.- void- onRowAdded- (VSRow row, int index) Called when a row is added.- void- onRowRemoved- (VSColumnHeader column, VSRow row, int rowIndex) Called when a row has been removed from the table.- void- onRowRemoved- (VSRow row, int index) Called when a row is removed.- void- onRowStateChanged- (VSRow row, IVSComponentState.State state, boolean on) Called when a row selection state changed.- void- onSelectionChanged- (VSColumnHeader column, VSRow row, int rowIndex, boolean isSelected) Called when the row selection is changed to forward to column listeners.- void- onSingleSelectionChanged- (VSColumnHeader column, int rowIndex) Called when the row selection in table single-selection mode is changed to forward to column listeners.- void- onSingleSelectionChanged- (VSTable table, int index) Called when the single selection changes.- void- onStateChanged- (VSColumnHeader table, IVSComponentState.State state, boolean on) Called when the column changes state.- void- onStateChanged- (VSColumnHeader column, VSField cell, IVSComponentState.State state, boolean on) Called when a cell in the column changes state.- void- onStateChanged- (VSTable table, IVSComponentState.State state, boolean on) Called when the table changes state.- void- prependMenuItems- (Viewer viewer, IzMenu menu, DesignerProp target) Called to prepend menu items.- voidCalled to save settings.- boolean- setCellFocus- (EditorVSField field) Selects the field in the table by placing the cursor on the cell and selecting the row.- voidSent when the widget is disposed.- Methods inherited from class com.iizix.swt.CustomSashForm- addCustomSashFormListener, downHideClicked, downRestoreClicked, drawArrow, drawDownHideArrow, drawDownRestoreArrow, drawLeftHideArrow, drawLeftRestoreArrow, drawRightHideArrow, drawRightRestoreArrow, drawSashBorder, drawUpHideArrow, drawUpRestoreArrow, fireDividerMoved, getNewSashArray, getRestoreWeight, getSash, getSavedSizes, getWeightsForSave, hideDown, hideLeft, hideRight, hideUp, isFirstSashVisible, isFocusAncestorA, isNoHideDown, isNoHideLeft, isNoHideRight, isNoHideUp, isSecondSashVisible, layout, recomputeSashInfo, removeCustomSashFormListener, setFirstSashVisible, setNoHideDown, setNoHideLeft, setNoHideRight, setNoHideUp, setRestoreWeight, setSashBorders, setSecondSashVisible, setWeights, upHideClicked, upRestoreClicked- Methods inherited from class org.eclipse.swt.custom.SashForm- getMaximizedControl, getOrientation, getSashWidth, getStyle, getWeights, setBackground, setForeground, setLayout, setMaximizedControl, setOrientation, setSashWidth, setToolTipText- Methods inherited from class org.eclipse.swt.widgets.Composite- changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, redraw, setBackgroundMode, setFocus, setLayoutDeferred, setTabList, toString- Methods inherited from class org.eclipse.swt.widgets.Scrollable- computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsMode- Methods inherited from class org.eclipse.swt.widgets.Control- addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update- Methods inherited from class org.eclipse.swt.widgets.Widget- addDisposeListener, addListener, addTypedListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface org.eclipse.swt.graphics.Drawable- isAutoScalable- Methods inherited from interface com.iizigo.editor.complex.IComplexOperationSelection- isDisposed
- Method Details- saveSettingspublic void saveSettings()Called to save settings.- Specified by:
- saveSettingsin interface- ISavePanel
- Specified by:
- saveSettingsin interface- IVirtualSpacePanel
 
- setCellFocusSelects the field in the table by placing the cursor on the cell and selecting the row.- Returns:
- true if successful, false if field cell is not inside table.
 
- onEditedPropertySelection changed for panel.- Specified by:
- onEditedPropertyin interface- IVirtualSpacePanel
 
- onEventProperty event.- Specified by:
- onEventin interface- EventListener
- Parameters:
- event- The event.
 
- widgetDisposedSent when the widget is disposed.- Specified by:
- widgetDisposedin interface- DisposeListener
- Parameters:
- e- an event containing information about the dispose
 
- onFilterCalled when a filter text has been applied.- Specified by:
- onFilterin interface- IFilterListener
- Parameters:
- text- The filter text to apply, null for none (never empty string).
 
- doComplexOperationSelectionPerforms the selection of the components.- Specified by:
- doComplexOperationSelectionin interface- IComplexOperationSelection
 
- isReturningSelectionBeforeOperationpublic boolean isReturningSelectionBeforeOperation()Checks if this interface returns the selection before the operation takes place or not.- Specified by:
- isReturningSelectionBeforeOperationin interface- IComplexOperationSelection
- Returns:
- false, must be overridden to return the selection before.
 
- getSelectionBeforeOverride this method to return the initial selection that is suitable for restoring a selection using- doComplexOperationSelection(GProp []).- Use the method - ComplexOperation.newContainerSelection(GProp)to create the array elements.- Specified by:
- getSelectionBeforein interface- IComplexOperationSelection
- Parameters:
- op- The complex operation.
- Returns:
- The selection that can be restored, null for none.
 
- prependMenuItemsCalled to prepend menu items.- Specified by:
- prependMenuItemsin interface- IContextMenuContributor
- Specified by:
- prependMenuItemsin interface- IContextMenuContributorFormControl<Viewer>
- Parameters:
- viewer- The viewer.
- menu- The pop-up menu.
- target- The selected target in the viewer, null for none.
 
- appendMenuItemsCalled to append menu items.- Specified by:
- appendMenuItemsin interface- IContextMenuContributor
- Specified by:
- appendMenuItemsin interface- IContextMenuContributorFormControl<Viewer>
- Parameters:
- viewer- The viewer.
- menu- The pop-up menu.
- target- The selected target in the viewer, null for none.
 
- doAddExpandCollapseAllChecks if expand/collapse all menu items should be added.- Specified by:
- doAddExpandCollapseAllin interface- IContextMenuContributor
 
- getTargetGets the default target when none other is found for the pop-up menu in the viewer.- Specified by:
- getTargetin interface- IContextMenuContributor
- Specified by:
- getTargetin interface- IContextMenuContributorFormControl<Viewer>
- Returns:
- The target, or null to use the default edited property.
 
- onConnectionsCalled to update the connections.
- onConnectionsCalled to update the connections.
- getBestVSColumnHeaderValueTypeDescription copied from interface:- IVSColumnBestValueListenerRequests the value type that would best suit the listener.- Specified by:
- getBestVSColumnHeaderValueTypein interface- IVSColumnBestValueListener
- Parameters:
- reference- The VSRelativeReference instance holding the reference.
- Returns:
- null if none is available.
 
- onResolvedDescription copied from interface:- IVSColumnListenerCalled when the property reference has been resolved. UI components use this method to set its state according to the field.- Specified by:
- onResolvedin interface- IVSColumnListener
- Parameters:
- reference- The VSRelativeReference instance holding the reference.
- column- The target reference.
 
- onBrokenDescription copied from interface:- IVSColumnListenerCalled when the property reference has been broken, i.e. unresolved.- Specified by:
- onBrokenin interface- IVSColumnListener
- Parameters:
- reference- The VSRelativeReference instance holding the reference.
- column- The target reference.
 
- onStateChangedDescription copied from interface:- IVSColumnListenerCalled when the column changes state.- Specified by:
- onStateChangedin interface- IVSColumnListener
- Parameters:
- table- The VS table column.
- state- The state change, possible values ENABLED, READONLY, VISIBLE or SELECTED.
- on- New state.
 
- onParentStateChangedDescription copied from interface:- IVSComponentListenerCalled when the parent changes state.- Specified by:
- onParentStateChangedin interface- IVSComponentListener
- Parameters:
- parent- The parent who's state was changed.
- state- The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.
- on- New state.
 
- onSingleSelectionChangedDescription copied from interface:- IVSColumnListenerCalled when the row selection in table single-selection mode is changed to forward to column listeners.- Specified by:
- onSingleSelectionChangedin interface- IVSColumnListener
- Parameters:
- column- The column.
- rowIndex- The row index selected, -1 for none.
 
- onSelectionChangedDescription copied from interface:- IVSColumnListenerCalled when the row selection is changed to forward to column listeners.- Specified by:
- onSelectionChangedin interface- IVSColumnListener
- Parameters:
- column- The column.
- row- The row that was changed.
- rowIndex- The row index.
- isSelected- The selected state.
 
- onStateChangedpublic void onStateChanged- (VSColumnHeader column, VSField cell, IVSComponentState.State state, boolean on) Description copied from interface:- IVSColumnListenerCalled when a cell in the column changes state.- Specified by:
- onStateChangedin interface- IVSColumnListener
- Parameters:
- column- The VS column.
- cell- The VS field.
- state- The state change.
- on- New state.
 
- onCellValueChangedpublic void onCellValueChanged- (VSColumnHeader column, VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Description copied from interface:- IVSColumnListenerCalled when the cell value is set in the column.- Specified by:
- onCellValueChangedin interface- IVSColumnListener
- Parameters:
- column- The VS column.
- cell- The VS field.
- value- The value, never null, but- value.isNull()could be true.
- trigger- The trigger property that may be null.
- postProcessing- Post-processing instance.
 
- onRowAddedDescription copied from interface:- IVSColumnListenerCalled when a row has been added to the table.- Specified by:
- onRowAddedin interface- IVSColumnListener
- Parameters:
- column- The column.
- row- The row that was added.
- rowIndex- The row index where it was inserted.
 
- onRowRemovedDescription copied from interface:- IVSColumnListenerCalled when a row has been removed from the table.- Specified by:
- onRowRemovedin interface- IVSColumnListener
- Parameters:
- column- The column.
- row- The row that was removed.
- rowIndex- The row index before removal.
 
- onResolvedDescription copied from interface:- IVSTableListenerCalled when the property reference has been resolved. UI components use this method to set its state according to the field.- Specified by:
- onResolvedin interface- IVSTableListener
- Parameters:
- reference- The VSRelativeReference instance holding the reference.
- table- The target reference.
 
- onBrokenDescription copied from interface:- IVSTableListenerCalled when the property reference has been broken, i.e. unresolved.- Specified by:
- onBrokenin interface- IVSTableListener
- Parameters:
- reference- The VSRelativeReference instance holding the reference.
- table- The target reference.
 
- onStateChangedDescription copied from interface:- IVSTableListenerCalled when the table changes state.- Specified by:
- onStateChangedin interface- IVSTableListener
- Parameters:
- table- The VS table.
- state- The state change.
- on- New state.
 
- onSingleSelectionChangedDescription copied from interface:- IVSTableListenerCalled when the single selection changes.- Specified by:
- onSingleSelectionChangedin interface- IVSTableListener
- Parameters:
- table- The table.
- index- The row index, -1 if table is unselected.
 
- onRowAddedDescription copied from interface:- IVSTableListenerCalled when a row is added.- Specified by:
- onRowAddedin interface- IVSTableListener
- Parameters:
- row- The row.
- index- The index.
 
- onRowRemovedDescription copied from interface:- IVSTableListenerCalled when a row is removed.- Specified by:
- onRowRemovedin interface- IVSTableListener
- Parameters:
- row- The row.
- index- The index.
 
- onRowStateChangedDescription copied from interface:- IVSTableListenerCalled when a row selection state changed.- Specified by:
- onRowStateChangedin interface- IVSTableListener
- Parameters:
- row- The row.
- state- The state change.
- on- New state.
 
- onCellStateChangedDescription copied from interface:- IVSTableListenerCalled when the cell changes state.- Specified by:
- onCellStateChangedin interface- IVSTableListener
- Parameters:
- cell- The VS cell.
- state- The state change.
- on- New state.
 
- onCellValueChangedpublic void onCellValueChanged- (VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Description copied from interface:- IVSTableListenerCalled when the cell value is set.- Specified by:
- onCellValueChangedin interface- IVSTableListener
- Parameters:
- cell- The VS field.
- value- The value, never null, but- value.isNull()could be true.
- trigger- The trigger property that may be null.
- postProcessing- Post-processing instance.