public class OddjobPanel extends SimpleService implements ServiceProvider, Services, java.io.Serializable, Stoppable, Structural
Modifier and Type | Field and Description |
---|---|
protected ChildHelper<java.lang.Object> |
childHelper |
Constructor and Description |
---|
OddjobPanel()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addStructuralListener(StructuralListener listener)
Add a listener.
|
protected javax.swing.JComponent |
createPanel() |
int |
getColumns() |
ScreenPresence |
getScreen() |
java.lang.Object |
getService(java.lang.String serviceName)
Provide the service for the given name.
|
Services |
getServices()
Provider the services.
|
protected void |
onStart() |
protected void |
onStop()
Allow sub classes to do something on stop.
|
void |
removeStructuralListener(StructuralListener listener)
Remove a listener.
|
java.lang.String |
serviceNameFor(java.lang.Class<?> theClass,
java.lang.String flavour)
If these services can provide a service of the given
class then a name that identifies the service is provided.
|
void |
setColumns(int cols) |
void |
setExecutorService(java.util.concurrent.ExecutorService executorService)
Set the
ExecutorService . |
void |
setJobs(int index,
java.lang.Runnable child)
Add a child.
|
fireDestroyedState, getName, getStateChanger, hardReset, iconHelper, logger, loggerName, onDestroy, run, setName, softReset, stateHandler, stop, toString
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, save, setArooaContext, setArooaSession
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addStateListener, lastStateEvent, removeStateListener
protected transient ChildHelper<java.lang.Object> childHelper
@Inject public void setExecutorService(java.util.concurrent.ExecutorService executorService)
ExecutorService
.Property: executorService
Description: The ExecutorService to use. This will be automatically set by Oddjob.
Required: No.
child
- A childprotected javax.swing.JComponent createPanel()
protected void onStart() throws java.lang.Throwable
onStart
in class SimpleService
java.lang.Exception
java.lang.Throwable
protected void onStop() throws FailedToStopException
SimpleService
onStop
in class SimpleService
FailedToStopException
public void addStructuralListener(StructuralListener listener)
addStructuralListener
in interface Structural
listener
- The listener.public void removeStructuralListener(StructuralListener listener)
removeStructuralListener
in interface Structural
listener
- The listener.public void setJobs(int index, java.lang.Runnable child)
Property: jobs
Description: The child jobs.
Required: No, but pointless if missing.
child
- A childpublic Services getServices()
ServiceProvider
getServices
in interface ServiceProvider
public java.lang.Object getService(java.lang.String serviceName) throws java.lang.IllegalArgumentException
Services
getService
in interface Services
java.lang.IllegalArgumentException
- If no service for the
name can be provided.public java.lang.String serviceNameFor(java.lang.Class<?> theClass, java.lang.String flavour)
Services
serviceNameFor
in interface Services
theClass
- The type of service.flavour
- An optional flavour. May be null.public int getColumns()
public void setColumns(int cols)
public ScreenPresence getScreen()