Interface Actionable

  • All Known Implementing Classes:
    FileRepo, InfoFileRepo, WorkspaceRepository

    public interface Actionable
    An interface to allow bnd to provide commands on elements. This interface can provide information about the implementer but it can also provide information about its elements. These elements are identified by a target. A target is one or more objects that uniquely identify a child in the container. The exact protocol for the target is left to the implementers, this interface is just a conduit between the bnd world (no Eclipse etc) and the GUI world, using only bnd and java interfaces.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Runnable> actions​(java.lang.Object... target)
      Return a map with command names (potentially localized) and a Runnable.
      java.lang.String title​(java.lang.Object... target)
      Provide a title for an element.
      java.lang.String tooltip​(java.lang.Object... target)
      Return a tooltip for the given target or the encompassing entity if null is passed.
    • Method Detail

      • actions

        java.util.Map<java.lang.String,​java.lang.Runnable> actions​(java.lang.Object... target)
                                                                  throws java.lang.Exception
        Return a map with command names (potentially localized) and a Runnable. The caller can execute the caller at will.
        Parameters:
        target - the target object, null if commands for the encompassing entity is sought (e.g. the repo itself).
        Returns:
        A Map with the actions or null if no actions are available.
        Throws:
        java.lang.Exception
      • tooltip

        java.lang.String tooltip​(java.lang.Object... target)
                          throws java.lang.Exception
        Return a tooltip for the given target or the encompassing entity if null is passed.
        Parameters:
        target - the target, any number of parameters to identify
        Returns:
        the tooltip or null
        Throws:
        java.lang.Exception
      • title

        java.lang.String title​(java.lang.Object... target)
                        throws java.lang.Exception
        Provide a title for an element.
        Parameters:
        target - the target, any number of parameters to identify
        Returns:
        the text for this element
        Throws:
        java.lang.Exception