|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SComponent
org.wings.SContainer
org.wings.SForm
org.wings.SWindow
org.wings.SDialog
org.wings.SOptionPane
public class SOptionPane
An immodal dialog component offering several options for selection (like Yes/No, etc.)
| Field Summary | |
|---|---|
static String |
CANCEL_ACTION
Action Performed Value if Cancel is choosen |
static int |
CANCEL_OPTION
Return value if Cancel is choosen |
static int |
DEFAULT_OPTION
Type meaning look and feel should not supply any options -- only use the options from the JOptionPane. |
static int |
ERROR_MESSAGE
|
protected SIcon |
icon
|
protected SLabel |
imageLabel
|
static int |
INFORMATION_MESSAGE
|
protected Object |
initialValue
|
protected Object |
message
|
protected int |
messageType
|
static String |
NO_ACTION
Action Performed Value if No is choosen |
static int |
NO_OPTION
Return value if no is choosen |
static String |
OK_ACTION
Action Performed Value if Ok is choosen |
static int |
OK_CANCEL_OPTION
Used for showConfirmDialog. |
static int |
OK_CANCEL_RESET_OPTION
Used for showConfirmDialog. |
static int |
OK_OPTION
Return value if Ok is choosen |
protected SContainer |
optionButtons
Panel with Option Buttons |
protected SButton |
optionCancel
Cancel Button |
protected SButton |
optionNo
No Button |
protected SButton |
optionOK
OK Button |
protected Object[] |
options
|
protected SButton |
optionYes
Yes Button |
static int |
PLAIN_MESSAGE
|
static int |
QUESTION_MESSAGE
|
static int |
RESET_OPTION
|
protected Object |
selected
The chosen option |
static String |
UNKNOWN_ACTION
Action Performed Value Unknow |
static SIcon |
WARNING_IMAGE
Icon for Warning Dialog |
static int |
WARNING_MESSAGE
|
static String |
YES_ACTION
Action Performed Value if Yes is Choosen |
static int |
YES_NO_CANCEL_OPTION
Used for showConfirmDialog. |
static int |
YES_NO_CANCEL_RESET_OPTION
Used for showConfirmDialog. |
static int |
YES_NO_OPTION
Used for showConfirmDialog. |
static int |
YES_NO_RESET_OPTION
Used for showConfirmDialog. |
static int |
YES_OPTION
Return Value if Yes is choosen |
| Fields inherited from class org.wings.SDialog |
|---|
CLOSE_ACTION, DEFAULT_ACTION, draggable, modal, title |
| Fields inherited from class org.wings.SWindow |
|---|
owner, x, y |
| Fields inherited from class org.wings.SForm |
|---|
actionCommand, ENC_TYPE_MULTIPART_FORM, ENC_TYPE_TEXT_PLAIN, listenerList, URL_ENCODING |
| Fields inherited from class org.wings.SComponent |
|---|
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME |
| Constructor Summary | |
|---|---|
SOptionPane()
Default Constructor for SOptionPane
Against the Standard Swing Implementation there is no Standard Message |
|
SOptionPane(Object message)
|
|
SOptionPane(Object message,
int messageType)
|
|
SOptionPane(Object message,
int messageType,
int optionType)
Creates an instance of JOptionPane to display a message
with the specified message type and options. |
|
SOptionPane(Object message,
int messageType,
int optionType,
SIcon icon)
Creates an instance of JOptionPane to display a message
with the specified message type, options, and icon. |
|
SOptionPane(Object message,
int messageType,
int optionType,
SIcon icon,
Object[] options)
Creates an instance of JOptionPane to display a message with the specified message type, icon, and options. |
|
SOptionPane(Object message,
int messageType,
int optionType,
SIcon icon,
Object[] options,
Object initialValue)
Creates an instance of JOptionPane to display a message
with the specified message type, icon, and options, with the
initially-selected option specified. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
protected SButton |
createButton(String label)
Generic Button creation |
protected void |
fireActionPerformed(String pActionCommand)
Fire a ActionEvent at each registered listener. |
Object |
getInputValue()
|
int |
getMessageType()
Returns the message type. |
Object |
getValue()
|
protected void |
resetOptions()
|
void |
setCG(OptionPaneCG cg)
|
void |
setMessageType(int newType)
Sets the option pane's message type. |
void |
setOptions(Object[] options)
|
void |
setOptionType(int newType)
|
static void |
showConfirmDialog(SComponent parent,
Object message,
String title)
|
static void |
showConfirmDialog(SComponent parent,
Object message,
String title,
ActionListener al)
|
static void |
showConfirmDialog(SComponent parent,
Object message,
String title,
int type)
|
static void |
showConfirmDialog(SComponent parent,
Object message,
String title,
int type,
ActionListener al)
|
static void |
showConfirmDialog(SComponent parent,
Object message,
String title,
int type,
ActionListener al,
SLayoutManager layout)
|
void |
showInput(SComponent parent,
Object message,
SComponent inputElement,
String title)
|
static void |
showInputDialog(SComponent parent,
Object question,
String title,
int messageType,
SComponent inputElement,
ActionListener al)
|
static void |
showInputDialog(SComponent parent,
Object question,
String title,
SComponent inputElement,
ActionListener al)
|
static void |
showMessageDialog(SComponent parent,
Object message)
|
static void |
showMessageDialog(SComponent parent,
Object message,
ActionListener al)
|
static void |
showMessageDialog(SComponent parent,
Object message,
String title)
|
static void |
showMessageDialog(SComponent parent,
Object message,
String title,
int messageType)
|
static void |
showMessageDialog(SComponent parent,
Object message,
String title,
int messageType,
ActionListener al)
|
void |
showOption(SComponent c,
String title,
Object message)
|
void |
showPlainMessage(SComponent parent,
Object message,
String title)
|
static void |
showPlainMessageDialog(SComponent parent,
Object message)
|
static void |
showPlainMessageDialog(SComponent parent,
Object message,
ActionListener al)
|
static void |
showPlainMessageDialog(SComponent parent,
Object message,
String title)
|
static void |
showPlainMessageDialog(SComponent parent,
Object message,
String title,
ActionListener al)
|
static void |
showPlainQuestionDialog(SComponent parent,
Object question,
String title,
ActionListener al)
|
void |
showQuestion(SComponent parent,
Object message,
String title)
|
void |
showQuestion(SComponent parent,
Object question,
String title,
int type)
|
static void |
showQuestionDialog(SComponent parent,
Object question,
String title,
ActionListener al)
|
void |
showYesNo(SComponent parent,
Object question,
String title)
|
static void |
showYesNoDialog(SComponent parent,
Object question,
String title,
ActionListener al)
|
| Methods inherited from class org.wings.SDialog |
|---|
getIcon, getTitle, hide, isClosable, isDraggable, isModal, setCG, setClosable, setDraggable, setIcon, setModal, setTitle |
| Methods inherited from class org.wings.SWindow |
|---|
dispose, getOwner, getX, getY, processLowLevelEvent, setVisible, setX, setY, show |
| Methods inherited from class org.wings.SContainer |
|---|
add, add, add, add, addComponent, addComponent, addComponent, addContainerListener, addNotify, clone, fireContainerEvent, getComponent, getComponentCount, getComponentList, getComponents, getConstraintAt, getConstraintList, getLayout, invite, inviteEachComponent, isShowingChildren, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setCG, setLayout, setParentFrame, updateCG |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.wings.LowLevelEventListener |
|---|
fireFinalEvents, fireIntermediateEvents, getLowLevelEventId, getName, isEnabled, isEpochCheckEnabled |
| Field Detail |
|---|
public static final String YES_ACTION
public static final String NO_ACTION
public static final String OK_ACTION
public static final String CANCEL_ACTION
public static final String UNKNOWN_ACTION
public static final int OK_OPTION
public static final int CANCEL_OPTION
public static final int YES_OPTION
public static final int NO_OPTION
public static final int RESET_OPTION
public static final int DEFAULT_OPTION
public static final int OK_CANCEL_OPTION
public static final int OK_CANCEL_RESET_OPTION
public static final int YES_NO_OPTION
public static final int YES_NO_RESET_OPTION
public static final int YES_NO_CANCEL_OPTION
public static final int YES_NO_CANCEL_RESET_OPTION
public static final int ERROR_MESSAGE
public static final int INFORMATION_MESSAGE
public static final int WARNING_MESSAGE
public static final int QUESTION_MESSAGE
public static final int PLAIN_MESSAGE
protected final SContainer optionButtons
protected final SButton optionOK
protected final SButton optionCancel
protected final SButton optionYes
protected final SButton optionNo
public static final SIcon WARNING_IMAGE
protected final SLabel imageLabel
protected Object selected
OK_OPTION,
YES_OPTION,
CANCEL_OPTION,
NO_OPTIONprotected SIcon icon
protected Object message
protected Object[] options
protected Object initialValue
protected int messageType
| Constructor Detail |
|---|
public SOptionPane()
SOptionPane
Against the Standard Swing Implementation there is no Standard Message
public SOptionPane(Object message)
public SOptionPane(Object message,
int messageType)
public SOptionPane(Object message,
int messageType,
int optionType)
JOptionPane to display a message
with the specified message type and options.
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGEoptionType - the options to display in the pane:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION
OK_CANCEL_OPTION
public SOptionPane(Object message,
int messageType,
int optionType,
SIcon icon)
JOptionPane to display a message
with the specified message type, options, and icon.
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGEoptionType - the options to display in the pane:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION
OK_CANCEL_OPTIONicon - the Icon image to display
public SOptionPane(Object message,
int messageType,
int optionType,
SIcon icon,
Object[] options)
Components, (which are added directly) or
Strings (which are wrapped in a JButton).
If you provide Components, you must ensure that when the
Component is clicked it messages setValue
in the created JOptionPane.
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGEoptionType - the options to display in the pane:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION
OK_CANCEL_OPTION; only meaningful if the
options parameter is nullicon - the Icon image to displayoptions - the choices the user can select
public SOptionPane(Object message,
int messageType,
int optionType,
SIcon icon,
Object[] options,
Object initialValue)
JOptionPane to display a message
with the specified message type, icon, and options, with the
initially-selected option specified.
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGEoptionType - the options to display in the pane:
DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION
OK_CANCEL_OPTION; only meaningful if the
options parameter is nullicon - the Icon image to displayoptions - the choices the user can selectinitialValue - the choice that is initially selected| Method Detail |
|---|
public void setCG(OptionPaneCG cg)
public final Object getValue()
public Object getInputValue()
protected final SButton createButton(String label)
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerprotected void fireActionPerformed(String pActionCommand)
SForm
fireActionPerformed in class SFormprotected void resetOptions()
public void setOptions(Object[] options)
public void setMessageType(int newType)
newType - an integer specifying the kind of message to display:
ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
QUESTION_MESSAGE, or PLAIN_MESSAGE
description: The option pane's message type.public int getMessageType()
setMessageType(int)public void setOptionType(int newType)
public void showOption(SComponent c,
String title,
Object message)
public void showPlainMessage(SComponent parent,
Object message,
String title)
public void showQuestion(SComponent parent,
Object message,
String title)
public void showInput(SComponent parent,
Object message,
SComponent inputElement,
String title)
public void showYesNo(SComponent parent,
Object question,
String title)
public void showQuestion(SComponent parent,
Object question,
String title,
int type)
public static void showMessageDialog(SComponent parent,
Object message)
public static void showMessageDialog(SComponent parent,
Object message,
String title)
public static void showMessageDialog(SComponent parent,
Object message,
ActionListener al)
public static void showMessageDialog(SComponent parent,
Object message,
String title,
int messageType)
public static void showMessageDialog(SComponent parent,
Object message,
String title,
int messageType,
ActionListener al)
public static void showPlainMessageDialog(SComponent parent,
Object message)
public static void showPlainMessageDialog(SComponent parent,
Object message,
String title)
public static void showPlainMessageDialog(SComponent parent,
Object message,
ActionListener al)
public static void showPlainMessageDialog(SComponent parent,
Object message,
String title,
ActionListener al)
public static void showInputDialog(SComponent parent,
Object question,
String title,
SComponent inputElement,
ActionListener al)
public static void showInputDialog(SComponent parent,
Object question,
String title,
int messageType,
SComponent inputElement,
ActionListener al)
public static void showQuestionDialog(SComponent parent,
Object question,
String title,
ActionListener al)
public static void showPlainQuestionDialog(SComponent parent,
Object question,
String title,
ActionListener al)
public static void showConfirmDialog(SComponent parent,
Object message,
String title)
public static void showConfirmDialog(SComponent parent,
Object message,
String title,
ActionListener al)
public static void showConfirmDialog(SComponent parent,
Object message,
String title,
int type)
public static void showConfirmDialog(SComponent parent,
Object message,
String title,
int type,
ActionListener al)
public static void showConfirmDialog(SComponent parent,
Object message,
String title,
int type,
ActionListener al,
SLayoutManager layout)
public static void showYesNoDialog(SComponent parent,
Object question,
String title,
ActionListener al)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||