public class FwkDesktop extends javax.swing.JFrame implements java.awt.event.WindowListener, FwkWindowInterface
,
Serialized Formjavax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
protected FwkApplicationInterface |
application |
protected java.lang.String |
applicationClassName |
protected java.lang.String[] |
args |
protected static FwkDescriptionInterface |
descriptor |
protected javax.swing.JDesktopPane |
desktopPane |
protected FwkDesktopMenuBar |
fwkMenuBar |
protected FwkPersistence |
fwkPersistence |
static java.lang.String |
version |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
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 |
---|
FwkDesktop() |
FwkDesktop(FwkApplicationInterface application)
Constructor that receives the class name of the application that should be started.
|
FwkDesktop(java.lang.String className)
Constructor that receives the class name of the application that should be started.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
closeApplications()
Try to close all application.
|
boolean |
destroyController()
Called by the application to inform the frame
that it is being reclaimed and that it should
destroy any resources that it has allocated.
|
java.lang.String |
getApplicationClassName()
Retrieves the class name of the application.
|
java.lang.String |
getApplicationName()
Retrieves the name of the application.
|
java.lang.String[] |
getArguments()
Get the frame arguments.
|
java.lang.String |
getAuthor()
Get the author name.
|
java.lang.String |
getBuild()
Get the build number.
|
java.lang.String |
getClassName()
Get the class name of the FWK object.
|
java.net.URL |
getCodeBase()
Gets the base URL.
|
java.lang.String |
getCompany()
Get the company name.
|
java.lang.String |
getCompanyInternetAddress()
Get the internet address of the company.
|
java.lang.String |
getCopyright()
Get the copyright.
|
java.lang.String |
getCreationDate()
Get the creation date.
|
java.lang.String |
getCreationDate(java.lang.String formatString)
Get the creation date.
|
java.lang.String |
getDateFormatString()
Get the date format string.
|
java.lang.String |
getDescription()
Get the description.
|
static FwkDescriptionInterface |
getDescriptor() |
FwkIconInterface |
getIcon()
Get the icon of the application.
|
FwkIconInterface |
getIcon(int type)
Get the image icon of the application
|
java.lang.String |
getIconKey()
Get the property keyword of the icon.
|
java.lang.String |
getIconKey(int type)
Get the property keyword of the icon.
|
java.lang.String |
getName()
Get the name.
|
java.lang.String |
getPresentationString()
Get the presentation string.
|
java.lang.String |
getPresentationString(java.util.Locale l)
Get the presentation string.
|
java.lang.String |
getSupportEMail()
Get the support e-mail.
|
java.lang.String |
getTitle()
Get the title.
|
java.lang.String |
getTitleName()
Get the title name.
|
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
Returns an object which represents the data to be transferred.
|
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
void |
init()
Initialize the frame.
|
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Returns whether or not the specified data flavor is supported for this object.
|
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
Notifies this object that it is no longer the owner of the contents of the clipboard.
|
static void |
main(java.lang.String[] args)
Main module of the Frame.
|
void |
release()
Release the object.
|
void |
setApplicationClassName(java.lang.String className)
Set the class name of the application.
|
void |
setArguments(java.lang.String[] args)
Set the frame arguments.
|
void |
setAuthor(java.lang.String author)
Set the author name.
|
void |
setBuild(java.lang.String buildnr)
Set the build number.
|
void |
setClassName(java.lang.String className)
Set the class name of the FWK object.
|
void |
setCompany(java.lang.String company)
Set the company name.
|
void |
setCompanyInternetAddress(java.lang.String address)
Set the internet address of the company.
|
void |
setCopyright(java.lang.String copyright)
Set the copyright.
|
void |
setCreationDate(java.lang.String dateString)
Set the Date of the application.
|
void |
setCreationDate(java.lang.String dateString,
java.lang.String formatString)
Set the Date of the application.
|
void |
setDateFormatString(java.lang.String formatString)
Set the Date format string.
|
void |
setDescription(java.lang.String description)
Set the description of the application.
|
void |
setDescriptor(FwkDescriptionInterface descriptor)
Initialize the object with values of the given FwkDescription.
|
void |
setHeight(int height)
Set the frame height.
|
void |
setIcon(FwkIconInterface icon)
Get the icon of the application.
|
void |
setIcon(FwkIconInterface icon,
int type)
Set the image icon of the application
This method fires a property change event on property "Icon".
|
void |
setIconKey(java.lang.String key)
Set the property keyword of the icon.
|
void |
setIconKey(java.lang.String key,
int type)
Set the property keyword of the icon.
|
void |
setName(java.lang.String name)
Set the application name.
|
void |
setSupportEMail(java.lang.String eMail)
Get the support e-mail.
|
void |
setTitleName(java.lang.String name)
Set the application title name.
|
void |
setWidth(int width)
Set the width of the frame.
|
void |
setX(int x)
Set the X position of frame (upper left corner).
|
void |
setY(int y)
Set the Y position of the frame (upper left corner).
|
void |
start()
Start the FWK frame application an make the
frame visible.
|
void |
stop()
Called by the application to inform the
frame that it should stop its execution.
|
void |
windowActivated(java.awt.event.WindowEvent ev)
Invoked when a window is activated.
|
void |
windowClosed(java.awt.event.WindowEvent ev)
Invoked when a window has been closed.
|
void |
windowClosing(java.awt.event.WindowEvent ev)
Invoked when a window is in the process of being closed.
|
void |
windowDeactivated(java.awt.event.WindowEvent ev)
Invoked when a window is de-activated.
|
void |
windowDeiconified(java.awt.event.WindowEvent ev)
Invoked when a window is de-iconified.
|
void |
windowIconified(java.awt.event.WindowEvent ev)
Invoked when a window is iconified.
|
void |
windowOpened(java.awt.event.WindowEvent ev)
Invoked when a window has been opened.
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getHeight, getWidth, getX, getY, setVisible
public static final java.lang.String version
protected static final FwkDescriptionInterface descriptor
protected java.lang.String[] args
protected java.lang.String applicationClassName
protected FwkApplicationInterface application
protected javax.swing.JDesktopPane desktopPane
protected FwkDesktopMenuBar fwkMenuBar
protected FwkPersistence fwkPersistence
public FwkDesktop()
public FwkDesktop(java.lang.String className)
className
- The name of the application class.public FwkDesktop(FwkApplicationInterface application)
application
- The application.public java.lang.String getVersion()
FwkInterface
getVersion
in interface FwkInterface
public static FwkDescriptionInterface getDescriptor()
public void release()
release
in interface FwkInterface
protected boolean closeApplications()
public boolean destroyController()
destroyController
in interface FwkControllerInterface
public java.lang.String getApplicationClassName()
getApplicationClassName
in interface FwkWindowInterface
public java.lang.String getApplicationName()
getApplicationName
in interface FwkWindowInterface
public java.lang.String[] getArguments()
getArguments
in interface FwkWindowInterface
public java.net.URL getCodeBase()
getCodeBase
in interface FwkWindowInterface
public void init()
init
in interface FwkWindowInterface
setArguments()
public void setApplicationClassName(java.lang.String className)
setApplicationClassName
in interface FwkWindowInterface
className
- The name of the application class.public void setArguments(java.lang.String[] args)
setArguments
in interface FwkWindowInterface
args
- The argument array.public void setHeight(int height)
setHeight
in interface FwkWindowInterface
height
- The height of the frame.public void setWidth(int width)
setWidth
in interface FwkWindowInterface
width
- The width of the frame.public void setX(int x)
setX
in interface FwkWindowInterface
x
- The X position of the upper left corner of the frame.public void setY(int y)
setY
in interface FwkWindowInterface
y
- The Y position of the upper left corner of the frame.public void start() throws FwkException
start
in interface FwkWindowInterface
FwkException
public void stop()
stop
in interface FwkWindowInterface
public java.lang.String getAuthor()
getAuthor
in interface FwkDescriptionInterface
setAuthor(String)
public java.lang.String getBuild()
getBuild
in interface FwkDescriptionInterface
#setBuild(int)
public java.lang.String getCompany()
getCompany
in interface FwkDescriptionInterface
setCompany(String)
public void setClassName(java.lang.String className)
setClassName
in interface FwkDescriptionInterface
className
- The class name.getClassName()
public java.lang.String getClassName()
getClassName
in interface FwkDescriptionInterface
className
- The class name.setClassName(String)
public java.lang.String getCompanyInternetAddress()
getCompanyInternetAddress
in interface FwkDescriptionInterface
public java.lang.String getCopyright()
getCopyright
in interface FwkDescriptionInterface
setCopyright(String)
public java.lang.String getCreationDate()
getCreationDate
in interface FwkDescriptionInterface
#setCreationDate(Date)
public java.lang.String getCreationDate(java.lang.String formatString)
getCreationDate
in interface FwkDescriptionInterface
formatString
- The date format string#java.text.SimpleDateFormat
,
#setCreationDate(Date)
public java.lang.String getDateFormatString()
getDateFormatString
in interface FwkDescriptionInterface
public java.lang.String getDescription()
getDescription
in interface FwkDescriptionInterface
setDescription(String)
public FwkIconInterface getIcon()
getIcon
in interface FwkDescriptionInterface
setIcon(FwkIconInterface)
public FwkIconInterface getIcon(int type)
getIcon
in interface FwkDescriptionInterface
type
- The type of the icon, use the predefined values (see above).#setIcon(Icon)
public java.lang.String getIconKey()
getIconKey
in interface FwkDescriptionInterface
public java.lang.String getIconKey(int type)
getIconKey
in interface FwkDescriptionInterface
type
- The type of the icon, use the predefined values (see above).public java.lang.String getName()
getName
in interface FwkDescriptionInterface
getName
in class java.awt.Component
setName(String)
public java.lang.String getSupportEMail()
getSupportEMail
in interface FwkDescriptionInterface
public java.lang.String getTitleName()
getTitleName
in interface FwkDescriptionInterface
setTitleName(String)
public java.lang.String getTitle()
getTitle
in interface FwkDescriptionInterface
getTitle
in class java.awt.Frame
public void setAuthor(java.lang.String author)
setAuthor
in interface FwkDescriptionInterface
author
- The name of the author.getAuthor()
public void setBuild(java.lang.String buildnr)
setBuild
in interface FwkDescriptionInterface
The
- number of build.getBuild()
public void setCompany(java.lang.String company)
setCompany
in interface FwkDescriptionInterface
company
- The name of the company.getCompany()
public void setCompanyInternetAddress(java.lang.String address)
setCompanyInternetAddress
in interface FwkDescriptionInterface
public void setCreationDate(java.lang.String dateString, java.lang.String formatString)
setCreationDate
in interface FwkDescriptionInterface
dateString
- The Date of the application.formatString
- The format string.#java.text.SimpleDateFormat
,
getCreationDate()
public void setCreationDate(java.lang.String dateString)
setCreationDate
in interface FwkDescriptionInterface
dateString
- The Date of the application.#java.text.SimpleDateFormat
,
getCreationDate()
public void setDateFormatString(java.lang.String formatString)
setDateFormatString
in interface FwkDescriptionInterface
formatString
- The format string.#java.text.SimpleDateFormat
,
getCreationDate()
public void setDescriptor(FwkDescriptionInterface descriptor)
setDescriptor
in interface FwkDescriptionInterface
desciptor
- The FwkDescription from that the value should be copied.public void setCopyright(java.lang.String copyright)
setCopyright
in interface FwkDescriptionInterface
The
- copyright string.getCopyright()
public void setDescription(java.lang.String description)
setDescription
in interface FwkDescriptionInterface
description
- The description of the application.getDescription()
public void setIcon(FwkIconInterface icon)
setIcon
in interface FwkDescriptionInterface
#getIcon(FwkIconInterface)
public void setIcon(FwkIconInterface icon, int type)
setIcon
in interface FwkDescriptionInterface
icon
- The icon to be set.type
- The type of the icon, use predefined values defined above.getIcon()
public void setIconKey(java.lang.String key)
setIconKey
in interface FwkDescriptionInterface
key
- The keyword for the icon.public void setIconKey(java.lang.String key, int type)
setIconKey
in interface FwkDescriptionInterface
key
- The keyword for the icon.type
- The type of the icon, use predefined values defined above.public void setName(java.lang.String name)
setName
in interface FwkDescriptionInterface
setName
in class java.awt.Component
name
- The name of the application.getName()
public void setSupportEMail(java.lang.String eMail)
setSupportEMail
in interface FwkDescriptionInterface
eMail
- A string containing the support e-mail.public void setTitleName(java.lang.String name)
setTitleName
in interface FwkDescriptionInterface
name
- The title name of the application.getTitleName()
public java.lang.String getPresentationString(java.util.Locale l)
getPresentationString
in interface FwkDescriptionInterface
l
- The localepublic java.lang.String getPresentationString()
getPresentationString
in interface FwkDescriptionInterface
l
- The localepublic java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
flavor
- - the requested flavor for the datapublic java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface java.awt.datatransfer.Transferable
flavor
- - the requested flavor for the datajava.io.IOException
- - if the data is no longer available in the requested flavor.
UnsupportedFlavorException - if the requested data flavor is not supported.java.awt.datatransfer.UnsupportedFlavorException
java.awt.datatransfer.DataFlavor.getRepresentationClass()
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
clipboard
- - the clipboard that is no longer ownedcontents
- - the contents which this owner had placed on the clipboardpublic void windowOpened(java.awt.event.WindowEvent ev)
windowOpened
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent ev)
windowClosing
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent ev)
windowClosed
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent ev)
windowIconified
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent ev)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowActivated(java.awt.event.WindowEvent ev)
windowActivated
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent ev)
windowDeactivated
in interface java.awt.event.WindowListener
public static void main(java.lang.String[] args)