All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tw.edu.ncnu.im.cnclab.UI.TextEditorDialog

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----tw.edu.ncnu.im.cnclab.UI.GenericDialog
                                           |
                                           +----tw.edu.ncnu.im.cnclab.UI.TextAreaDialog
                                                   |
                                                   +----tw.edu.ncnu.im.cnclab.UI.TextEditorDialog

public class TextEditorDialog
extends TextAreaDialog
implements ActionListener
The TextEditorDialog class implements the dialog that show an text area.

Version:
0.4 Jul 8, 1999
Author:
Ding-Yi Chen
See Also:
GenericDialog

Variable Index

 o TextEditorButtonPrompt

Constructor Index

 o TextEditorDialog(Frame, String, String, boolean, int, int, boolean)
Construct a TextEditorDialog.
 o TextEditorDialog(Frame, String, String, boolean, int, int, int, boolean)
Construct a TextEditorDialog.
 o TextEditorDialog(Frame, String, String, boolean, String[], int, int, boolean)
Construct a TextEditorDialog
 o TextEditorDialog(Frame, String, String, boolean, String[], int, int, int, boolean)
Construct a TextEditorDialog.

Method Index

 o getArg(Object[])
Return the parameters of the Dialog get.
 o loadFile(String)
Load the text file to read.
 o loadURL(String)
Load the text file from specified URL.
 o setCentralPanel()
Initite the custom panel(central)Panel.
 o setTextAreaEditable(boolean)
Sets the flag that determines whether or not the TextArea is editable.
 o showErrorMsg(String)
Show text from input stream.
 o showText(InputStream)
Show text from input stream.

Variables

 o TextEditorButtonPrompt
 public static final String TextEditorButtonPrompt[]

Constructors

 o TextEditorDialog
 public TextEditorDialog(Frame fr,
                         String title,
                         String promptText,
                         boolean isModal,
                         int row,
                         int col,
                         boolean editable)
Construct a TextEditorDialog.

Parameters:
fr - The parent window.
title - The window title.
promptText - The prompt text. '\n' can be used as separator.
isModal - Whether the dialog modal.
row - The rows of the TextArea.
col - the columns of the TextArea.
editable - Whether the text file editable.
 o TextEditorDialog
 public TextEditorDialog(Frame fr,
                         String title,
                         String promptText,
                         boolean isModal,
                         int msgLength,
                         int row,
                         int col,
                         boolean editable)
Construct a TextEditorDialog.

Parameters:
fr - the parent window.
title - the window title.
promptText - the prompt text. '\n' can be used as separator.
isModal - whether the dialog modal.
msgLength - specify the length of the message textArea.
row - the rows of the TextArea.
col - the columns of the TextArea.
editable - Whether the text file editable.
 o TextEditorDialog
 public TextEditorDialog(Frame fr,
                         String title,
                         String promptText,
                         boolean isModal,
                         String buttonPrompt[],
                         int row,
                         int col,
                         boolean editable)
Construct a TextEditorDialog

Parameters:
fr - the parent window.
title - the window title.
promptText - the prompt text. '\n' can be used as separator.
isModal - whether the dialog modal.
row - the rows of the TextArea.
col - the columns of the TextArea.
editable - Whether the text file editable.
 o TextEditorDialog
 public TextEditorDialog(Frame fr,
                         String title,
                         String promptText,
                         boolean isModal,
                         String buttonPrompt[],
                         int msgLength,
                         int row,
                         int col,
                         boolean editable)
Construct a TextEditorDialog.

Parameters:
fr - the parent window.
title - the window title.
promptText - the prompt text. '\n' can be used as separator.
isModal - whether the dialog modal.
buttonPrompt - the prompt of buttons.
msgLength - specify the length of the message textArea.
row - the rows of the TextArea.
col - the columns of the TextArea.
editable - Whether the text file editable.

Methods

 o setCentralPanel
 protected void setCentralPanel()
Initite the custom panel(central)Panel.

Overrides:
setCentralPanel in class TextAreaDialog
 o setTextAreaEditable
 public void setTextAreaEditable(boolean editable)
Sets the flag that determines whether or not the TextArea is editable.

Parameters:
editable - Whether the TextArea editable.
Overrides:
setTextAreaEditable in class TextAreaDialog
 o loadFile
 public void loadFile(String filename)
Load the text file to read.

Parameters:
filename - The text file to read
 o loadURL
 public void loadURL(String url)
Load the text file from specified URL.

Parameters:
url - The URL of the text file.
 o showErrorMsg
 public void showErrorMsg(String s)
Show text from input stream.

Parameters:
inputStream - the input stream to read.
 o showText
 public void showText(InputStream inputStream)
Show text from input stream.

Parameters:
inputStream - the input stream to read.
 o getArg
 public Object[] getArg(Object additionalArg[])
Return the parameters of the Dialog get.

Parameters:
additionalArg - Additional arguments for another method.
Returns:
The parameters of the dialog get. (Default: null
Overrides:
getArg in class TextAreaDialog
See Also:
setArg

All Packages  Class Hierarchy  This Package  Previous  Next  Index