|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Dialog
|
+--jv.object.PsDialog
Basic class for dialogs extending java.awt.Dialog by some minor features. E.g. dialog is destroyed when it receives a WINDOW.DESTROY event, and it has an easy mechanism to insert standard buttons at bottom part of dialog. The actionPerformed() method supplies default event handling which is usually sufficient.
PsPanel, Serialized Form| Inner classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
| Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static int |
BUTTON_CANCEL
|
static int |
BUTTON_CLOSE
|
static int |
BUTTON_HIDE
|
static int |
BUTTON_OK
|
static int |
BUTTON_RESET
|
static int |
BUTTON_SAVE
|
protected int |
m_action
Index of button which was pressed by user. |
protected java.awt.Button |
m_bCancel
Button to reset dialog and quit. |
protected java.awt.Button |
m_bClose
Button to close and dispose dialog. |
protected java.awt.Button |
m_bHide
Button to hide and dispose panel. |
protected java.awt.Button |
m_bOk
Button to accept selection. |
protected java.awt.Button |
m_bReset
Button to reset dialog. |
protected java.awt.Button |
m_bSave
Button to save and dispose dialog. |
protected java.awt.Label |
m_lHeader
Header label of dialog. |
protected PsUpdateIf |
m_parent
Sends update events to this instance. |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
PsDialog(java.awt.Frame frame,
boolean modal)
|
|
PsDialog(java.awt.Frame frame,
java.lang.String name,
boolean modal)
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
|
java.awt.Panel |
getBottomButtons(int flag)
Convenient way to get a panel with standard buttons. |
PsUpdateIf |
getFather()
Return parent of this dialog. |
int |
getUserAction()
Get index of standard button pressed by user. |
void |
init()
|
boolean |
instanceOf(java.lang.String aClassName)
Deprecated. use "if (getClass() == PsObject.class)" instead |
void |
itemStateChanged(java.awt.event.ItemEvent event)
Method does nothing. |
void |
reset()
Inform parent to allow him to reset its variables before dialog gets destroyed. |
java.awt.Label |
setHeader(java.lang.String header)
Set string of panel header and return label m_lHeader.
|
void |
setLocation(int x,
int y)
Set location of dialog but correct of upper left corner if outside screen. |
void |
setParent(PsUpdateIf object)
Set parent of this dialog. |
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed. |
void |
windowActivated(java.awt.event.WindowEvent event)
Method does nothing. |
void |
windowClosed(java.awt.event.WindowEvent event)
Invoke m_parent.update(this) and set action to BUTTON_CLOSE. |
void |
windowClosing(java.awt.event.WindowEvent event)
Dispose window if user clicks on 'delete'-cross of title bar. |
void |
windowDeactivated(java.awt.event.WindowEvent event)
Method does nothing. |
void |
windowDeiconified(java.awt.event.WindowEvent event)
Method does nothing. |
void |
windowIconified(java.awt.event.WindowEvent event)
Method does nothing. |
void |
windowOpened(java.awt.event.WindowEvent event)
Method does nothing. |
| Methods inherited from class java.awt.Dialog |
addNotify, dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, paramString, setModal, setResizable, setTitle, show |
| Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jv.object.PsUpdateIf |
getName |
| Field Detail |
protected PsUpdateIf m_parent
PsObject.update(Object),
PsPanel.update(Object)public static final int BUTTON_CANCEL
public static final int BUTTON_HIDE
public static final int BUTTON_OK
public static final int BUTTON_RESET
public static final int BUTTON_CLOSE
public static final int BUTTON_SAVE
protected int m_action
protected java.awt.Button m_bCancel
protected java.awt.Button m_bHide
protected java.awt.Button m_bOk
protected java.awt.Button m_bReset
protected java.awt.Button m_bClose
protected java.awt.Button m_bSave
protected java.awt.Label m_lHeader
| Constructor Detail |
public PsDialog(java.awt.Frame frame,
java.lang.String name,
boolean modal)
public PsDialog(java.awt.Frame frame,
boolean modal)
| Method Detail |
public void init()
public java.awt.Panel getBottomButtons(int flag)
Usage:
Panel pButtons = dialog.getBottomButtons(PsDialog.BUTTON_CANCEL | PsDialog.BUTTON_OK);
dialog.add("South", pButtons);
If a modal dialog returns, the dialog can be asked about the user action:
if (dialog.getUserAction() == PsDialog.BUTTON_CANCEL) {
...
}
public java.awt.Label setHeader(java.lang.String header)
m_lHeader.
Method does not add the header to the panel.public final boolean instanceOf(java.lang.String aClassName)
false.
This method is different from Java operator instanceof which
is true even if current instance is subclass of class 'aClassName'.aClassName - name of class without package identifierspublic PsUpdateIf getFather()
getFather in interface PsUpdateIfsetParent(PsUpdateIf),
update(Object)public void setParent(PsUpdateIf object)
setParent in interface PsUpdateIfComponent.getParent(),
update(Object)public boolean update(java.lang.Object event)
update in interface PsUpdateIfComponent.getParent(),
setParent(PsUpdateIf)public void reset()
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged in interface java.awt.event.ItemListenerpublic int getUserAction()
PsDialog
public void setLocation(int x,
int y)
setLocation in class java.awt.Componentpublic void windowOpened(java.awt.event.WindowEvent event)
windowOpened in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent event)
windowClosed in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent event)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent event)
windowIconified in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent event)
windowDeactivated in interface java.awt.event.WindowListenerpublic void windowActivated(java.awt.event.WindowEvent event)
windowActivated in interface java.awt.event.WindowListenerpublic void windowClosing(java.awt.event.WindowEvent event)
dispose().windowClosing in interface java.awt.event.WindowListener
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||