M
- the application model typepublic abstract class EntityApplicationPanel<M extends SwingEntityApplicationModel> extends javax.swing.JPanel implements DialogExceptionHandler, MasterDetailPanel
Modifier and Type | Class and Description |
---|---|
static interface |
EntityApplicationPanel.ApplicationFrameProvider
Provides the JFrame instance to use for the application
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static PropertyValue<java.lang.Boolean> |
CONFIRM_EXIT
Indicates whether the application should ask for confirmation when exiting
Value type: Boolean Default value: false |
static PropertyValue<java.lang.Boolean> |
PERSIST_ENTITY_PANELS
Specifies if EntityPanels opened via the
EntityApplicationPanel.showEntityPanelDialog method
should be persisted, or kept in memory, when the dialog is closed.Value type: Boolean Default value: false |
static PropertyValue<java.lang.Boolean> |
SHOW_STARTUP_DIALOG
Specifies whether a startup dialog should be shown
Value type: Boolean Default value: true |
static PropertyValue<java.lang.Integer> |
TAB_PLACEMENT
Specifies the tab placement
Value type: Integer (JTabbedPane.TOP, JTabbedPane.BOTTOM, JTabbedPane.LEFT, JTabbedPane.RIGHT) Default value: JTabbedPane.TOP |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
EntityApplicationPanel()
A default constructor
|
EntityApplicationPanel(EntityApplicationPanel.ApplicationFrameProvider frameProvider) |
Modifier and Type | Method and Description |
---|---|
void |
activatePanel()
Activates this panel, showing it and preparing it for input
|
void |
addAlwaysOnTopListener(EventDataListener<java.lang.Boolean> listener) |
void |
addApplicationStartedListener(EventListener listener) |
EntityApplicationPanel<M> |
addEntityPanelProvider(EntityPanelProvider panelProvider)
Adds a main application panel, displayed on application start
|
EntityApplicationPanel<M> |
addEntityPanelProviders(EntityPanelProvider... panelProviders)
Adds main application panels, displayed on application start
|
protected void |
addOnExitListener(EventListener listener)
Adds a listener notified when the application is about to exit.
|
EntityApplicationPanel<M> |
addSupportPanelProvider(EntityPanelProvider panelProvider)
Adds a support application panel, available via a support panel menu
|
EntityApplicationPanel<M> |
addSupportPanelProviders(EntityPanelProvider... panelProviders)
Adds support application panels, available via a support panel menu
|
protected void |
bindEvents()
Override to add event bindings after initialization
|
protected Control |
createAboutControl() |
protected Controls.ToggleControl |
createAlwaysOnTopControl() |
protected Control |
createExitControl() |
protected Control |
createHelpControl() |
protected Control |
createLoggingLevelControl() |
protected Control |
createRefreshAllControl() |
protected Control |
createSelectFontSizeControl() |
protected Control |
createSelectLookAndFeelControl() |
protected Control |
createViewApplicationTreeControl() |
protected Control |
createViewDependencyTree() |
void |
displayAbout()
Shows an about dialog
|
void |
displayException(java.lang.Throwable exception,
java.awt.Window dialogParent)
Handle the given exception and display it to the user.
|
void |
displayHelp()
Shows a help dialog
|
void |
exit()
Exits this application
|
protected javax.swing.JPanel |
getAboutPanel() |
EntityPanel |
getActiveDetailPanel() |
protected java.util.List<ControlSet> |
getAdditionalMenuControlSet() |
protected java.lang.String |
getApplicationIdentifier()
Returns a String identifying the application this EntityApplicationPanel represents,
by default the full class name is returned.
|
protected javax.swing.JTabbedPane |
getApplicationTabPane()
Returns the JTabbedPane used by the default UI, note that this can be null if the default UI
initialization has been overridden.
|
protected Version |
getClientVersion() |
protected java.lang.Integer |
getDefaultFontSize() |
protected java.lang.String |
getDefaultLookAndFeelClassName() |
protected java.lang.String |
getDefaultUsername() |
javax.swing.tree.TreeModel |
getDependencyTreeModel() |
java.util.List<MasterDetailPanel> |
getDetailPanels() |
EntityPanel |
getEntityPanel(java.lang.String entityId) |
java.util.List<EntityPanel> |
getEntityPanels() |
protected ControlSet |
getFileControlSet() |
protected java.lang.String |
getFrameTitle(java.lang.String frameCaption,
EntityConnectionProvider connectionProvider) |
protected ControlSet |
getHelpControlSet() |
protected javax.swing.JPanel |
getHelpPanel() |
protected java.lang.String |
getHelpText() |
protected ControlSet |
getMainMenuControlSet() |
MasterDetailPanel |
getMasterPanel() |
M |
getModel() |
MasterDetailPanel |
getNextPanel() |
java.awt.Window |
getParentWindow() |
MasterDetailPanel |
getPreviousPanel() |
protected ControlSet |
getSettingsControlSet() |
protected ControlSet |
getSupportTableControlSet() |
protected ControlSet |
getToolsControlSet() |
protected static User |
getUser(java.lang.String[] args)
Looks up user credentials via a
CredentialsProvider service using an authentication token
found in the program arguments list. |
protected User |
getUser(java.lang.String frameCaption,
User defaultUser,
javax.swing.ImageIcon applicationIcon)
Returns the user, either via a login dialog or via override, called during startup
|
protected ControlSet |
getViewControlSet() |
protected void |
initialize(M applicationModel)
Initializes this application panel
|
protected abstract M |
initializeApplicationModel(EntityConnectionProvider connectionProvider)
Initializes the application model
|
protected EntityConnectionProvider |
initializeConnectionProvider(User user,
java.lang.String clientTypeId)
Initializes the entity connection provider
|
protected java.util.List<EntityPanel> |
initializeEntityPanels(M applicationModel)
By default this method returns the panels defined by the available
EntityPanelProvider s. |
protected javax.swing.JMenuBar |
initializeMenuBar()
Initializes the JMenuBar to use on the application Frame
|
protected javax.swing.JPanel |
initializeNorthPanel()
Initializes a panel to display in the NORTH position of this application panel.
|
protected javax.swing.JPanel |
initializeSouthPanel()
Initializes a panel to display in the SOUTH position of this application frame,
override to provide a south panel.
|
protected javax.swing.JDialog |
initializeStartupDialog(javax.swing.Icon icon,
java.lang.String startupMessage)
Initializes the startup dialog
|
protected javax.swing.JPanel |
initializeStartupProgressPanel(javax.swing.Icon icon)
Initializes the progress panel to show in the startup dialog
|
protected void |
initializeUI()
Initializes this EntityApplicationPanel
|
boolean |
isAlwaysOnTop() |
protected boolean |
isLoginRequired() |
protected boolean |
isShowStartupDialog() |
void |
login()
Performs a login, fetching user information via
getUser(java.lang.String, org.jminor.common.User, javax.swing.ImageIcon) |
void |
logout()
Performs a logout
|
protected javax.swing.JFrame |
prepareFrame(java.lang.String title,
boolean maximize,
boolean showMenuBar,
java.awt.Dimension size,
javax.swing.ImageIcon applicationIcon,
boolean setVisible)
Initializes a JFrame according to the given parameters, containing this EntityApplicationPanel
|
void |
removeAlwaysOnTopListener(EventListener listener) |
void |
removeApplicationStartedListener(EventListener listener) |
protected void |
saveDefaultUsername(java.lang.String username)
Saves the username so that it can be used as default the next time this application is started.
|
protected void |
savePreferences()
Called during the exit() method, override to save user preferences on program exit,
remember to call super.savePreferences() when overriding
|
void |
selectFontSize()
Display a dialog for selecting the application font size
|
void |
selectLookAndFeel()
Allows the user the select between the system and cross platform Look and Feel, activated on next appliation start
|
void |
setActiveDetailPanel(MasterDetailPanel detailPanel)
Activates (and shows) the given detail panel
|
void |
setAlwaysOnTop(boolean value) |
void |
setLoggingLevel()
Shows a dialog for setting the logging level
|
protected void |
setLoginRequired(boolean loginRequired)
Sets whether or not this application requires a login dialog, setting this value
after the application has been started has no effect
|
protected void |
setShowStartupDialog(boolean startupDialog) |
protected void |
setupEntityPanelProviders()
Called during initialization, after the application model has been initialized,
override to keep all entity panel provider definitions in one place.
|
protected void |
showEntityPanelDialog(EntityPanelProvider panelProvider)
Shows a dialog containing the entity panel provided by the given panel provider
|
protected void |
showEntityPanelDialog(EntityPanelProvider panelProvider,
boolean modalDialog)
Shows a dialog containing the entity panel provided by the given panel provider
|
javax.swing.JFrame |
startApplication(java.lang.String frameCaption,
java.lang.String iconName,
boolean maximize,
java.awt.Dimension frameSize)
Starts this application.
|
javax.swing.JFrame |
startApplication(java.lang.String frameCaption,
java.lang.String iconName,
boolean maximize,
java.awt.Dimension frameSize,
User defaultUser)
Starts this application.
|
javax.swing.JFrame |
startApplication(java.lang.String frameCaption,
java.lang.String iconName,
boolean maximize,
java.awt.Dimension frameSize,
User defaultUser,
boolean showFrame)
Starts this application.
|
javax.swing.JFrame |
startApplication(java.lang.String frameCaption,
java.lang.String iconName,
boolean maximize,
java.awt.Dimension frameSize,
User defaultUser,
boolean showFrame,
User silentLoginUser)
Starts this application.
|
void |
viewApplicationTree()
Displays in a dialog a tree describing the application layout
|
void |
viewDependencyTree()
Shows a dialog containing a dependency tree view of all defined entities
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final PropertyValue<java.lang.Boolean> CONFIRM_EXIT
public static final PropertyValue<java.lang.Boolean> SHOW_STARTUP_DIALOG
public static final PropertyValue<java.lang.Boolean> PERSIST_ENTITY_PANELS
EntityApplicationPanel.showEntityPanelDialog
method
should be persisted, or kept in memory, when the dialog is closed.public static final PropertyValue<java.lang.Integer> TAB_PLACEMENT
public EntityApplicationPanel()
public EntityApplicationPanel(EntityApplicationPanel.ApplicationFrameProvider frameProvider)
public final void displayException(java.lang.Throwable exception, java.awt.Window dialogParent)
displayException
in interface DialogExceptionHandler
exception
- the exceptiondialogParent
- the Window to use as parent to the exception dialogpublic final M getModel()
public final EntityApplicationPanel<M> addEntityPanelProviders(EntityPanelProvider... panelProviders)
panelProviders
- the main application panel providerspublic final EntityApplicationPanel<M> addEntityPanelProvider(EntityPanelProvider panelProvider)
panelProvider
- the main application panel providerpublic final EntityApplicationPanel<M> addSupportPanelProviders(EntityPanelProvider... panelProviders)
panelProviders
- the support application panel providerspublic final EntityApplicationPanel<M> addSupportPanelProvider(EntityPanelProvider panelProvider)
panelProvider
- the support application panel providerpublic final EntityPanel getEntityPanel(java.lang.String entityId)
entityId
- the entity IDpublic final java.util.List<EntityPanel> getEntityPanels()
public final java.awt.Window getParentWindow()
public final boolean isAlwaysOnTop()
public final void setAlwaysOnTop(boolean value)
value
- the new valueaddAlwaysOnTopListener(EventDataListener)
public final void login()
getUser(java.lang.String, org.jminor.common.User, javax.swing.ImageIcon)
CancelException
- in case the login is cancelledgetUser(String, User, javax.swing.ImageIcon)
public final void logout()
public final void setLoggingLevel()
public final void viewApplicationTree()
public final void viewDependencyTree()
public final void selectLookAndFeel()
public final void selectFontSize()
public final javax.swing.JFrame startApplication(java.lang.String frameCaption, java.lang.String iconName, boolean maximize, java.awt.Dimension frameSize)
frameCaption
- the caption to display on the frameiconName
- the name of the icon to usemaximize
- if true the application frame is maximized on startupframeSize
- the frame size when not maximizedpublic final javax.swing.JFrame startApplication(java.lang.String frameCaption, java.lang.String iconName, boolean maximize, java.awt.Dimension frameSize, User defaultUser)
frameCaption
- the caption to display on the frameiconName
- the name of the icon to usemaximize
- if true the application frame is maximized on startupframeSize
- the frame size when not maximizeddefaultUser
- the default user to display in the login dialogpublic final javax.swing.JFrame startApplication(java.lang.String frameCaption, java.lang.String iconName, boolean maximize, java.awt.Dimension frameSize, User defaultUser, boolean showFrame)
frameCaption
- the caption to display on the frameiconName
- the name of the icon to usemaximize
- if true the application frame is maximized on startupframeSize
- the frame size when not maximizeddefaultUser
- the default user to display in the login dialogshowFrame
- if true the frame is set visiblepublic final javax.swing.JFrame startApplication(java.lang.String frameCaption, java.lang.String iconName, boolean maximize, java.awt.Dimension frameSize, User defaultUser, boolean showFrame, User silentLoginUser)
frameCaption
- the caption to display on the frameiconName
- the name of the icon to usemaximize
- if true the application frame is maximized on startupframeSize
- the frame size when not maximizeddefaultUser
- the default user to display in the login dialogshowFrame
- if true the frame is set visiblesilentLoginUser
- if specified the application is started silently with that user, displaying no login or progress dialogpublic final MasterDetailPanel getMasterPanel()
getMasterPanel
in interface MasterDetailPanel
public final EntityPanel getActiveDetailPanel()
getActiveDetailPanel
in interface MasterDetailPanel
public final void setActiveDetailPanel(MasterDetailPanel detailPanel)
setActiveDetailPanel
in interface MasterDetailPanel
detailPanel
- the detail panel to activate and showpublic final MasterDetailPanel getPreviousPanel()
getPreviousPanel
in interface MasterDetailPanel
public final MasterDetailPanel getNextPanel()
getNextPanel
in interface MasterDetailPanel
public final java.util.List<MasterDetailPanel> getDetailPanels()
getDetailPanels
in interface MasterDetailPanel
public final void activatePanel()
activatePanel
in interface MasterDetailPanel
public final void exit()
CancelException
- if the exit is cancelledaddOnExitListener(EventListener)
,
CONFIRM_EXIT
,
EntityApplicationModel.isWarnAboutUnsavedData()
public final void displayHelp()
getHelpPanel()
public final void displayAbout()
getAboutPanel()
public final void addAlwaysOnTopListener(EventDataListener<java.lang.Boolean> listener)
listener
- a listener notified each time the always on top status changespublic final void removeAlwaysOnTopListener(EventListener listener)
listener
- the listener to removepublic final void addApplicationStartedListener(EventListener listener)
listener
- a listener notified when to application has been successfully startedpublic final void removeApplicationStartedListener(EventListener listener)
listener
- the listener to removepublic final javax.swing.tree.TreeModel getDependencyTreeModel()
protected final javax.swing.JTabbedPane getApplicationTabPane()
initializeUI()
has been calledprotected ControlSet getMainMenuControlSet()
getFileControlSet()
,
getSettingsControlSet()
,
getViewControlSet()
,
getToolsControlSet()
,
getHelpControlSet()
protected ControlSet getFileControlSet()
protected ControlSet getSettingsControlSet()
protected ControlSet getToolsControlSet()
protected ControlSet getViewControlSet()
protected ControlSet getHelpControlSet()
protected final Control createExitControl()
protected final Control createLoggingLevelControl()
protected final Control createRefreshAllControl()
protected final Control createViewApplicationTreeControl()
protected final Control createViewDependencyTree()
protected final Control createSelectLookAndFeelControl()
protected final Control createSelectFontSizeControl()
protected final Controls.ToggleControl createAlwaysOnTopControl()
protected final Control createAboutControl()
protected final Control createHelpControl()
protected javax.swing.JPanel getHelpPanel()
protected java.lang.String getHelpText() throws java.io.IOException
java.io.IOException
- in case of an IO exceptionprotected javax.swing.JPanel getAboutPanel()
protected EntityConnectionProvider initializeConnectionProvider(User user, java.lang.String clientTypeId)
user
- the userclientTypeId
- a string specifying the client typeCancelException
- in case the initialization is cancelledprotected Version getClientVersion()
protected final void initialize(M applicationModel)
applicationModel
- the application modeljava.lang.IllegalStateException
- if the application model has not been setCancelException
- in case the initialization is cancelledprotected void bindEvents()
protected java.util.List<ControlSet> getAdditionalMenuControlSet()
protected ControlSet getSupportTableControlSet()
protected final void showEntityPanelDialog(EntityPanelProvider panelProvider)
panelProvider
- the entity panel providerprotected final void showEntityPanelDialog(EntityPanelProvider panelProvider, boolean modalDialog)
panelProvider
- the entity panel providermodalDialog
- if true the dialog is made modalprotected void setupEntityPanelProviders()
protected void initializeUI()
protected java.util.List<EntityPanel> initializeEntityPanels(M applicationModel)
EntityPanelProvider
s.applicationModel
- the application model responsible for providing EntityModels for the panelsEntityPanel
s to include in this application paneladdEntityPanelProvider(EntityPanelProvider)
protected final boolean isLoginRequired()
protected final void setLoginRequired(boolean loginRequired)
loginRequired
- the login required statusprotected final boolean isShowStartupDialog()
protected final void setShowStartupDialog(boolean startupDialog)
startupDialog
- true if a startup dialog should be shownprotected java.lang.String getDefaultLookAndFeelClassName()
UiUtil.getDefaultLookAndFeelClassName()
protected java.lang.Integer getDefaultFontSize()
selectFontSize()
protected javax.swing.JPanel initializeNorthPanel()
protected javax.swing.JPanel initializeSouthPanel()
protected final javax.swing.JDialog initializeStartupDialog(javax.swing.Icon icon, java.lang.String startupMessage)
icon
- the iconstartupMessage
- the startup messageinitializeStartupProgressPanel(javax.swing.Icon)
protected javax.swing.JPanel initializeStartupProgressPanel(javax.swing.Icon icon)
icon
- the iconprotected java.lang.String getFrameTitle(java.lang.String frameCaption, EntityConnectionProvider connectionProvider)
frameCaption
- the caption for the frameconnectionProvider
- the EntityConnectionProvider this application is usingprotected final javax.swing.JFrame prepareFrame(java.lang.String title, boolean maximize, boolean showMenuBar, java.awt.Dimension size, javax.swing.ImageIcon applicationIcon, boolean setVisible)
title
- the title string for the JFramemaximize
- if true then the JFrame is maximized, overrides the prefSeizeAsRatioOfScreen parametershowMenuBar
- true if a menubar should be createdsize
- if the JFrame is not maximized then its preferredSize is set to this valueapplicationIcon
- the application iconsetVisible
- if true then the JFrame is set visibleprotected final void addOnExitListener(EventListener listener)
CancelException
.listener
- a listener notified when the application is about to exitprotected javax.swing.JMenuBar initializeMenuBar()
getMainMenuControlSet()
protected abstract M initializeApplicationModel(EntityConnectionProvider connectionProvider)
connectionProvider
- the db providerCancelException
- in case the initialization is cancelledprotected User getUser(java.lang.String frameCaption, User defaultUser, javax.swing.ImageIcon applicationIcon)
frameCaption
- the application frame captiondefaultUser
- the default userapplicationIcon
- the application iconCancelException
- in case a login dialog is cancelledprotected void saveDefaultUsername(java.lang.String username)
username
- the usernameprotected java.lang.String getDefaultUsername()
protected java.lang.String getApplicationIdentifier()
protected void savePreferences()
EntityApplicationModel.savePreferences()
protected static User getUser(java.lang.String[] args)
CredentialsProvider
service using an authentication token
found in the program arguments list. Useful for single sign on application launch.
javaws -open authenticationToken:123-123-123 http://jminor.org/demo/demo.jnlp
java -jar application/getdown-1.7.1.jar app_dir app_id authenticationToken:123-123-123
args
- the program arguments