public interface RunnableComponent
SingleInstanceJFrame
.Modifier and Type | Method and Description |
---|---|
void |
activate()
This method is called when the container gains the focus for the first time or after have lost
it.
|
void |
addTo(RootPaneContainer cont,
Object constraints)
Instructs this
RunnableComponent to be self-placed into the
specified RootPaneContainer . |
void |
end()
Notifies the component that the main program will be halted soon, and all resources must
be freed.
|
boolean |
newInstanceRequest(String param1,
String param2)
A new instance of the
RunnableComponent has been requested by the user. |
boolean |
start(String param1,
String param2)
Instructs the
RunnableComponent to start working. |
void |
stop()
Instructs the RunnableComponent to stop working.
|
boolean |
windowCloseRequested()
Called by the main container when it receives a
windowClosing event. |
void addTo(RootPaneContainer cont, Object constraints)
RunnableComponent
to be self-placed into the
specified RootPaneContainer
.cont
- The container in wich the component should be placed.constraints
- The constraints used in the call to the add
method of the Container
. This parameter can be null
.boolean start(String param1, String param2)
RunnableComponent
to start working.param1
- First parameter passed to the component. Can be null
.param2
- Second parameter passed to the component. Can also be null
.true
if the component has been turned on, false
otherwise.void stop()
void end()
void activate()
boolean newInstanceRequest(String param1, String param2)
RunnableComponent
has been requested by the user.param1
- First parameter passed to the component. Can be null
.param2
- Second parameter passed to the component. Can also be null
.true
if the request was successfull, false
otherwise.boolean windowCloseRequested()
windowClosing
event.true
if the component can be safely disposed, false
otherwise.Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.