Package com.iizigo.vs
Class ActionsPanel
- java.lang.Object
- org.eclipse.swt.widgets.Widget
- org.eclipse.swt.widgets.Control
- org.eclipse.swt.widgets.Scrollable
- org.eclipse.swt.widgets.Composite
- com.iizigo.vs.ActionsPanel
- All Implemented Interfaces:
IContextMenuContributor
,IContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
,IVirtualSpacePanel
,IVSActionListener
,IVSComponentListener
,IVSComponentState
,org.eclipse.swt.graphics.Drawable
public class ActionsPanel extends org.eclipse.swt.widgets.Composite implements IVirtualSpacePanel, IContextMenuContributor, IVSActionListener
Panel used for the Participants in the VirtualSpace.- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.State
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Called to append menu items.boolean
doAddExpandCollapseAll(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Checks if expand/collapse all menu items should be added.DesignerProp
getTarget()
Gets the default target when none other is found for the pop-up menu in the viewer.void
onActionCompleted(VSAction action, VSActionTXProcess process, java.lang.Throwable exception)
Called after the action completes the TXP processing i.e.void
onActionInvoked(VSAction action, VSActionTXProcess process)
Called before the action invokes the Action Actors.void
onBroken(VSRelativeReference<?> reference, VSAction action)
Called when the property reference has been broken, i.e.void
onConnections(IVSActionListener[] listeners)
Called to update the connections.void
onEditedProperty(GProp<?> _action)
Selection changed for panel.void
onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
Called when the parent changes state.void
onResolved(VSRelativeReference<?> reference, VSAction action)
Called when the property reference has been resolved.void
onStateChanged(VSAction action, IVSComponentState.State state, boolean on)
Called when the field changes state.void
prependMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Called to prepend menu items.void
saveSettings()
Saves the settings.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
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, toString
Method Detail
saveSettings
public void saveSettings()
Saves the settings.- Specified by:
saveSettings
in interfaceIVirtualSpacePanel
onEditedProperty
public void onEditedProperty(GProp<?> _action)
Selection changed for panel.- Specified by:
onEditedProperty
in interfaceIVirtualSpacePanel
prependMenuItems
public void prependMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Called to prepend menu items.- Specified by:
prependMenuItems
in interfaceIContextMenuContributor
- Specified by:
prependMenuItems
in interfaceIContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
- Parameters:
viewer
- The viewer.menu
- The pop-up menu.target
- The selected target in the viewer, null for none.
appendMenuItems
public void appendMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Called to append menu items.- Specified by:
appendMenuItems
in interfaceIContextMenuContributor
- Specified by:
appendMenuItems
in interfaceIContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
- Parameters:
viewer
- The viewer.menu
- The pop-up menu.target
- The selected target in the viewer, null for none.
doAddExpandCollapseAll
public boolean doAddExpandCollapseAll(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Checks if expand/collapse all menu items should be added.- Specified by:
doAddExpandCollapseAll
in interfaceIContextMenuContributor
getTarget
public DesignerProp getTarget()
Gets the default target when none other is found for the pop-up menu in the viewer.- Specified by:
getTarget
in interfaceIContextMenuContributor
- Specified by:
getTarget
in interfaceIContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
- Returns:
- The target, or null to use the default edited property.
onConnections
public void onConnections(IVSActionListener[] listeners)
Called to update the connections.
onResolved
public void onResolved(VSRelativeReference<?> reference, VSAction action)
Description copied from interface:IVSActionListener
Called when the property reference has been resolved. UI components use this method to set its state according to the field.- Specified by:
onResolved
in interfaceIVSActionListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.action
- The target reference.
onBroken
public void onBroken(VSRelativeReference<?> reference, VSAction action)
Description copied from interface:IVSActionListener
Called when the property reference has been broken, i.e. unresolved.- Specified by:
onBroken
in interfaceIVSActionListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.action
- The target reference.
onStateChanged
public void onStateChanged(VSAction action, IVSComponentState.State state, boolean on)
Description copied from interface:IVSActionListener
Called when the field changes state.- Specified by:
onStateChanged
in interfaceIVSActionListener
- Parameters:
action
- The VS action.state
- The state change.on
- New state.
onParentStateChanged
public void onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
Description copied from interface:IVSComponentListener
Called when the parent changes state.- Specified by:
onParentStateChanged
in interfaceIVSComponentListener
- Parameters:
parent
- The parent who's state was changed.state
- The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.on
- New state.
onActionInvoked
public void onActionInvoked(VSAction action, VSActionTXProcess process)
Description copied from interface:IVSActionListener
Called before the action invokes the Action Actors.This method is called in the execution trigger thread.
- Specified by:
onActionInvoked
in interfaceIVSActionListener
- Parameters:
action
- The VS action.process
- The initialized process.
onActionCompleted
public void onActionCompleted(VSAction action, VSActionTXProcess process, java.lang.Throwable exception)
Description copied from interface:IVSActionListener
Called after the action completes the TXP processing i.e. all its Action Actor calls. This method is called regardless of success or failures. It can be used to check the state of the process.This method is called from the thread that executed the TX action process.
- Specified by:
onActionCompleted
in interfaceIVSActionListener
- Parameters:
action
- The VS action.process
- The completed process.exception
- Potential exception in TX process, null for none.