charvax.swing

Class JDialog

Implemented Interfaces:
Runnable

public class JDialog
extends Dialog

In the CHARVA package, the JDialog provides exactly the same functionality as the Dialog. The subclassing is done to maximize compatibility with the equivalent Swing version of JDialog.

Field Summary

Fields inherited from class charva.awt.Window

_term

Fields inherited from class charva.awt.Container

_components, _currentFocus, _insets, _isValid, _layoutMgr, _minimumSize, _size

Fields inherited from class charva.awt.Component

BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT, _alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible

Constructor Summary

JDialog()
Default constructor, creates a JDialog without a specified Frame owner.
JDialog(Dialog owner_)
JDialog(Dialog owner_, String title_)
JDialog(Frame owner_)
Creates a modal dialog without a title and with a Frame owner.
JDialog(Frame owner_, String title_)

Method Summary

void
debug(int level_)
Container
getContentPane()
Returns a reference to "this" (CHARVA doesn't distinuish between "content panes", "root panes" and suchlike).
void
setLocationRelativeTo(Component component_)
Sets the location of the dialog to be centered over the specified component.

Methods inherited from class charva.awt.Dialog

debug, draw, isModal, setModal, setTitle

Methods inherited from class charva.awt.Window

addWindowListener, adjustLocation, debug, draw, getLocationOnScreen, getOwner, hide, isDisplayed, isFocusTraversable, pack, processEvent, processWindowEvent, run, show

Methods inherited from class charva.awt.Container

add, add, debug, doLayout, draw, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getCurrentFocus, getHeight, getInsets, getSize, getWidth, invalidate, isFocusTraversable, isValid, minimumSize, nextFocus, previousFocus, processKeyEvent, remove, requestFocus, setBackground, setFocus, setForeground, setHeight, setLayout, setSize, setSize, setWidth, validate

Methods inherited from class charva.awt.Component

addFocusListener, addKeyListener, contains, contains, debug, draw, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getHeight, getLocation, getLocationOnScreen, getName, getParent, getSize, getWidth, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isTotallyObscured, isValid, isVisible, minimumSize, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, repaint, requestFocus, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor

Constructor Details

JDialog

public JDialog()
Default constructor, creates a JDialog without a specified Frame owner.

JDialog

public JDialog(Dialog owner_)

JDialog

public JDialog(Dialog owner_,
               String title_)

JDialog

public JDialog(Frame owner_)
Creates a modal dialog without a title and with a Frame owner.

JDialog

public JDialog(Frame owner_,
               String title_)

Method Details

debug

public void debug(int level_)
Overrides:
debug in interface Dialog

getContentPane

public Container getContentPane()
Returns a reference to "this" (CHARVA doesn't distinuish between "content panes", "root panes" and suchlike).

setLocationRelativeTo

public void setLocationRelativeTo(Component component_)
Sets the location of the dialog to be centered over the specified component. This must be called AFTER the size of the dialog has been set, and the size and location of the specified component has been set.