Package com.iizigo.vs
Class ValuePanel
- java.lang.Object
- org.eclipse.swt.widgets.Widget
- org.eclipse.swt.widgets.Control
- org.eclipse.swt.widgets.Scrollable
- org.eclipse.swt.widgets.Composite
- org.eclipse.swt.custom.ScrolledComposite
- com.iizigo.vs.ValuePanel
- All Implemented Interfaces:
IContextMenuContributor,IContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>,IVirtualSpacePanel,IVSComponentListener,IVSComponentState,IVSFieldListener,org.eclipse.swt.graphics.Drawable
public class ValuePanel extends org.eclipse.swt.custom.ScrolledComposite implements IVirtualSpacePanel, IContextMenuContributor, IVSFieldListener
Panel used for the Value 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 voidappendMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)Called to append menu items.booleandoAddExpandCollapseAll(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)Checks if expand/collapse all menu items should be added.Value.TypegetBestVSFieldValueType(VSRelativeReference<?> reference)Requests the value type that would best suit the listener.DesignerPropgetTarget()Gets the default target when none other is found for the pop-up menu in the viewer.voidonBroken(VSRelativeReference<?> reference, VSField field)Called when the property reference has been broken, i.e.voidonConnections(IVSFieldListener[] listeners)Called to update the connections.voidonEditedProperty(GProp<?> _field)Selection changed for panel.voidonParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)Called when the parent changes state.voidonResolved(VSRelativeReference<?> reference, VSField field)Called when the property reference has been resolved.voidonStateChanged(VSField field, IVSComponentState.State state, boolean on)Called when the field changes state.voidonValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing pp)Called when the field value is set.voidprependMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)Called to prepend menu items.voidsaveSettings()Saves the settings.Methods inherited from class org.eclipse.swt.custom.ScrolledComposite
getAlwaysShowScrollBars, getContent, getExpandHorizontal, getExpandVertical, getMinHeight, getMinWidth, getOrigin, getShowFocusedControl, setAlwaysShowScrollBars, setContent, setExpandHorizontal, setExpandVertical, setLayout, setMinHeight, setMinSize, setMinSize, setMinWidth, setOrigin, setOrigin, setShowFocusedControl, showControl
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, setLayoutDeferred, setTabList, toString
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
Method Detail
saveSettings
public void saveSettings()
Saves the settings.- Specified by:
saveSettingsin interfaceIVirtualSpacePanel
onEditedProperty
public void onEditedProperty(GProp<?> _field)
Selection changed for panel.- Specified by:
onEditedPropertyin interfaceIVirtualSpacePanel
prependMenuItems
public void prependMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)Called to prepend menu items.- Specified by:
prependMenuItemsin interfaceIContextMenuContributor- Specified by:
prependMenuItemsin 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:
appendMenuItemsin interfaceIContextMenuContributor- Specified by:
appendMenuItemsin 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:
doAddExpandCollapseAllin interfaceIContextMenuContributor
getTarget
public DesignerProp getTarget()
Gets the default target when none other is found for the pop-up menu in the viewer.- Specified by:
getTargetin interfaceIContextMenuContributor- Specified by:
getTargetin interfaceIContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>- Returns:
- The target, or null to use the default edited property.
onConnections
public void onConnections(IVSFieldListener[] listeners)
Called to update the connections.
getBestVSFieldValueType
public Value.Type getBestVSFieldValueType(VSRelativeReference<?> reference)
Description copied from interface:IVSFieldListenerRequests the value type that would best suit the listener.- Specified by:
getBestVSFieldValueTypein interfaceIVSFieldListener- Parameters:
reference- The VSRelativeReference instance holding the reference.- Returns:
- null if none is available.
onResolved
public void onResolved(VSRelativeReference<?> reference, VSField field)
Description copied from interface:IVSFieldListenerCalled when the property reference has been resolved. UI components use this method to set its state according to the field.- Specified by:
onResolvedin interfaceIVSFieldListener- Parameters:
reference- The VSRelativeReference instance holding the reference.field- The target reference.
onBroken
public void onBroken(VSRelativeReference<?> reference, VSField field)
Description copied from interface:IVSFieldListenerCalled when the property reference has been broken, i.e. unresolved.- Specified by:
onBrokenin interfaceIVSFieldListener- Parameters:
reference- The VSRelativeReference instance holding the reference.field- The target reference.
onStateChanged
public void onStateChanged(VSField field, IVSComponentState.State state, boolean on)
Description copied from interface:IVSFieldListenerCalled when the field changes state.- Specified by:
onStateChangedin interfaceIVSFieldListener- Parameters:
field- The VS field.state- The state change.on- New state.
onParentStateChanged
public void onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
Description copied from interface:IVSComponentListenerCalled when the parent changes state.- Specified by:
onParentStateChangedin 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.
onValueChanged
public void onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing pp)
Description copied from interface:IVSFieldListenerCalled when the field value is set.- Specified by:
onValueChangedin interfaceIVSFieldListener- Parameters:
field- The VS field.value- The value, never null, butvalue.isNull()could be true.trigger- The trigger property that may be null.pp- Post-processing instance.