All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.tinguin2.FreeDialog

java.lang.Object
   |
   +----netscape.application.View
           |
           +----netscape.application.InternalWindow
                   |
                   +----semper.tinguin2.FreeDialog

public class FreeDialog
extends InternalWindow
implements Target, Result, WindowOwner, TextFilter, DragDestination
Creates an InternalWindow. The user can add views to a FreeDialog with addElement. These views should implement the Result interface if they offer any result. It is important that the views have the right size.

Version:
0.1
Author:
Christian Haag

Variable Index

 o CANCEL_BUTTON
Constant for the text of the right button
 o OK_BUTTON
Constants for the text of the left button

Constructor Index

 o FreeDialog(String)
Creates an InternalWindow for the views
 o FreeDialog(String, int, int, int, int)
Creates an InternalWindow for the views

Method Index

 o acceptsDrag(DragSession, int, int)
You should never call this method
 o acceptsEvent(Object, KeyEvent, Vector)
Implementation of the TextFilter Interface.
 o addButtonGroup(String, Vector, int)
Constructs and adds a ButtonGroup to the FreeDialog.
 o addButtonGroup(Vector)
Constructs and adds a ButtonGroup to the FreeDialog.
 o addButtonGroup(Vector, int)
Constructs and adds a ButtonGroup to the FreeDialog.
 o addEditField(String, String)
Constructs and adds an EditField to the FreeDialog.
 o addEditField(String, String, boolean)
Constructs and adds an EditField to the FreeDialog.
 o addEditField(String, String, boolean, boolean)
Constructs and adds an EditField to the FreeDialog.
 o addEditGroup(Vector)
Constructs and adds an EditGroup to the FreeDialog.
 o addElement(View)
Adds a View to the FreeDialog-Window.
 o addGroup(Vector)
Constructs and adds a ContainerGroup to the FreeDialog.
 o addHTMLText(String)
Constructs and adds HTML-Text to the FreeDialog.
 o addPasswordField(String, String)
Constructs and adds an EditField to the FreeDialog.
 o addPasswordField(String, String, boolean)
Constructs and adds an PasswordField to the FreeDialog.
 o addPasswordField(String, String, boolean, boolean)
Constructs and adds an PasswordField to the FreeDialog.
 o addPopupGroup(Vector)
Constructs and adds a PopupGroup to the FreeDialog.
 o addRadioGroup(String, Vector, int)
Constructs and adds a RadioGroup to the FreeDialog.
 o addRadioGroup(Vector)
Constructs and adds a RadioGroup to the FreeDialog.
 o addRadioGroup(Vector, int)
Constructs and adds a RadioGroup to the FreeDialog.
 o addResultElement(View)
Adds a View to the Result-Hashtable.
 o addSpace(int)
Adds space before the next view.
 o addText(String)
Constructs and adds a Text to the FreeDialog.
 o addText(String, Color, Color)
Constructs and adds a Text to the FreeDialog.
 o addText(String, Color, Color, Font)
Constructs and adds a Text to the FreeDialog.
 o addText(String, int)
Constructs and adds a Text to the FreeDialog.
 o dragDropped(DragSession)
Implementation of the DragDestination interface.
 o dragEntered(DragSession)
Implementation of the DragDestination interface.
 o dragExited(DragSession)
Implementation of the DragDestination interface.
 o dragMoved(DragSession)
Implementation of the DragDestination interface.
 o endDialog()
Adds an OK and a Cancel button to the FreeDialog.
 o endDialog(String, String)
Adds 2 Button to the FreeDialog for two actions, such as OK and Cancel.
 o getResult()
Implementation of the Result Interface.
 o modally()
Shows the FreeDialog and waits modally for user input.
 o okPressed()
 o performCommand(String, Object)
Implementation of the Target Interface.
 o sizeTo(int, int)
Overridden method to avoid wrong place/size when in Autoplace mode.
 o windowDidBecomeMain(Window)
Implementation of the WindowOwner interface.
 o windowDidHide(Window)
Implementation of the WindowOwner interface.
 o windowDidResignMain(Window)
Implementation of the WindowOwner interface.
 o windowDidShow(Window)
Implementation of the WindowOwner interface.
 o windowWillHide(Window)
Implementation of the WindowOwner interface.
 o windowWillShow(Window)
Implementation of the WindowOwner interface.
 o windowWillSizeBy(Window, Size)
Implementation of the WindowOwner interface.

Variables

 o OK_BUTTON
 public static String OK_BUTTON
Constants for the text of the left button

 o CANCEL_BUTTON
 public static String CANCEL_BUTTON
Constant for the text of the right button

Constructors

 o FreeDialog
 public FreeDialog(String title)
Creates an InternalWindow for the views

Parameters:
title - The title of the InternalWindow
 o FreeDialog
 public FreeDialog(String title,
                   int x,
                   int y,
                   int w,
                   int h)
Creates an InternalWindow for the views

Parameters:
title - The title of the InternalWindow
x - The X-Position of the InternalWindow
y - The Y-Position of the InternalWindow
w - The width of the InternalWindow
h - The height of the InternalWindow

Methods

 o addElement
 public void addElement(View view)
Adds a View to the FreeDialog-Window.

Parameters:
view - The view to be added.
 o addResultElement
 public void addResultElement(View view)
Adds a View to the Result-Hashtable. The View must implement the Result Interface. To get the Hashtable with the results call getResult() of this Class. This method must only be called if an own method wants to be integrated in the results. For this purpose you first create your View, then add it with addElement and then call this method.

Parameters:
view - The view to be added
 o addRadioGroup
 public RadioGroup addRadioGroup(Vector vector)
Constructs and adds a RadioGroup to the FreeDialog.

Parameters:
vector - Vector containing the texts of the radio buttons
Returns:
the RadioGroup
 o addRadioGroup
 public RadioGroup addRadioGroup(Vector vector,
                                 int alignment)
Constructs and adds a RadioGroup to the FreeDialog.

Parameters:
vector - Vector containing the texts of the radio buttons
alignment - specifies if the buttons should be arranged from north to south (NORTHSOUTH) or from west to east (WESTEAST).
Returns:
the RadioGroup
 o addRadioGroup
 public RadioGroup addRadioGroup(String title,
                                 Vector vector,
                                 int alignment)
Constructs and adds a RadioGroup to the FreeDialog.

Parameters:
title - The title of the RadioGroup
vector - Vector containing the texts of the radio buttons
alignment - specifies if the buttons should be arranged from north to south (NORTHSOUTH) or from west to east (WESTEAST).
Returns:
the RadioGroup
 o addButtonGroup
 public ButtonGroup addButtonGroup(Vector vector)
Constructs and adds a ButtonGroup to the FreeDialog.

Parameters:
vector - Vector containing the texts of the buttons
Returns:
the ButtonGroup
 o addButtonGroup
 public ButtonGroup addButtonGroup(Vector vector,
                                   int alignment)
Constructs and adds a ButtonGroup to the FreeDialog.

Parameters:
vector - Vector containing the texts of the buttons
alignment - specifies if the buttons should be arranged from north to south (NORTHSOUTH) or from west to east (WESTEAST).
Returns:
the ButtonGroup
 o addButtonGroup
 public ButtonGroup addButtonGroup(String title,
                                   Vector vector,
                                   int alignment)
Constructs and adds a ButtonGroup to the FreeDialog.

Parameters:
title - The title of the ButtonGroup
vector - Vector containing the texts of the buttons
alignment - specifies if the buttons should be arranged from north to south (NORTHSOUTH) or from west to east (WESTEAST).
Returns:
the ButtonGroup
 o addPopupGroup
 public PopupGroup addPopupGroup(Vector vector)
Constructs and adds a PopupGroup to the FreeDialog.

Parameters:
vector - Vector containing the texts of the Popup fields.
Returns:
the PopupGroup
 o addText
 public void addText(String text)
Constructs and adds a Text to the FreeDialog.

Parameters:
text - The text to be added
 o addText
 public void addText(String text,
                     int size)
Constructs and adds a Text to the FreeDialog.

Parameters:
text - The text to be added
size - The size of the Font
 o addText
 public void addText(String text,
                     Color bg,
                     Color fg)
Constructs and adds a Text to the FreeDialog.

Parameters:
text - The text to be added
bg - The background color of the text
fg - The text color of the text
 o addText
 public void addText(String text,
                     Color bg,
                     Color fg,
                     Font f)
Constructs and adds a Text to the FreeDialog.

Parameters:
text - The text to be added
bg - The background color of the text
fg - The text color of the text
f - The Font for the text
 o addHTMLText
 public void addHTMLText(String text)
Constructs and adds HTML-Text to the FreeDialog.

Parameters:
text - The HTML-text to be added
 o addEditField
 public EditField addEditField(String text,
                               String edit)
Constructs and adds an EditField to the FreeDialog.

Parameters:
text - The text on the left of the edit field
edit - The initial text of the edit field
Returns:
The EditField
 o addEditField
 public EditField addEditField(String text,
                               String edit,
                               boolean mustInput)
Constructs and adds an EditField to the FreeDialog.

Parameters:
text - The text on the left of the edit field
edit - The initial text of the edit field
mustInput - The dialog only ends if the user enters something
Returns:
The EditField
 o addEditField
 public EditField addEditField(String text,
                               String edit,
                               boolean mustInput,
                               boolean wantsKeys)
Constructs and adds an EditField to the FreeDialog.

Parameters:
text - The text on the left of the edit field
edit - The initial text of the edit field
mustInput - The dialog only ends if the user enters something
wantsKeys - End dialog when RETURN or ESC are pressed
Returns:
The EditField
 o addPasswordField
 public EditField addPasswordField(String text,
                                   String pass)
Constructs and adds an EditField to the FreeDialog. This Editfield shows * instead of the entered char.

Parameters:
text - The text on the left of the password field
pass - The initial text of the password field
Returns:
The PasswordField
 o addPasswordField
 public EditField addPasswordField(String text,
                                   String pass,
                                   boolean mustInput)
Constructs and adds an PasswordField to the FreeDialog. This Editfield shows * instead of the entered char. If the flag mustInput is set, the FreeDialog is only closed when the user enters something.

Parameters:
text - The text on the left of the password field
pass - The initial text of the password field
mustInput - The dialog only ends if the user enters something
Returns:
The PasswordField
 o addPasswordField
 public EditField addPasswordField(String text,
                                   String pass,
                                   boolean mustInput,
                                   boolean wantsKeys)
Constructs and adds an PasswordField to the FreeDialog. This Editfield shows * instead of the entered char. If the flag wantsKeys is set, the FreeDialog is closed when the RETURN or ESC keys are pressed.

Parameters:
text - The text on the left of the password field
pass - The initial text of the password field
mustInput - The dialog only ends if the user enters something
wantsKeys - End dialog when RETURN or ESC are pressed
Returns:
The PasswordField
 o addGroup
 public ContainerGroup addGroup(Vector vector)
Constructs and adds a ContainerGroup to the FreeDialog.

Parameters:
vector - The elements of the container
Returns:
The ContainerGroup
 o addEditGroup
 public EditGroup addEditGroup(Vector vector)
Constructs and adds an EditGroup to the FreeDialog. An EditGroup can hold only EditFields.

Parameters:
vector - The elements of the EditGroup
Returns:
The EditGroup
 o addSpace
 public void addSpace(int h)
Adds space before the next view.

Parameters:
h - The space in pixel
 o endDialog
 public void endDialog()
Adds an OK and a Cancel button to the FreeDialog.

 o endDialog
 public void endDialog(String ok_text,
                       String cancel_text)
Adds 2 Button to the FreeDialog for two actions, such as OK and Cancel.

Parameters:
ok_text - The text of the left button
cancel_text - The text of the right button
 o modally
 public String modally()
Shows the FreeDialog and waits modally for user input.

Returns:
the pressed button.
 o getResult
 public Hashtable getResult()
Implementation of the Result Interface.

 o okPressed
 public boolean okPressed()
Returns:
true if the left button was pressed
 o performCommand
 public void performCommand(String command,
                            Object data)
Implementation of the Target Interface. You should never call this method.

Overrides:
performCommand in class InternalWindow
 o acceptsEvent
 public boolean acceptsEvent(Object object,
                             KeyEvent key,
                             Vector events)
Implementation of the TextFilter Interface. You should never call this method.

 o sizeTo
 public void sizeTo(int width,
                    int height)
Overridden method to avoid wrong place/size when in Autoplace mode. You should never call this method.

Parameters:
width - The new width of the FreeDialog
height - The new height of the FreeDialog
Overrides:
sizeTo in class View
 o windowDidHide
 public void windowDidHide(Window win)
Implementation of the WindowOwner interface. You should never call this method.

 o windowWillHide
 public boolean windowWillHide(Window win)
Implementation of the WindowOwner interface. You should never call this method.

 o windowDidBecomeMain
 public void windowDidBecomeMain(Window win)
Implementation of the WindowOwner interface. You should never call this method.

 o windowDidResignMain
 public void windowDidResignMain(Window win)
Implementation of the WindowOwner interface. You should never call this method.

 o windowDidShow
 public void windowDidShow(Window win)
Implementation of the WindowOwner interface. You should never call this method.

 o windowWillShow
 public boolean windowWillShow(Window win)
Implementation of the WindowOwner interface. You should never call this method.

 o windowWillSizeBy
 public void windowWillSizeBy(Window win,
                              Size s)
Implementation of the WindowOwner interface. You should never call this method.

 o acceptsDrag
 public DragDestination acceptsDrag(DragSession dragSession,
                                    int x,
                                    int y)
You should never call this method

Overrides:
acceptsDrag in class View
 o dragDropped
 public boolean dragDropped(DragSession dragSession)
Implementation of the DragDestination interface. You should never call this method.

 o dragEntered
 public boolean dragEntered(DragSession dragSession)
Implementation of the DragDestination interface. You should never call this method.

 o dragExited
 public void dragExited(DragSession dragSession)
Implementation of the DragDestination interface. You should never call this method.

 o dragMoved
 public boolean dragMoved(DragSession dragSession)
Implementation of the DragDestination interface. You should never call this method.


All Packages  Class Hierarchy  This Package  Previous  Next  Index