public abstract class FwkApplication extends FwkInfoBusMember implements FwkApplicationInterface
| Property Keyword | Datatype | Default | Description |
|---|---|---|---|
| classname.Height | int | -1 | The height of a newly created frame. The classname must be the full java specific classname of your application. |
| classname.Width | int | -1 | The width of a newly created frame. The classname must be the full java specific classname of your application. |
| classname.X | int | -1 | The x position of a newly created frame. The classname must be the full java specific classname of your application. |
| classname.Y | int | -1 | The y position of a newly created frame. The classname must be the full java specific classname of your application. |
,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Thread |
applicationThread |
protected java.lang.String[] |
args |
protected FwkControllerInterface |
controller |
protected static FwkDescriptionInterface |
descriptor |
protected boolean |
eternal |
protected java.util.HashMap |
executeStateListeners |
protected java.awt.print.PageFormat |
pageFormat |
protected FwkPanelInterface |
panel |
protected FwkPortInterface |
port |
protected boolean |
readingDOM |
protected FwkServiceControlManagerInterface |
serviceControlManager |
protected FwkStatusLabel |
statusLabel |
protected FwkPanelInterface |
statusPanel |
static java.lang.String |
version |
infoBusMemberSupportchangeManager, properties, suspendChangeManagersourceauthor, buildnr, className, company, copyright, creationDate, dateFormatString, description, eMail, FWK_ICON, FWK_ICON_ARRAY, FWK_ICON_BG, FWK_ICON_BG_ARRAY, FWK_ICON_BG_LARGE, FWK_ICON_BG_LARGE_ARRAY, FWK_ICON_LARGE, FWK_ICON_LARGE_ARRAY, icon, ICON, iconCount, iconKey, internetAddress, name, titleNameINFOBUS_SOURCEAUTHOR, BUILDNR, COMPANY, COPYRIGHT, DATE_FORMAT, DEFAULT_ICON, DESCRIPTION, INTERNET, LARGE_ICON, LARGE_KEY_EXT, LARGE_OPAQUE_ICON, LARGE_OPAQUE_KEY_EXT, OPAQUE_ICON, OPAQUE_KEY_EXT, RCS_DATE_FORMAT, SUPPORT_EMAIL, TITLE_NAME| Constructor and Description |
|---|
FwkApplication() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExecuteStateListener(FwkExecuteStateListenerInterface l)
Add an execution state listener.
|
boolean |
destroyController()
Destroy the application GUI.
|
boolean |
exit()
Exit the application gracefully and release all
related resources
|
void |
fireExecuteStateEvent(FwkExecuteStateEventInterface event)
Fire an execute state event.
|
FwkControllerInterface |
getController()
Get the controller instance of the application.
|
static FwkDescriptionInterface |
getDescriptor() |
FwkPortInterface |
getFwkPort()
Get the FwkPort of application.
|
int |
getNumberOfPages()
Get the total number of pages printed by this application.
|
java.awt.print.PageFormat |
getPageFormat(int pi)
Returns the PageFormat of the page specified by pageIndex.
|
FwkPanelInterface |
getPanel()
Get the panel of this application.
|
java.awt.print.Printable |
getPrintable(int pi)
Returns the Printable instance responsible for
rendering the page specified by pageIndex.
|
java.lang.String |
getPrintJobName()
Get the name of the printjob.
|
int |
getPriority()
Get the priority of the thread.
|
FwkPanelInterface |
getStatusPanel()
Get the status panel of this application.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
boolean |
hasFwkPort()
Return a boolean whether the application has a FwkPort.
|
void |
init()
Initialize the application.
|
boolean |
isEternal()
Return a boolean whether or not the application is eternal.
|
boolean |
isInterrupted()
Test whether the thread is interruped.
|
boolean |
isRegistered()
Return a boolean whether the application is registered.
|
int |
print(java.awt.Graphics gp,
java.awt.print.PageFormat pf,
int pi)
The application print command.
|
java.lang.Object |
readConstructor(org.w3c.dom.Document document,
org.w3c.dom.Element node)
Read a construtor dom node.
|
void |
readFromDOM(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
Read from DOM
|
boolean |
readingDOM()
Get the DOM reading flag.
|
void |
readingDOM(boolean flag)
Set a flag that the object is currently reading the DOM.
|
void |
register()
Register the application with the FwkApplicationBus.
|
void |
register(FwkArrayInterface mimeTypes)
Register the application with the FwkApplicationBus.
|
void |
register(java.lang.String[] mimeTypes)
Register the application with the FwkApplicationBus.
|
void |
removeExecuteStateListener(FwkExecuteStateListenerInterface l)
Remove an execution state listener.
|
abstract void |
run()
Run the application.
|
void |
setArguments(java.lang.String[] args) |
void |
setController(FwkControllerInterface controller)
Set the controller instance of the application.
|
void |
setEternal(boolean eternalFlag)
This method sets the eternal flag of the application.
|
void |
setPageFormat(java.awt.print.PageFormat pf,
int pi)
Set the pageformat of the printable object.
|
void |
setPanel(FwkPanelInterface panel)
Set the panel of this application.
|
void |
setPriority(int prio)
Set the priority of the thread.
|
void |
setServiceControlManager(FwkServiceControlManagerInterface serviceControlManager)
Set the service control manager of this application.
|
void |
start()
Start the framework application.
|
void |
stop()
Stop the FWK application thread.
|
void |
unregister()
Unregister the application.
|
org.w3c.dom.Element |
writeConstructor(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
Write a construtor dom node.
|
org.w3c.dom.Element |
writeToDOM(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
Write the container as child to the given DOM node.
|
boolean |
writeToXML(java.lang.String filename,
boolean validate)
Writes the canvas to an XML file.
|
addInfoBusPropertyListener, addInfoBusVetoableListener, finalize, getInfoBus, getInfoBusName, getMemberName, isConnected, joinInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus, setInfoBusName, setMemberName, setNameaddDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getName, getProperty, getPropertyGroup, getSource, isChangeManagerSuspended, release, removeDataItemChangeListener, setProperty, setPropertyGroup, suspendChangeManageraddCommand, addCommand, addToGroup, addToGroup, addVetoableChangeListener, addVetoableChangeListener, clearCommands, commandsAvailable, compareTo, deleteGroup, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getAuthor, getBuild, getCommand, getCommands, getCommands, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getFwkMimeTypes, getGroup, getIcon, getIcon, getIconKey, getIconKey, getPersistentObjectNames, getSupportEMail, getTitle, getTitleName, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, groupExists, removeCommand, removeFromGroup, removeVetoableChangeListener, removeVetoableChangeListener, setAuthor, setBuild, setCommands, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setDateFormatString, setDescription, setDescriptor, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setSource, setSupportEMail, setTitleNameaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEventsgetClassName, getPresentationString, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate, toStringgetNiceVersionclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInfoBusName, getMemberName, isConnected, setInfoBusName, setMemberNameaddInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBusgetCompanyfireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, setProperty, setPropertyGroup, suspendChangeManagergetCommands, getPersistentObjectNamesaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEventsaddVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListenergetAuthor, getBuild, getClassName, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIcon, getIconKey, getIconKey, getName, getPresentationString, getPresentationString, getSupportEMail, getTitle, getTitleName, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setName, setSupportEMail, setTitleNamegetTransferData, getTransferDataFlavors, isDataFlavorSupportedaddCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommandsgetPresentationString, getPresentationStringreleasepublic static final java.lang.String version
protected static final FwkDescriptionInterface descriptor
protected FwkPanelInterface panel
protected FwkPanelInterface statusPanel
protected FwkStatusLabel statusLabel
protected java.lang.String[] args
protected transient java.lang.Thread applicationThread
protected boolean eternal
protected java.awt.print.PageFormat pageFormat
protected FwkPortInterface port
protected FwkControllerInterface controller
protected boolean readingDOM
protected FwkServiceControlManagerInterface serviceControlManager
protected java.util.HashMap executeStateListeners
public java.lang.String getVersion()
FwkInterfacegetVersion in interface FwkInterfacegetVersion in class FwkInfoBusMemberpublic static FwkDescriptionInterface getDescriptor()
public boolean exit()
exit in interface FwkApplicationInterfacepublic boolean destroyController()
destroyController in interface FwkControllerInterfacedestroyController in class FwkPersistencepublic FwkPortInterface getFwkPort()
getFwkPort in interface FwkApplicationInterfacehasFwkPort()public FwkControllerInterface getController()
getController in interface FwkControlledByInterfacepublic FwkPanelInterface getPanel()
getPanel in interface FwkApplicationInterfacepublic void setPanel(FwkPanelInterface panel)
setPanel in interface FwkApplicationInterfacepanel - The panel of the application.public FwkPanelInterface getStatusPanel()
getStatusPanel in interface FwkApplicationInterfacepublic boolean hasFwkPort()
hasFwkPort in interface FwkApplicationInterfacepublic void init()
init in interface FwkApplicationInterfacesetArguments()public boolean isEternal()
isEternal in interface FwkApplicationInterfacepublic boolean isRegistered()
isRegistered in interface FwkApplicationInterfacepublic void register()
throws FwkException
register in interface FwkApplicationInterfaceFwkExceptionpublic void register(FwkArrayInterface mimeTypes) throws FwkException
register in interface FwkApplicationInterfacemimeTypes - The mimetype array.FwkException - if the application is eternal and already registered.public void register(java.lang.String[] mimeTypes)
throws FwkException
register in interface FwkApplicationInterfacemimeTypes - The mimetype list.FwkException - if the application is eternal and already registered.public abstract void run()
Add this method to implement meaningful functionality.
run in interface java.lang.Runnablepublic void setArguments(java.lang.String[] args)
setArguments in interface FwkApplicationInterfacepublic void setController(FwkControllerInterface controller)
setController in interface FwkControlledByInterfacecontroller - The controller instance of the application.public void setEternal(boolean eternalFlag)
setEternal in interface FwkApplicationInterfaceeternalFlag - Set to true if the application
shall be eternal.public void setServiceControlManager(FwkServiceControlManagerInterface serviceControlManager)
setServiceControlManager in interface FwkApplicationInterfaceserviceControlManager - The service control manager.public void addExecuteStateListener(FwkExecuteStateListenerInterface l)
addExecuteStateListener in interface FwkApplicationInterfacel - The listener.public void removeExecuteStateListener(FwkExecuteStateListenerInterface l)
removeExecuteStateListener in interface FwkApplicationInterfacel - The listener.public void fireExecuteStateEvent(FwkExecuteStateEventInterface event)
fireExecuteStateEvent in interface FwkApplicationInterfaceevent - The event to be fired.public void start()
start in interface FwkThreadInterfacepublic void setPriority(int prio)
setPriority in interface FwkThreadInterfaceprio - This value is passed to the java.lang.ThreadThreadpublic int getPriority()
getPriority in interface FwkThreadInterfaceThreadpublic boolean isInterrupted()
isInterrupted in interface FwkThreadInterfacepublic void stop()
stop in interface FwkThreadInterfacepublic void unregister()
unregister in interface FwkApplicationInterfacepublic int print(java.awt.Graphics gp,
java.awt.print.PageFormat pf,
int pi)
throws java.awt.print.PrinterException
print in interface java.awt.print.Printablegp - the context into which the page is drawnpf - the size and orientation of the page being drawnpi - the zero based index of the page to be drawnjava.awt.print.PrinterException - thrown when the print job is terminated.Printablepublic int getNumberOfPages()
getNumberOfPages in interface java.awt.print.PageableThe - total number of pages to be printed.Pageablepublic java.awt.print.PageFormat getPageFormat(int pi)
getPageFormat in interface java.awt.print.Pageablepi - The page index.Pageable,
PageFormatpublic void setPageFormat(java.awt.print.PageFormat pf,
int pi)
setPageFormat in interface FwkPrintableInterfacepf - The new pageformat.pi - The page index.public java.awt.print.Printable getPrintable(int pi)
getPrintable in interface java.awt.print.Pageablepi - The page index.Pageable,
PageFormatpublic java.lang.String getPrintJobName()
getPrintJobName in interface FwkPrintableInterfacepublic java.lang.Object readConstructor(org.w3c.dom.Document document,
org.w3c.dom.Element node)
readConstructor in interface FwkDOMHandlerInterfacedocument - The documnent Object Model.dtd - The dtd descriptor.node - The node.classProperties - Map the contains the writable object properties.
May be null.public void readFromDOM(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
readFromDOM in interface FwkDOMHandlerInterfacepublic org.w3c.dom.Element writeConstructor(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
writeConstructor in interface FwkDOMHandlerInterfacedocument - The documnent Object Model.dtd - The dtd descriptor.node - The node.classProperties - Map the contains the writable object properties.
May be null.public org.w3c.dom.Element writeToDOM(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
writeToDOM in interface FwkDOMHandlerInterfacedocument - The documnent Object Model.node - The parent node.classProperties - Map the contains the writable object properties.
May be null.public boolean writeToXML(java.lang.String filename,
boolean validate)
writeToXML in interface FwkDOMHandlerInterfacefilename - The name of the xml file.validate - Write a validated cml file.public void readingDOM(boolean flag)
readingDOM in interface FwkDOMHandlerInterfaceflag - true if the object reads currently fom DOM.public boolean readingDOM()
readingDOM in interface FwkDOMHandlerInterface