Package com.iizigo.link
Class LinkData
java.lang.Object
com.iizigo.link.LinkData
Data for the link operation, i.e. the target and the sources of the operation.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- LinkData- (IAdaptable target, GProp<?>[] props) Creates the link data information.- LinkData- (IAdaptable target, List<IAdaptable> sources) Creates the link data information.- LinkData- (IAdaptable target, IStructuredSelection selection) Creates the link data information.
- Method SummaryModifier and TypeMethodDescription- <T> T- adapt- (IAdaptable adaptable, Class<T> adaptToClass) Adapts an object if possible to the class.- static ILinkCapableGets or creates an adapter for an object.- void- assignProcessed- (ILinkCapable linkCapable, Collection<IAdaptable> sources) Assigns the set of sources that are processed by the link-capable processor.- void- assignProcessed- (ILinkCapable linkCapable, IAdaptable source) Assigns the set of sources that are processed by the link-capable processor.- void- assignProcessed- (ILinkCapable linkCapable, IAdaptable... sources) Assigns the set of sources that are processed by the link-capable processor.- canLink()Checks if the operation could link.Attempt to perform the link.Returns the list of possible ILinkCapable sources.- getLinkTargets- (UIPanelBase panel, List<ILinkCapable> linkCapableList) Finds the list of UI components that this link capable component can be linked to in a panel.Returns the source properties.Returns the source.- <T> ArrayList<T>- getSources- (Class<T> adaptedClass) Returns the source adapted to the requested class.Gets the target adaptable.- GProp<?>Gets the target property.- static boolean- isLinkable- (ISelection sel) Checks if a selection is linkable.- static booleanGets or creates an adapter for an object.
- Constructor Details- LinkDataCreates the link data information.- Parameters:
- target- The target adaptable.
- props- The properties.
 
- LinkDataCreates the link data information.- Parameters:
- target- The target adaptable.
- selection- The structured selection.
 
- LinkDataCreates the link data information.- Parameters:
- target- The target adaptable.
- sources- The unmodifiable list of adaptable sources.
 
 
- Method Details- getTargetGets the target adaptable.- Returns:
- The target, never null.
 
- getTargetPropertyGets the target property.- Returns:
- A cached target property, may be null.
 
- getSourcesReturns the source.- Returns:
- The unmodifiable list of the properties. The list may be empty.
 
- adaptAdapts an object if possible to the class.- Parameters:
- adaptable- The object.
- adaptToClass- The class to adapt to.
- Returns:
- The adapted instance, or null if it couldn't be adapted.
 
- getSourcesReturns the source adapted to the requested class.- Parameters:
- adaptedClass- The class to adapt to.
- Returns:
- A NEW list (that may be empty).
 
- getSourcePropertiesReturns the source properties.- Returns:
- The unmodifiable list of the properties. The list may be empty.
 
- getLinkSourcesReturns the list of possible ILinkCapable sources.- Returns:
- A cached unmodifiable list of the possible link capable sources.
 
- assignProcessedAssigns the set of sources that are processed by the link-capable processor. This makes it possible to verify that all sources are used once and not more, and that none are left out.- This method can be called several times for the same link-capable processor, the list of sources will be increased. - Parameters:
- linkCapable- The link-capable instance.
- source- The source processed.
 
- assignProcessedAssigns the set of sources that are processed by the link-capable processor. This makes it possible to verify that all sources are used once and not more, and that none are left out.- This method can be called several times for the same link-capable processor, the list of sources will be increased. - Parameters:
- linkCapable- The link-capable instance.
- sources- The sources processed.
 
- assignProcessedAssigns the set of sources that are processed by the link-capable processor. This makes it possible to verify that all sources are used once and not more, and that none are left out.- This method can be called several times for the same link-capable processor, the list of sources will be increased. - Parameters:
- linkCapable- The link-capable instance.
- sources- The sources processed.
 
- canLinkChecks if the operation could link.- Returns:
- A status.
 
- doLinkAttempt to perform the link.- Parameters:
- doPerform- The perform operation flag.
- shell- The shell is only needed when performing the operation.
- doDisplayDialog- Flag to always display dialog.
- Returns:
- The feedback.
 
- adaptLinkCapableGets or creates an adapter for an object. Object types supported are: ILinkCapable, GProp, DesignerProp, IResource, IMethod, IAdaptable (IType).- Parameters:
- o- The object.
- Returns:
- The link capable, or null if not link capable.
 
- isLinkCapableAdaptableGets or creates an adapter for an object. Object types supported are: ILinkCapable, GProp, DesignerProp, IResource, IMethod, IAdaptable (IType).- Parameters:
- o- The object.
- Returns:
- true if it could potentially become an ILinkCapable object if adapted.
 
- isLinkableChecks if a selection is linkable.
- getLinkTargetsFinds the list of UI components that this link capable component can be linked to in a panel.- Parameters:
- panel- The target panel.