public class OddjobPanel extends SimpleService implements ServiceProvider, Services, Serializable, Stoppable, Structural
Modifier and Type | Field and Description |
---|---|
protected ChildHelper<Object> |
childHelper |
Constructor and Description |
---|
OddjobPanel()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addStructuralListener(StructuralListener listener)
Add a listener.
|
protected JComponent |
createPanel() |
int |
getColumns() |
ScreenPresence |
getScreen() |
Object |
getService(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.
|
String |
serviceNameFor(Class<?> theClass,
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(ExecutorService executorService)
Set the
ExecutorService . |
void |
setJobs(int index,
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<Object> childHelper
@Inject public void setExecutorService(ExecutorService executorService)
ExecutorService
.Property: executorService
Description: The ExecutorService to use. This will be automatically set by Oddjob.
Required: No.
child
- A childprotected JComponent createPanel()
protected void onStart() throws Throwable
onStart
in class SimpleService
Exception
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, 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 Object getService(String serviceName) throws IllegalArgumentException
Services
getService
in interface Services
IllegalArgumentException
- If no service for the
name can be provided.public String serviceNameFor(Class<?> theClass, 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()