Class VSMappings


  • public class VSMappings
    extends java.lang.Object
    Class containing mappings of a panel and its components to the VirtualSpace and the VSComponents.
    Author:
    Christopher Mindus
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanadd​(java.lang.String uiRef, UIComp uiComp, VSComponent vsComp)
      Adds a new mapping.
      booleanadd​(java.lang.String uiRef, UIComp uiComp, VSComponent vsComp, boolean force)
      Adds a new mapping.
      java.util.List<VSComponent>get​(UIComp uiComp)
      Gets the mappings of a panel UIComp to the VirtualSpace VSComponent's.
      java.util.List<UIComp>get​(VSComponent vsComp)
      Gets the mappings of a VSComponent to the panel components.
      java.lang.Stringlist​(UIComp uiComp, java.lang.String indent)
      Lists the mappings from UI to VS.
      java.lang.Stringlist​(VSComponent vsComp, java.lang.String indent)
      Lists the mappings from VS to UI.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • add

        public boolean add​(java.lang.String uiRef,
                           UIComp uiComp,
                           VSComponent vsComp)
        Adds a new mapping. Calling this method several times for the same UIComp/VSComponent pair will not add an additional entry. If the VS component is ignoring UI focus, this method does nothing...

        This method is equivalent to calling add(uiRef, uiComp, vsComp, false);.

        Parameters:
        uiRef - The uiComp.getReferencePropName() value.
        uiComp - The panel component.
        vsComp - The VirtualSpace component.
        Returns:
        true if added, false otherwise (might be a duplicate).
      • add

        public boolean add​(java.lang.String uiRef,
                           UIComp uiComp,
                           VSComponent vsComp,
                           boolean force)
        Adds a new mapping. Calling this method several times for the same UIComp/VSComponent pair will not add an additional entry. If the VS component is ignoring UI focus, this method does nothing...
        Parameters:
        uiRef - The uiComp.getReferencePropName() value.
        uiComp - The panel component.
        vsComp - The VirtualSpace component.
        force - Flag to forcibly add the reference, regardless if the component is set to ignore focus.
        Returns:
        true if added, false otherwise (might be a duplicate).
      • get

        public java.util.List<UIComp> get​(VSComponent vsComp)
        Gets the mappings of a VSComponent to the panel components.
        Parameters:
        vsComp - The VirtualSpace component.
        Returns:
        An unmodifiable collection of UIComp's, or null for none. The list is sorted with the deepest UI component first.
      • get

        public java.util.List<VSComponent> get​(UIComp uiComp)
        Gets the mappings of a panel UIComp to the VirtualSpace VSComponent's.
        Parameters:
        uiComp - The UI component.
        Returns:
        An unmodifiable list of VSComponent's, or null for none. The list is sorted with the deepest VS component first.
      • list

        public java.lang.String list​(UIComp uiComp,
                                     java.lang.String indent)
        Lists the mappings from UI to VS.
        Parameters:
        uiComp - UI component to look-up, null for all.
        indent - Indent string to prepend all new lines with.
        Returns:
        The list string.
      • list

        public java.lang.String list​(VSComponent vsComp,
                                     java.lang.String indent)
        Lists the mappings from VS to UI.
        Parameters:
        vsComp - VS component to look-up, null for all.
        indent - Indent string to prepend all new lines with.
        Returns:
        The list string.