All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tw.edu.ncnu.im.cnclab.JGAP.UI.EdgeDialog

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.JGAP.UI.GraphDialog
                                                   |
                                                   +----tw.edu.ncnu.im.cnclab.JGAP.UI.EdgeDialog

public class EdgeDialog
extends GraphDialog
The EdgeDialog class is used to get the input of edges/ It provides the validity of the inputted data.

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

Variable Index

 o defaultButtonPrompt
 o edgeWeightField
The TextField for weight of the edges.
 o FALSE
The inputed edge must not exist.
 o fromField
The TextField for begin of the edges.
 o NEVER_MIND
Need not care if the inputed edge exist or not.(default)
 o toField
The TextField for end of the edges.
 o TRUE
The inputed edge must exist.

Constructor Index

 o EdgeDialog(Graph, Frame, String, String, boolean)
Construct a GraphDialog without message textField.
 o EdgeDialog(Graph, Frame, String, String, boolean, int)
Construct a GraphDialog without message textField.
 o EdgeDialog(Graph, Frame, String, String, boolean, int, boolean)
Construct a GraphDialog without message textField.
 o EdgeDialog(Graph, Frame, String, String, boolean, String[], int)
Construct a GraphDialog without message textField.
 o EdgeDialog(Graph, Frame, String, String, boolean, String[], int, boolean)
Construct a GraphDialog without message textField.
 o EdgeDialog(Graph, Frame, String, String, boolean, String[], int, int, boolean)
Construct a GraphDialog without message textField.

Method Index

 o checkEdgeValid()
Check if the inputed edge valid.
 o checkFormat()
Check the validity of inputed data.
 o getArg(Object[])
Return the result of EdgeDialog.
 o getEdgeWeight()
Get the weight of edge.
 o getFromNode()
Get the start node of the edge.
 o getToNode()
Get the end node of the edge.
 o setCentralPanel()
Initite the custom panel(central)Panel.

Variables

 o fromField
 protected TextField fromField
The TextField for begin of the edges.

 o toField
 protected TextField toField
The TextField for end of the edges.

 o edgeWeightField
 protected TextField edgeWeightField
The TextField for weight of the edges.

 o TRUE
 public static final int TRUE
The inputed edge must exist.

 o NEVER_MIND
 public static final int NEVER_MIND
Need not care if the inputed edge exist or not.(default)

 o FALSE
 public static final int FALSE
The inputed edge must not exist.

 o defaultButtonPrompt
 protected static String defaultButtonPrompt[]

Constructors

 o EdgeDialog
 public EdgeDialog(Graph graph,
                   Frame dw,
                   String title,
                   String promptText,
                   boolean isModal)
Construct a GraphDialog without message textField.

Parameters:
fr - the parent window.
title - the window title.
promptText - the prompt text. '\n' can be used as separator.
isModal - whether the dialog modal.
 o EdgeDialog
 public EdgeDialog(Graph graph,
                   Frame dw,
                   String title,
                   String promptText,
                   boolean isModal,
                   int chkEdgeExist)
Construct a GraphDialog without message textField.

Parameters:
fr - the parent window.
title - the window title.
promptText - the prompt text. '\n' can be used as separator.
isModal - whether the dialog modal.
chkEdgeExist - TRUE if the inputed edge must exist; NEVERMIND if need not care whether edge exist; FALSE if the inputed edge must not exist.
 o EdgeDialog
 public EdgeDialog(Graph graph,
                   Frame dw,
                   String title,
                   String promptText,
                   boolean isModal,
                   int chkEdgeExist,
                   boolean inputEdgeWeight)
Construct a GraphDialog without message textField.

Parameters:
fr - the parent window.
title - the window title.
promptText - the prompt text. '\n' can be used as separator.
isModal - whether the dialog modal.
chkEdgeExist - TRUE if the inputed edge must exist; NEVERMIND if need not care whether edge exist; FALSE if the inputed edge must not exist.
inputeEdgeWeight - Edge weight TextField show or not.
 o EdgeDialog
 public EdgeDialog(Graph graph,
                   Frame dw,
                   String title,
                   String promptText,
                   boolean isModal,
                   String buttonPrompt[],
                   int chkEdgeExist)
Construct a GraphDialog without message textField.

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.
chkEdgeExist - TRUE if the inputed edge must exist; NEVERMIND if need not care whether edge exist; FALSE if the inputed edge must not exist.
 o EdgeDialog
 public EdgeDialog(Graph graph,
                   Frame dw,
                   String title,
                   String promptText,
                   boolean isModal,
                   String buttonPrompt[],
                   int chkEdgeExist,
                   boolean inputEdgeWeight)
Construct a GraphDialog without message textField.

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.
chkEdgeExist - TRUE if the inputed edge must exist; NEVERMIND if need not care whether edge exist; FALSE if the inputed edge must not exist.
inputeEdgeWeight - Edge weight TextField show or not.
 o EdgeDialog
 public EdgeDialog(Graph graph,
                   Frame dw,
                   String title,
                   String promptText,
                   boolean isModal,
                   String buttonPrompt[],
                   int msgLength,
                   int chkEdgeExist,
                   boolean inputEdgeWeight)
Construct a GraphDialog without message textField.

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 textField.
chkEdgeExist - TRUE if the inputed edge must exist; NEVERMIND if need not care whether edge exist; FALSE if the inputed edge must not exist.
inputeEdgeWeight - Edge weight TextField show or not.

Methods

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

Overrides:
setCentralPanel in class GenericDialog
 o checkEdgeValid
 protected boolean checkEdgeValid()
Check if the inputed edge valid.

Returns:
true if the inputed edge valid ; false otherwise.
 o checkFormat
 public boolean checkFormat()
Check the validity of inputed data.

It returns true itself. Keep it alone if check is not required.

Returns:
true if inputs is valid; false if otherwise.
Overrides:
checkFormat in class GenericDialog
 o getFromNode
 public int getFromNode()
Get the start node of the edge.

 o getToNode
 public int getToNode()
Get the end node of the edge.

 o getEdgeWeight
 public double getEdgeWeight()
Get the weight of edge.

 o getArg
 public Object[] getArg(Object additionalArg[])
Return the result of EdgeDialog.

Parameters:
additionalArg - Additional arguments for Alogorithm.setArg(Object[])
Returns:
If the specified edge exist, then return that edge. ( Object[]{ specified_edge ,additionArg[0],additionArg[1],..}); otherwise , Object[]{ additionalArg[0], additionalArg[1],... };
Overrides:
getArg in class GenericDialog

All Packages  Class Hierarchy  This Package  Previous  Next  Index