Class OddjobPanel

All Implemented Interfaces:
Serializable, Runnable, ArooaContextAware, ArooaSessionAware, ServiceProvider, Services, PropertyChangeNotifier, Iconic, LogEnabled, Resettable, Stateful, Stoppable, Structural

public class OddjobPanel extends SimpleService implements ServiceProvider, Services, Serializable, Stoppable, Structural
Provide a simple panel with buttons on, that run Oddjob jobs.

Since:
1.3
Author:
rob
See Also:
  • Field Details

  • Constructor Details

    • OddjobPanel

      public OddjobPanel()
      Constructor.
  • Method Details

    • setExecutorService

      @Inject public void setExecutorService(ExecutorService executorService)
      Parameters:
      executorService - Executor Service.
      Reference Property:
      executorService

      Description

      The ExecutorService to use. This will be automatically set by Oddjob.
      Required:
      No.
    • createPanel

      protected JComponent createPanel()
    • onStart

      protected void onStart() throws Throwable
      Specified by:
      onStart in class SimpleService
      Throws:
      Throwable
    • onStop

      protected void onStop() throws FailedToStopException
      Description copied from class: SimpleService
      Allow sub classes to do something on stop.
      Overrides:
      onStop in class SimpleService
      Throws:
      FailedToStopException
    • addStructuralListener

      public void addStructuralListener(StructuralListener listener)
      Add a listener. The listener will immediately receive add notifications for all existing children.
      Specified by:
      addStructuralListener in interface Structural
      Parameters:
      listener - The listener.
    • removeStructuralListener

      public void removeStructuralListener(StructuralListener listener)
      Remove a listener.
      Specified by:
      removeStructuralListener in interface Structural
      Parameters:
      listener - The listener.
    • setJobs

      public void setJobs(int index, Runnable child)
      Add a child.
      Parameters:
      child - A child
      Reference Property:
      jobs

      Description

      The child jobs.
      Required:
      No, but pointless if missing.
    • getServices

      public Services getServices()
      Description copied from interface: ServiceProvider
      Provider the services.
      Specified by:
      getServices in interface ServiceProvider
      Returns:
      The services. May be null.
    • getService

      public Object getService(String serviceName) throws IllegalArgumentException
      Description copied from interface: Services
      Provide the service for the given name.
      Specified by:
      getService in interface Services
      Parameters:
      serviceName -
      Returns:
      A service for the name.
      Throws:
      IllegalArgumentException - If no service for the name can be provided.
    • serviceNameFor

      public String serviceNameFor(Class<?> theClass, String flavour)
      Description copied from interface: Services
      If these services can provide a service of the given class then a name that identifies the service is provided.
      Specified by:
      serviceNameFor in interface Services
      Parameters:
      theClass - The type of service.
      flavour - An optional flavour. May be null.
      Returns:
      A service name, or null if none can be provided.
    • getColumns

      public int getColumns()
    • setColumns

      public void setColumns(int cols)
    • getScreen

      public ScreenPresence getScreen()