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 FormModifier 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 |
infoBusMemberSupport
changeManager, properties, suspendChangeManager
source
author, 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, titleName
INFOBUS_SOURCE
AUTHOR, 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, setName
addDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getName, getProperty, getPropertyGroup, getSource, isChangeManagerSuspended, release, removeDataItemChangeListener, setProperty, setPropertyGroup, suspendChangeManager
addCommand, 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, setTitleName
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEvents
getClassName, getPresentationString, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate, toString
getNiceVersion
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInfoBusName, getMemberName, isConnected, setInfoBusName, setMemberName
addInfoBusPropertyListener, addInfoBusVetoableListener, getInfoBus, removeInfoBusPropertyListener, removeInfoBusVetoableListener, setInfoBus
getCompany
fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, setProperty, setPropertyGroup, suspendChangeManager
getCommands, getPersistentObjectNames
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEvents
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListener
getAuthor, 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, setTitleName
getTransferData, getTransferDataFlavors, isDataFlavorSupported
addCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommands
getPresentationString, getPresentationString
release
public 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()
FwkInterface
getVersion
in interface FwkInterface
getVersion
in class FwkInfoBusMember
public static FwkDescriptionInterface getDescriptor()
public boolean exit()
exit
in interface FwkApplicationInterface
public boolean destroyController()
destroyController
in interface FwkControllerInterface
destroyController
in class FwkPersistence
public FwkPortInterface getFwkPort()
getFwkPort
in interface FwkApplicationInterface
hasFwkPort()
public FwkControllerInterface getController()
getController
in interface FwkControlledByInterface
public FwkPanelInterface getPanel()
getPanel
in interface FwkApplicationInterface
public void setPanel(FwkPanelInterface panel)
setPanel
in interface FwkApplicationInterface
panel
- The panel of the application.public FwkPanelInterface getStatusPanel()
getStatusPanel
in interface FwkApplicationInterface
public boolean hasFwkPort()
hasFwkPort
in interface FwkApplicationInterface
public void init()
init
in interface FwkApplicationInterface
setArguments()
public boolean isEternal()
isEternal
in interface FwkApplicationInterface
public boolean isRegistered()
isRegistered
in interface FwkApplicationInterface
public void register() throws FwkException
register
in interface FwkApplicationInterface
FwkException
public void register(FwkArrayInterface mimeTypes) throws FwkException
register
in interface FwkApplicationInterface
mimeTypes
- The mimetype array.FwkException
- if the application is eternal and already registered.public void register(java.lang.String[] mimeTypes) throws FwkException
register
in interface FwkApplicationInterface
mimeTypes
- 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.Runnable
public void setArguments(java.lang.String[] args)
setArguments
in interface FwkApplicationInterface
public void setController(FwkControllerInterface controller)
setController
in interface FwkControlledByInterface
controller
- The controller instance of the application.public void setEternal(boolean eternalFlag)
setEternal
in interface FwkApplicationInterface
eternalFlag
- Set to true if the application
shall be eternal.public void setServiceControlManager(FwkServiceControlManagerInterface serviceControlManager)
setServiceControlManager
in interface FwkApplicationInterface
serviceControlManager
- The service control manager.public void addExecuteStateListener(FwkExecuteStateListenerInterface l)
addExecuteStateListener
in interface FwkApplicationInterface
l
- The listener.public void removeExecuteStateListener(FwkExecuteStateListenerInterface l)
removeExecuteStateListener
in interface FwkApplicationInterface
l
- The listener.public void fireExecuteStateEvent(FwkExecuteStateEventInterface event)
fireExecuteStateEvent
in interface FwkApplicationInterface
event
- The event to be fired.public void start()
start
in interface FwkThreadInterface
public void setPriority(int prio)
setPriority
in interface FwkThreadInterface
prio
- This value is passed to the java.lang.ThreadThread
public int getPriority()
getPriority
in interface FwkThreadInterface
Thread
public boolean isInterrupted()
isInterrupted
in interface FwkThreadInterface
public void stop()
stop
in interface FwkThreadInterface
public void unregister()
unregister
in interface FwkApplicationInterface
public int print(java.awt.Graphics gp, java.awt.print.PageFormat pf, int pi) throws java.awt.print.PrinterException
print
in interface java.awt.print.Printable
gp
- 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.Printable
public int getNumberOfPages()
getNumberOfPages
in interface java.awt.print.Pageable
The
- total number of pages to be printed.Pageable
public java.awt.print.PageFormat getPageFormat(int pi)
getPageFormat
in interface java.awt.print.Pageable
pi
- The page index.Pageable
,
PageFormat
public void setPageFormat(java.awt.print.PageFormat pf, int pi)
setPageFormat
in interface FwkPrintableInterface
pf
- The new pageformat.pi
- The page index.public java.awt.print.Printable getPrintable(int pi)
getPrintable
in interface java.awt.print.Pageable
pi
- The page index.Pageable
,
PageFormat
public java.lang.String getPrintJobName()
getPrintJobName
in interface FwkPrintableInterface
public java.lang.Object readConstructor(org.w3c.dom.Document document, org.w3c.dom.Element node)
readConstructor
in interface FwkDOMHandlerInterface
document
- 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 FwkDOMHandlerInterface
public org.w3c.dom.Element writeConstructor(org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Node node, java.util.Map classProperties)
writeConstructor
in interface FwkDOMHandlerInterface
document
- 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 FwkDOMHandlerInterface
document
- 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 FwkDOMHandlerInterface
filename
- The name of the xml file.validate
- Write a validated cml file.public void readingDOM(boolean flag)
readingDOM
in interface FwkDOMHandlerInterface
flag
- true if the object reads currently fom DOM.public boolean readingDOM()
readingDOM
in interface FwkDOMHandlerInterface