Ontimize Document Management 0.032EN

com.ontimize.dms.client.gui
Class ComponentDialog

java.lang.Object
  extended by EJDialog
      extended by com.ontimize.dms.client.gui.ComponentDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.util.EventListener
Direct Known Subclasses:
ConflictDialog, CopyDialog, DefinitionDialog, FieldButtonDialog, SaveDialog

public abstract class ComponentDialog
extends EJDialog
implements java.beans.PropertyChangeListener, java.awt.event.ActionListener

Generic Accept | Cancel modal dialog.

Return the selected option by the user.

Call init() after dialog constructor.

Since:
15/04/2009, 26/11/2009 Added methods for footer buttons., 27/11/2009 Added i18n. Bug: call init() after constructor. Extracted classes ClassicButton and FooterButton

Field Summary
protected  ClassicButton accept
           
protected  javax.swing.JComponent body
           
protected  ClassicButton cancel
           
protected  javax.swing.JComponent footer
           
protected  javax.swing.JComponent header
           
protected  int option
           
protected static java.lang.String PROPERTY_OPTION
           
protected static java.lang.String TAG_ACCEPT
           
protected static java.lang.String TAG_ACCEPT_TIP
           
protected static java.lang.String TAG_CANCEL
           
protected static java.lang.String TAG_CANCEL_TIP
           
protected static java.lang.String TAG_HEADER
           
protected static java.lang.String TAG_TITLE
           
 
Constructor Summary
ComponentDialog(java.awt.Dialog owner)
           
ComponentDialog(java.awt.Frame owner)
           
 
Method Summary
protected  boolean acceptButtonAction()
           
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  boolean cancelButtonAction()
           
protected  ClassicButton createAcceptButton()
           
protected  javax.swing.JComponent createBody()
           
protected  ClassicButton createCancelButton()
           
protected  javax.swing.JComponent createFooter()
          By default: Accept | Cancel buttons.
protected  javax.swing.JComponent createHeader()
           
protected  void createTitle()
           
protected  java.lang.String getAcceptButtonIcon()
           
protected  java.lang.String getAcceptButtonText()
           
protected  java.lang.String getAcceptButtonTip()
           
protected  java.lang.String getBodyBorder()
           
protected  java.lang.String getCancelButtonIcon()
           
protected  java.lang.String getCancelButtonText()
           
protected  java.lang.String getCancelButtonTip()
           
protected  java.lang.String getDialogTitle()
           
protected  java.lang.String getHeader()
           
protected  java.lang.String getHeaderBorder()
           
 int getOption()
           
 java.util.Vector getTextsToTranslate()
           
 void init()
           
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 void setComponentLocale(java.util.Locale l)
           
 void setResourceBundle(java.util.ResourceBundle rb)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_OPTION

protected static final java.lang.String PROPERTY_OPTION
See Also:
Constant Field Values

TAG_TITLE

protected static final java.lang.String TAG_TITLE
See Also:
Constant Field Values

TAG_HEADER

protected static final java.lang.String TAG_HEADER
See Also:
Constant Field Values

TAG_ACCEPT

protected static final java.lang.String TAG_ACCEPT
See Also:
Constant Field Values

TAG_ACCEPT_TIP

protected static final java.lang.String TAG_ACCEPT_TIP
See Also:
Constant Field Values

TAG_CANCEL

protected static final java.lang.String TAG_CANCEL
See Also:
Constant Field Values

TAG_CANCEL_TIP

protected static final java.lang.String TAG_CANCEL_TIP
See Also:
Constant Field Values

option

protected int option

header

protected javax.swing.JComponent header

body

protected javax.swing.JComponent body

footer

protected javax.swing.JComponent footer

accept

protected ClassicButton accept

cancel

protected ClassicButton cancel
Constructor Detail

ComponentDialog

public ComponentDialog(java.awt.Dialog owner)

ComponentDialog

public ComponentDialog(java.awt.Frame owner)
Method Detail

init

public void init()

createTitle

protected void createTitle()

getDialogTitle

protected java.lang.String getDialogTitle()

createHeader

protected javax.swing.JComponent createHeader()

getHeaderBorder

protected java.lang.String getHeaderBorder()

getHeader

protected java.lang.String getHeader()

createBody

protected javax.swing.JComponent createBody()

getBodyBorder

protected java.lang.String getBodyBorder()

createFooter

protected javax.swing.JComponent createFooter()

By default: Accept | Cancel buttons.


getAcceptButtonText

protected java.lang.String getAcceptButtonText()

getAcceptButtonTip

protected java.lang.String getAcceptButtonTip()

getAcceptButtonIcon

protected java.lang.String getAcceptButtonIcon()

acceptButtonAction

protected boolean acceptButtonAction()

createAcceptButton

protected ClassicButton createAcceptButton()

getCancelButtonText

protected java.lang.String getCancelButtonText()

getCancelButtonTip

protected java.lang.String getCancelButtonTip()

getCancelButtonIcon

protected java.lang.String getCancelButtonIcon()

cancelButtonAction

protected boolean cancelButtonAction()

createCancelButton

protected ClassicButton createCancelButton()

getOption

public int getOption()

setVisible

public void setVisible(boolean visible)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getTextsToTranslate

public java.util.Vector getTextsToTranslate()

setComponentLocale

public void setComponentLocale(java.util.Locale l)

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle rb)

Ontimize Document Management