com.cbse.jeasy
Class JEOptionPane

java.lang.Object
  extended by com.cbse.jeasy.JEObject
      extended by com.cbse.jeasy.JEOptionPane
All Implemented Interfaces:
java.awt.event.WindowListener, java.util.EventListener

public class JEOptionPane
extends JEObject
implements java.awt.event.WindowListener

A class using a JOptionPane.

JOptionPane is a simple way to create dialog boxes

Properties
name values comment
id * Id of the object. Let it begin with OP_
title   The title of the optionpane
dialogType ConfirmDialog
InputDialog
MessageDialog
OptionDialog
The dialogtype to present the message
messageType ERROR_MESSAGE
INFORMATION_MESSAGE
WARNING_MESSAGE
QUESTION_MESSAGE
PLAIN_MESSAGE
The type of the message presentation.
message   The text lines to be shown in the dialogbox.
optionType DEFAULT_OPTION
YES_NO_OPTION
YES_NO_CANCEL_OPTION
OK_CANCEL_OPTION
Defines the set of option buttons that appear at the bottom of the dialog box.
icon   A decorative icon to be placed in the dialog box.
* = property you have to set; bold = default value

Version:
%I%, %G%
Author:
H.Pfohl

Field Summary
 
Fields inherited from class com.cbse.jeasy.JEObject
DEVELOPPING, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_TIME, INPUT_ERRORS, NO_INPUT_ERROR, RUNNING
 
Constructor Summary
JEOptionPane()
           
JEOptionPane(java.lang.String s)
          Reads the properties from a string.
 
Method Summary
 javax.swing.JComponent getComponent()
          Gets the JComponent based on this JEasy Object
 java.lang.String getMessage()
          Gets the text in the messagebox
 void setMessage(java.lang.String s)
          Sets the text in the messagebox
 void setTitle(java.lang.String s)
          Sets the title in the messagebox
 java.lang.Object showOptionPane()
          Shows the dialog at position and size of properties.
 java.lang.Object showOptionPane(java.awt.Component parentComponent)
          Shows the dialog at position and size of properties.
 java.lang.Object showOptionPane(java.awt.Component parentComponent, java.lang.String title, java.lang.String message)
          Shows the optionPane with given title and message and stes the parent of the dialog
 java.lang.Object showOptionPane(java.lang.String title, java.lang.String message)
          Shows the optionPane with given title and message
 void start()
          Creates the jfc components using the properties
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class com.cbse.jeasy.JEObject
backupEntry, clear, deserializeValue, getApplet, getApplLocale, getCenter, getEast, getElementAt, getElementSize, getId, getJCallBack, getJClass, getLabel, getMode, getName, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, getXMLtag, isEditable, isEnabled, isEnterprise, isProfessional, isStandard, isVisible, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, restoreEntry, serializeValue, setApplet, setApplLocale, setEditable, setEditable, setEnabled, setEnabled, setFocus, setJCallBack, setMarkable, setMarkable, setMode, setObjLocale, setParentId, setPreview, setProjectDirectory, setProperty, setStarted, setVisible, setVisible, wasEntryChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JEOptionPane

public JEOptionPane(java.lang.String s)
Reads the properties from a string.

Parameters:
s - contains properties and values
See Also:
JE#PropertyString

JEOptionPane

public JEOptionPane()
Method Detail

setMessage

public void setMessage(java.lang.String s)
Sets the text in the messagebox


getMessage

public java.lang.String getMessage()
Gets the text in the messagebox


setTitle

public void setTitle(java.lang.String s)
Sets the title in the messagebox


getComponent

public javax.swing.JComponent getComponent()
Gets the JComponent based on this JEasy Object

Overrides:
getComponent in class JEObject
Returns:
JComponent

showOptionPane

public java.lang.Object showOptionPane(java.lang.String title,
                                       java.lang.String message)
Shows the optionPane with given title and message


showOptionPane

public java.lang.Object showOptionPane(java.awt.Component parentComponent,
                                       java.lang.String title,
                                       java.lang.String message)
Shows the optionPane with given title and message and stes the parent of the dialog


showOptionPane

public java.lang.Object showOptionPane()
Shows the dialog at position and size of properties. Returns an Integer by ConfirmDialog, a String by InputDialog and null by Message Dialog. The parentComponent is set to null.


showOptionPane

public java.lang.Object showOptionPane(java.awt.Component parentComponent)
Shows the dialog at position and size of properties. Returns an Integer by ConfirmDialog, a String by InputDialog and null by Message Dialog

Parameters:
parentComponent -
Returns:

start

public void start()
Creates the jfc components using the properties

Overrides:
start in class JEObject
See Also:
JE#start

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener