Package com.iizigo.vs
Class ValuePanel
java.lang.Object
com.iizigo.vs.ValuePanel
- All Implemented Interfaces:
IContextMenuContributor
,IContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
,IVirtualSpacePanel
,IVSComponentListener
,IVSComponentState
,IVSFieldListener
public class ValuePanel extends Object 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
Modifier and TypeMethodDescriptionvoid
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.getBestVSFieldValueType
(VSRelativeReference<?> reference) Requests the value type that would best suit the listener.Gets the default target when none other is found for the pop-up menu in the viewer.void
onBroken
(VSRelativeReference<?> reference, VSField field) Called when the property reference has been broken, i.e.void
onConnections
(IVSFieldListener[] listeners) Called to update the connections.void
onEditedProperty
(GProp<?> _field) Selection changed for panel.void
onParentStateChanged
(IVSComponent parent, IVSComponentState.State state, boolean on) Called when the parent changes state.void
onResolved
(VSRelativeReference<?> reference, VSField field) Called when the property reference has been resolved.void
onStateChanged
(VSField field, IVSComponentState.State state, boolean on) Called when the field changes state.void
onValueChanged
(VSField field, Value value, GProp<?> trigger, IPostEventProcessing pp) Called when the field value is set.void
prependMenuItems
(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target) Called to prepend menu items.void
Saves the settings.
Method Details
saveSettings
public void saveSettings()Saves the settings.- Specified by:
saveSettings
in interfaceIVirtualSpacePanel
onEditedProperty
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
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
Called to update the connections.getBestVSFieldValueType
Description copied from interface:IVSFieldListener
Requests the value type that would best suit the listener.- Specified by:
getBestVSFieldValueType
in interfaceIVSFieldListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.- Returns:
- null if none is available.
onResolved
Description copied from interface:IVSFieldListener
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 interfaceIVSFieldListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.field
- The target reference.
onBroken
Description copied from interface:IVSFieldListener
Called when the property reference has been broken, i.e. unresolved.- Specified by:
onBroken
in interfaceIVSFieldListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.field
- The target reference.
onStateChanged
Description copied from interface:IVSFieldListener
Called when the field changes state.- Specified by:
onStateChanged
in interfaceIVSFieldListener
- Parameters:
field
- The VS field.state
- The state change.on
- New state.
onParentStateChanged
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.
onValueChanged
Description copied from interface:IVSFieldListener
Called when the field value is set.- Specified by:
onValueChanged
in 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.