de.cbse.jeasy
Class JEOptionPane
java.lang.Object
de.cbse.jeasy.JEObject
de.cbse.jeasy.JEComponent
de.cbse.jeasy.JEOptionPane
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.InputMethodListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.CaretListener, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener, javax.swing.event.ListSelectionListener, javax.swing.event.MenuKeyListener, javax.swing.event.PopupMenuListener, javax.swing.event.TableModelListener, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeModelListener, javax.swing.event.TreeSelectionListener
public class JEOptionPane
- extends JEComponent
Implements a JOptionPane.
Properties :
- id
The unique id of the root object.
- referenceId
A reference for this jeasy object used to identify this type of jeasy object even if it was cloned. It is used for locale properties of the object and may be used for identification in messages. If no reference is set, the jeasy id will be set as default.
- font (reference to JEFont)
The font for this component.
- icon (reference to JEImageIcon)
The icon displayed within this component.
- scaleAlgorithm (possible values [ , SCALE_DEFAULT, SCALE_AREA_AVERAGING, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH])
The type of algorithm to use for image resampling.
- - SCALE_DEFAULT use the default image-scaling algorithm.
- - SCALE_AREA_AVERAGING use the Area Averaging image scaling algorithm.
The image object is free to substitute a different filter that performs the same algorithm yet
integrates more efficiently into the image infrastructure supplied by the toolkit.
- - SCALE_FAST choose an image-scaling algorithm that gives higher priority to scaling speed than smoothness of the scaled image.
- - SCALE_REPLICATE use the image scaling algorithm embodied in the ReplicateScaleFilter class.
The Image object is free to substitute a different filter that performs the same algorithm yet integrates more efficiently
into the imaging infrastructure supplied by the toolkit.
- - SCALE_SMOOTH choose an image-scaling algorithm that gives higher priority to image smoothness than scaling speed.
- iconScaleWidth
Scales the icon to this width.
- iconScaleHeight
Scales the icon to this height.
- dialogType (possible values [ConfirmDialog, MessageDialog, InputDialog, OptionDialog])
The type of the optionpane pop up dialog.
- messageType (possible values [ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, PLAIN_MESSAGE])
The type of the message presentation.
- optionType (possible values [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.
- title
The title of the frame or component.
- message
The text displayed inside the dialog.
- optionButtons
The text of buttons displayed in the dialog optionpane.
- initialButton
The button that is initially selected.
- Author:
- Harry Pfohl
| Fields inherited from class de.cbse.jeasy.JEComponent |
animated, backup, buttonBehind, caretPosition, component, endMarkPosition, enterPressed, isPressed, jeButtonBehind, label, labelBehind, labelText, parentId, scrollPane, tree, treeNode, window |
| Fields inherited from class de.cbse.jeasy.JEObject |
aaa, ACTIVITYBAR, ANIMATION, BORDER, BUSINESSOBJECT_NAME, BUTTON, BUTTONGROUP, CHECKBOX, CHECKBOXMENUITEM, COLOR, COMBOBOX, ComboBoxButtonWidth, COMBOLIST, CONSTRAINTS, CONTEXT_HELP_FOCUS_GAINED, CONTEXT_HELP_FOCUS_LOST, CONTEXT_HELP_MOUSE_ENTERED, CONTEXT_HELP_MOUSE_EXITED, DATAFIELD, DATATYPE, DESKTOPPANE, DIALOG, EDITORPANE, FONT, FORMAT, FRAME, GANTTGRID, GLOBAL, GRADIENTPAINT, HELP, ICON, ID_JESTART, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_REGULAREXPRESSION, INPUT_ERROR_TIME, INPUT_ERRORS, INSETS, INTERNALFRAME, intType, LABEL, LIST, LOCALE, MENU, MENUBAR, MENUITEM, MESSAGE, METHODINVOCATION, NO_CONSTANT, NO_INPUT_ERROR, OPTIONPANE, PANEL, POPUP, PROGRESSBAR, PROPERTIE_NAME, propertyHashMap, RADIOBUTTON, RADIOBUTTONMENUITEM, refresh, SPINNER, SPLITPANE, START, STORE, STRING, TABBEDPANE, TABLE, TASKPANE, TEXTUREPAINT, THEME, TIPS, TOOLBAR, TREE, TREENODE, type, WINDOW |
|
Method Summary |
void |
init()
Creates jfc-Objects with the given properties. |
void |
setupComponent()
Set the property values to the component. |
java.lang.Object |
showOptionPane()
Shows the optionPane. |
java.lang.Object |
showOptionPane(java.awt.Component parentComponent,
java.lang.String myTitle,
java.lang.String myMessage)
Shows the optionPane with given title and message and sets the parent of
the dialog |
java.lang.Object |
showOptionPane(java.awt.Component parentComponent,
java.lang.String myTitle,
java.lang.String myMessage,
java.lang.String mySelection)
Shows the optionPane with given title and message and sets the parent of
the dialog |
java.lang.Object |
showOptionPane(java.lang.String myTitle,
java.lang.String myMessage)
Shows the optionPane. |
| Methods inherited from class de.cbse.jeasy.JEComponent |
actionPerformed, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addListeners, backupEntry, caretPositionChanged, caretUpdate, changedUpdate, componentHidden, componentMoved, componentResized, componentShown, examine, examine, focusGained, focusLost, getAddableComponent, getAnimation, getBackupEntry, getButtonBehind, getClosedIcon, getColumns, getComponent, getDataType, getIcon, getJEButtonBehind, getJLabel, getJScrollpane, getLabel, getLabelBehind, getLabelText, getLeafIcon, getMandatory, getName, getOpenIcon, getParentId, getToolTipText, getTreeNode, getValue, getValueBeforeFocus, getValueNotNull, getValues, getWindow, inputMethodTextChanged, insertUpdate, isAnimated, isEditable, isExiting, isListening, isShowing, isVerified, isVisible, itemStateChanged, jCallBackInputVerifier, keyPressed, keyReleased, keyTyped, menuKeyPressed, menuKeyReleased, menuKeyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, propertyChange, refresh, remove, removeActionListeners, removeUpdate, repaint, restoreEntry, restoreValueBeforeFocus, setAnimated, setBackground, setBackground, setEnabled, setEnabled, setExiting, setFocus, setForeground, setForeground, setIcon, setListening, setMandatory, setParentId, setProperties, setText, setToolTipText, setTreeNode, setValue, setValueBeforeFocus, setValues, setVerified, setVisible, setVisible, stateChanged, tableChanged, textUpdate, timerTask, transferFocus, transferFocusBackward, treeCollapsed, treeExpanded, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, valueChanged, valueChanged, wasEntryChanged, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened |
| Methods inherited from class de.cbse.jeasy.JEObject |
clearPreview, clone, getApplLocale, getBorderConstantProperty, getBorderProperty, getCharGProperty, getCharProperty, getColorProperty, getConstraintsProperty, getFontProperty, getGProperty, getGradientPaintProperty, getId, getImageConstantProperty, getImageIconProperty, getInsetsProperty, getJEGlobal, getJETexturePaintProperty, getLayoutProperty, getLocaleProperties, getObjectsHashMap, getObjectsNonPreviewHashMap, getPreviewHashMap, getPreviewObject, getProjectDirectory, getPropertieHashMap, getProperty, getProperty, getPropertyAsArray, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsInteger, getPropertyAsObject, getPropertyAsObject, getPropertyAsVector, getPropertyAsVector, getReferenceButtonBehind, getReferenceId, getRegisterText, getResourceUrl, getRootPane, getRootPaneId, getSwingConstantProperty, getTabbedPaneConstantProperty, getTexturePaintProperty, getType, getUniqueNumber, hasSuperclass, invoke, invoke, invoke, invoke, isApplet, isEnterprise, isGlobalAnimation, isGlobalListening, isInited, isPreview, isPreviewMember, isProfessional, isRefresh, isSetuped, isStandard, registerJEObject, removeProperties, removeProperty, removeProperty, setApplet, setApplLocale, setGlobalAnimation, setGlobalListening, setInited, setJeGlobal, setLocaleProperties, setPreview, setPreviewHashMap, setPreviewMember, setPreviewObject, setProjectDirectory, setPropertieHashMap, setProperties, setProperties, setProperty, setProperty, setRefresh, setRootPane, setRootPaneId, setSetuped, setType, show |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIRMDIALOG
public static final java.lang.String CONFIRMDIALOG
- See Also:
- Constant Field Values
MESSAGEDIALOG
public static final java.lang.String MESSAGEDIALOG
- See Also:
- Constant Field Values
INPUTDIALOG
public static final java.lang.String INPUTDIALOG
- See Also:
- Constant Field Values
OPTIONDIALOG
public static final java.lang.String OPTIONDIALOG
- See Also:
- Constant Field Values
JEOptionPane
public JEOptionPane(JELocaleProperties hm)
- Reads the properties from a HashMap
- Parameters:
hm - HashMap
JEOptionPane
public JEOptionPane(JENode jen)
- Constructor based on a XML file parsed to a TreeNode.
- Parameters:
jen - - See Also:
JESaxParser
init
public void init()
- Creates jfc-Objects with the given properties. The font of the text is
set to global.labelFont.
- Overrides:
init in class JEComponent
setupComponent
public void setupComponent()
- Description copied from class:
JEComponent
- Set the property values to the component.
- Overrides:
setupComponent in class JEComponent
showOptionPane
public java.lang.Object showOptionPane(java.awt.Component parentComponent,
java.lang.String myTitle,
java.lang.String myMessage,
java.lang.String mySelection)
- Shows the optionPane with given title and message and sets the parent of
the dialog
- Parameters:
parentComponent - myTitle - myMessage -
- Returns:
- JOptionPane.YES_OPTION;
JOptionPane.NO_OPTION;
JOptionPane.CANCEL_OPTION;
JOptionPane.OK_OPTION;
JOptionPane.CLOSED_OPTION;
showOptionPane
public java.lang.Object showOptionPane(java.awt.Component parentComponent,
java.lang.String myTitle,
java.lang.String myMessage)
- Shows the optionPane with given title and message and sets the parent of
the dialog
- Parameters:
parentComponent - myTitle - myMessage -
- Returns:
- JOptionPane.YES_OPTION;
JOptionPane.NO_OPTION;
JOptionPane.CANCEL_OPTION;
JOptionPane.OK_OPTION;
JOptionPane.CLOSED_OPTION;
showOptionPane
public java.lang.Object showOptionPane(java.lang.String myTitle,
java.lang.String myMessage)
- Shows the optionPane.
showOptionPane
public java.lang.Object showOptionPane()
- Shows the optionPane.