Package org.oddjob.swing
Class OddjobPanel
java.lang.Object
org.oddjob.framework.extend.BaseComponent
org.oddjob.framework.extend.SimpleService
org.oddjob.swing.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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStructuralListener(StructuralListener listener) Add a listener.protected JComponentintgetService(String serviceName) Provide the service for the given name.Provider the services.protected voidonStart()protected voidonStop()Allow sub classes to do something on stop.voidremoveStructuralListener(StructuralListener listener) Remove a listener.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.voidsetColumns(int cols) voidsetExecutorService(ExecutorService executorService) Set theExecutorService.voidAdd a child.Methods inherited from class org.oddjob.framework.extend.SimpleService
fireDestroyedState, getName, getStateChanger, hardReset, iconHelper, logger, loggerName, onDestroy, run, setName, softReset, stateHandler, stop, toStringMethods inherited from class org.oddjob.framework.extend.BaseComponent
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, save, setArooaContext, setArooaSessionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.oddjob.Stateful
addStateListener, lastStateEvent, removeStateListener
-
Field Details
-
childHelper
-
-
Constructor Details
-
OddjobPanel
public OddjobPanel()Constructor.
-
-
Method Details
-
setExecutorService
Set theExecutorService.- Parameters:
executorService- Executor Service.- Reference Property:
- executorService
- Required:
- No.
Description
The ExecutorService to use. This will be automatically set by Oddjob. -
createPanel
-
onStart
- Specified by:
onStartin classSimpleService- Throws:
Throwable
-
onStop
Description copied from class:SimpleServiceAllow sub classes to do something on stop.- Overrides:
onStopin classSimpleService- Throws:
FailedToStopException
-
addStructuralListener
Add a listener. The listener will immediately receive add notifications for all existing children.- Specified by:
addStructuralListenerin interfaceStructural- Parameters:
listener- The listener.
-
removeStructuralListener
Remove a listener.- Specified by:
removeStructuralListenerin interfaceStructural- Parameters:
listener- The listener.
-
setJobs
Add a child.- Parameters:
child- A child- Reference Property:
- jobs
- Required:
- No, but pointless if missing.
Description
The child jobs. -
getServices
Description copied from interface:ServiceProviderProvider the services.- Specified by:
getServicesin interfaceServiceProvider- Returns:
- The services. May be null.
-
getService
Description copied from interface:ServicesProvide the service for the given name.- Specified by:
getServicein interfaceServices- Parameters:
serviceName-- Returns:
- A service for the name.
- Throws:
IllegalArgumentException- If no service for the name can be provided.
-
serviceNameFor
Description copied from interface:ServicesIf these services can provide a service of the given class then a name that identifies the service is provided.- Specified by:
serviceNameForin interfaceServices- 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
-