Package jadex.base.gui.componentviewer
Class AbstractServiceViewerPanel<T>
- java.lang.Object
-
- jadex.base.gui.componentviewer.AbstractServiceViewerPanel<T>
-
- All Implemented Interfaces:
IAbstractViewerPanel
,IServiceViewerPanel
,IPropertiesProvider
- Direct Known Subclasses:
ChatPanel
,SimServiceViewerPanel
public abstract class AbstractServiceViewerPanel<T> extends java.lang.Object implements IServiceViewerPanel
Simple default viewer panel.
-
-
Field Summary
Fields Modifier and Type Field Description protected IControlCenter
jcc
The jcc.protected T
service
The service.protected boolean
shutdown
True, after shutdown.-
Fields inherited from interface jadex.base.gui.componentviewer.IAbstractViewerPanel
PROPERTY_VIEWERCLASS
-
-
Constructor Summary
Constructors Constructor Description AbstractServiceViewerPanel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract javax.swing.JComponent
getComponent()
The component to be shown in the gui.java.lang.String
getId()
The id used for mapping properties.IControlCenter
getJCC()
Get the jcc.IFuture<Properties>
getProperties()
Advices the panel provide its setting as properties (if any).T
getService()
Get the service.IFuture<IExternalAccess>
getServiceAccess()
Get the external access of the component providing the service.IFuture<java.lang.Void>
init(IControlCenter jcc, IService service)
Called once to initialize the panel.boolean
isLocal()
Test if the service is a local service.boolean
isShutdown()
Test if the panel is already shut down.IFuture<java.lang.Void>
setProperties(Properties ps)
Advices the the panel to restore its properties from the argumentIFuture<java.lang.Void>
shutdown()
Informs the panel that it should stop all its computation
-
-
-
Field Detail
-
jcc
protected IControlCenter jcc
The jcc.
-
service
protected T service
The service.
-
shutdown
protected boolean shutdown
True, after shutdown.
-
-
Method Detail
-
init
public IFuture<java.lang.Void> init(IControlCenter jcc, IService service)
Called once to initialize the panel. Called on the swing thread.- Specified by:
init
in interfaceIServiceViewerPanel
- Parameters:
jcc
- The jcc.component
- The component.
-
shutdown
public IFuture<java.lang.Void> shutdown()
Informs the panel that it should stop all its computation- Specified by:
shutdown
in interfaceIAbstractViewerPanel
-
isShutdown
public boolean isShutdown()
Test if the panel is already shut down.
-
getId
public java.lang.String getId()
The id used for mapping properties.- Specified by:
getId
in interfaceIAbstractViewerPanel
-
getComponent
public abstract javax.swing.JComponent getComponent()
The component to be shown in the gui.- Specified by:
getComponent
in interfaceIAbstractViewerPanel
- Returns:
- The component to be displayed.
-
setProperties
public IFuture<java.lang.Void> setProperties(Properties ps)
Advices the the panel to restore its properties from the argument- Specified by:
setProperties
in interfaceIPropertiesProvider
-
getProperties
public IFuture<Properties> getProperties()
Advices the panel provide its setting as properties (if any). This is done on project close or save.- Specified by:
getProperties
in interfaceIPropertiesProvider
-
getJCC
public IControlCenter getJCC()
Get the jcc.- Returns:
- the jcc.
-
isLocal
public boolean isLocal()
Test if the service is a local service.
-
getServiceAccess
public IFuture<IExternalAccess> getServiceAccess()
Get the external access of the component providing the service. Might refer to a different platform than jcc access abnd platform access!
-
getService
public T getService()
Get the service.
-
-