Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

ch.elexis.dialogs
Class DocumentSelectDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.TrayDialog
              extended by org.eclipse.jface.dialogs.TitleAreaDialog
                  extended by ch.elexis.dialogs.DocumentSelectDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class DocumentSelectDialog
extends org.eclipse.jface.dialogs.TitleAreaDialog

Select a Document or a template Usage: DocumentSelector dsl=new DocumentSelector(shell,mandant,TYPE_xxx); if(dsl.open()==Dialog.OK){ doSomethingWith(dsl.result); }


Nested Class Summary
 class DocumentSelectDialog.MyLabelProvider
          adds showing an image before labels: show Address-icon for docs for which address should be selected and do NOT show for docs for which selection dialog should NOT be shown.
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
protected static java.lang.String DONTASKFORADDRESSEE_STICKER
           
protected static boolean dontAskForAddresseeStickerCreated
           
static int TYPE_CREATE_DOC_WITH_TEMPLATE
          create a new document using one of the templates of the given mandator
static int TYPE_LOAD_DOCUMENT
          select an existing document out of the list of all documtents of the given mandator
static int TYPE_LOAD_SYSTEMPLATE
          open a system template of the given mandator for editing or export
static int TYPE_LOAD_TEMPLATE
          open a user template of the given mandator for editing or export
 
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
DocumentSelectDialog(org.eclipse.swt.widgets.Shell shell, Person p, int typ)
          Create a new DocumentSelector.
 
Method Summary
 void create()
           
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
static void createDontAskForAddresseeSticker()
          creates the sticker DONTASKFORADDRESSEE_STICKER if not yet existing.
 java.lang.String getBetreff()
           
static boolean getDontAskForAddresseeForThisTemplate(Brief template)
          test if the user should be asked for an addressee when creating a document.
static boolean getDontAskForAddresseeForThisTemplateName(java.lang.String templateName)
          test if the user should be asked for an addressee when creating a document.
static Sticker getDontAskForAddresseeSticker()
          get the template sticker DONTASKFORADDRESSEE_STICKER, return null if not yet created
static java.lang.String getDontAskForAddresseeStickerID()
          get the id for template sticker DONTASKFORADDRESSEE_STICKER, return null if not yet created
 Brief getSelectedDocument()
           
protected  void okPressed()
           
static void setDontAskForAddresseeForThisTemplate(Brief template, boolean dontAskForAddressee)
          test if the user should be asked for an addressee when creating a document.
 
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
createContents, getErrorMessage, getInitialSize, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
 
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createButtonsForButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_LOAD_DOCUMENT

public static final int TYPE_LOAD_DOCUMENT
select an existing document out of the list of all documtents of the given mandator

See Also:
Constant Field Values

TYPE_CREATE_DOC_WITH_TEMPLATE

public static final int TYPE_CREATE_DOC_WITH_TEMPLATE
create a new document using one of the templates of the given mandator

See Also:
Constant Field Values

TYPE_LOAD_TEMPLATE

public static final int TYPE_LOAD_TEMPLATE
open a user template of the given mandator for editing or export

See Also:
Constant Field Values

TYPE_LOAD_SYSTEMPLATE

public static final int TYPE_LOAD_SYSTEMPLATE
open a system template of the given mandator for editing or export

See Also:
Constant Field Values

DONTASKFORADDRESSEE_STICKER

protected static java.lang.String DONTASKFORADDRESSEE_STICKER

dontAskForAddresseeStickerCreated

protected static boolean dontAskForAddresseeStickerCreated
Constructor Detail

DocumentSelectDialog

public DocumentSelectDialog(org.eclipse.swt.widgets.Shell shell,
                            Person p,
                            int typ)
Create a new DocumentSelector. If the user clicks OK, the selected Brief will be in result.

Parameters:
p - the mandator whose templates/letters should be displayed
typ - type of the selector to display (see TYPE_ constants)
Method Detail

create

public void create()
Overrides:
create in class org.eclipse.jface.dialogs.Dialog

createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Overrides:
createDialogArea in class org.eclipse.jface.dialogs.TitleAreaDialog

okPressed

protected void okPressed()
Overrides:
okPressed in class org.eclipse.jface.dialogs.Dialog

getSelectedDocument

public Brief getSelectedDocument()

getBetreff

public java.lang.String getBetreff()

getDontAskForAddresseeStickerID

public static java.lang.String getDontAskForAddresseeStickerID()
get the id for template sticker DONTASKFORADDRESSEE_STICKER, return null if not yet created

Returns:
the sticker or null

getDontAskForAddresseeSticker

public static Sticker getDontAskForAddresseeSticker()
get the template sticker DONTASKFORADDRESSEE_STICKER, return null if not yet created

Returns:
the sticker or null

createDontAskForAddresseeSticker

public static void createDontAskForAddresseeSticker()
creates the sticker DONTASKFORADDRESSEE_STICKER if not yet existing. Is is primarily marked as deleted to prevent the user from seeing it in the interface


getDontAskForAddresseeForThisTemplateName

public static boolean getDontAskForAddresseeForThisTemplateName(java.lang.String templateName)
test if the user should be asked for an addressee when creating a document. The flag is saved as a sticker for the template-document.

Parameters:
templateName - the name of the document-template to be tested
Returns:
true if we should not show the address selection dialog

getDontAskForAddresseeForThisTemplate

public static boolean getDontAskForAddresseeForThisTemplate(Brief template)
test if the user should be asked for an addressee when creating a document. The flag is saved as a sticker for the template-document.

Parameters:
template - the document-template to be tested
Returns:
true if we should not show the address selection dialog

setDontAskForAddresseeForThisTemplate

public static void setDontAskForAddresseeForThisTemplate(Brief template,
                                                         boolean dontAskForAddressee)
test if the user should be asked for an addressee when creating a document. The flag is saved as a sticker for the template-document.

Parameters:
template - the document-template to be tested
dontAskForAddressee - whether or not to ask for an addressee when creating a new document

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013