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
-
CANCEL_BUTTON
- Constant for the text of the right button
-
OK_BUTTON
- Constants for the text of the left button
-
FreeDialog(String)
- Creates an InternalWindow for the views
-
FreeDialog(String, int, int, int, int)
- Creates an InternalWindow for the views
-
acceptsDrag(DragSession, int, int)
- You should never call this method
-
acceptsEvent(Object, KeyEvent, Vector)
- Implementation of the TextFilter Interface.
-
addButtonGroup(String, Vector, int)
- Constructs and adds a ButtonGroup to the FreeDialog.
-
addButtonGroup(Vector)
- Constructs and adds a ButtonGroup to the FreeDialog.
-
addButtonGroup(Vector, int)
- Constructs and adds a ButtonGroup to the FreeDialog.
-
addEditField(String, String)
- Constructs and adds an EditField to the FreeDialog.
-
addEditField(String, String, boolean)
- Constructs and adds an EditField to the FreeDialog.
-
addEditField(String, String, boolean, boolean)
- Constructs and adds an EditField to the FreeDialog.
-
addEditGroup(Vector)
- Constructs and adds an EditGroup to the FreeDialog.
-
addElement(View)
- Adds a View to the FreeDialog-Window.
-
addGroup(Vector)
- Constructs and adds a ContainerGroup to the FreeDialog.
-
addHTMLText(String)
- Constructs and adds HTML-Text to the FreeDialog.
-
addPasswordField(String, String)
- Constructs and adds an EditField to the FreeDialog.
-
addPasswordField(String, String, boolean)
- Constructs and adds an PasswordField to the FreeDialog.
-
addPasswordField(String, String, boolean, boolean)
- Constructs and adds an PasswordField to the FreeDialog.
-
addPopupGroup(Vector)
- Constructs and adds a PopupGroup to the FreeDialog.
-
addRadioGroup(String, Vector, int)
- Constructs and adds a RadioGroup to the FreeDialog.
-
addRadioGroup(Vector)
- Constructs and adds a RadioGroup to the FreeDialog.
-
addRadioGroup(Vector, int)
- Constructs and adds a RadioGroup to the FreeDialog.
-
addResultElement(View)
- Adds a View to the Result-Hashtable.
-
addSpace(int)
- Adds space before the next view.
-
addText(String)
- Constructs and adds a Text to the FreeDialog.
-
addText(String, Color, Color)
- Constructs and adds a Text to the FreeDialog.
-
addText(String, Color, Color, Font)
- Constructs and adds a Text to the FreeDialog.
-
addText(String, int)
- Constructs and adds a Text to the FreeDialog.
-
dragDropped(DragSession)
- Implementation of the DragDestination interface.
-
dragEntered(DragSession)
- Implementation of the DragDestination interface.
-
dragExited(DragSession)
- Implementation of the DragDestination interface.
-
dragMoved(DragSession)
- Implementation of the DragDestination interface.
-
endDialog()
- Adds an OK and a Cancel button to the FreeDialog.
-
endDialog(String, String)
- Adds 2 Button to the FreeDialog for two actions, such as
OK and Cancel.
-
getResult()
- Implementation of the Result Interface.
-
modally()
- Shows the FreeDialog and waits modally for user input.
-
okPressed()
-
-
performCommand(String, Object)
- Implementation of the Target Interface.
-
sizeTo(int, int)
- Overridden method to avoid wrong place/size when in
Autoplace mode.
-
windowDidBecomeMain(Window)
- Implementation of the WindowOwner interface.
-
windowDidHide(Window)
- Implementation of the WindowOwner interface.
-
windowDidResignMain(Window)
- Implementation of the WindowOwner interface.
-
windowDidShow(Window)
- Implementation of the WindowOwner interface.
-
windowWillHide(Window)
- Implementation of the WindowOwner interface.
-
windowWillShow(Window)
- Implementation of the WindowOwner interface.
-
windowWillSizeBy(Window, Size)
- Implementation of the WindowOwner interface.
OK_BUTTON
public static String OK_BUTTON
- Constants for the text of the left button
CANCEL_BUTTON
public static String CANCEL_BUTTON
- Constant for the text of the right button
FreeDialog
public FreeDialog(String title)
- Creates an InternalWindow for the views
- Parameters:
- title - The title of the InternalWindow
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
addElement
public void addElement(View view)
- Adds a View to the FreeDialog-Window.
- Parameters:
- view - The view to be added.
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
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
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
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
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
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
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
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
addText
public void addText(String text)
- Constructs and adds a Text to the FreeDialog.
- Parameters:
- text - The text to be added
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
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
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
addHTMLText
public void addHTMLText(String text)
- Constructs and adds HTML-Text to the FreeDialog.
- Parameters:
- text - The HTML-text to be added
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
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
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
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
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
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
addGroup
public ContainerGroup addGroup(Vector vector)
- Constructs and adds a ContainerGroup to the FreeDialog.
- Parameters:
- vector - The elements of the container
- Returns:
- The ContainerGroup
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
addSpace
public void addSpace(int h)
- Adds space before the next view.
- Parameters:
- h - The space in pixel
endDialog
public void endDialog()
- Adds an OK and a Cancel button to the FreeDialog.
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
modally
public String modally()
- Shows the FreeDialog and waits modally for user input.
- Returns:
- the pressed button.
getResult
public Hashtable getResult()
- Implementation of the Result Interface.
okPressed
public boolean okPressed()
- Returns:
- true if the left button was pressed
performCommand
public void performCommand(String command,
Object data)
- Implementation of the Target Interface. You should never
call this method.
- Overrides:
- performCommand in class InternalWindow
acceptsEvent
public boolean acceptsEvent(Object object,
KeyEvent key,
Vector events)
- Implementation of the TextFilter Interface. You should never
call this method.
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
windowDidHide
public void windowDidHide(Window win)
- Implementation of the WindowOwner interface.
You should never call this method.
windowWillHide
public boolean windowWillHide(Window win)
- Implementation of the WindowOwner interface.
You should never call this method.
windowDidBecomeMain
public void windowDidBecomeMain(Window win)
- Implementation of the WindowOwner interface.
You should never call this method.
windowDidResignMain
public void windowDidResignMain(Window win)
- Implementation of the WindowOwner interface.
You should never call this method.
windowDidShow
public void windowDidShow(Window win)
- Implementation of the WindowOwner interface.
You should never call this method.
windowWillShow
public boolean windowWillShow(Window win)
- Implementation of the WindowOwner interface.
You should never call this method.
windowWillSizeBy
public void windowWillSizeBy(Window win,
Size s)
- Implementation of the WindowOwner interface.
You should never call this method.
acceptsDrag
public DragDestination acceptsDrag(DragSession dragSession,
int x,
int y)
- You should never call this method
- Overrides:
- acceptsDrag in class View
dragDropped
public boolean dragDropped(DragSession dragSession)
- Implementation of the DragDestination interface.
You should never call this method.
dragEntered
public boolean dragEntered(DragSession dragSession)
- Implementation of the DragDestination interface.
You should never call this method.
dragExited
public void dragExited(DragSession dragSession)
- Implementation of the DragDestination interface.
You should never call this method.
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