giden.CORE
Class UserIO

java.lang.Object
  |
  +--giden.CORE.UserBase
        |
        +--giden.CORE.UserIO

public class UserIO
extends giden.CORE.UserBase

Copyright (c) 1993-2004 C. R. Coullard, D. S. Dilworth, J. H. Owen, All Rights Reserved.
We make no representations or warranties about the suitability of the software, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. We shall not be liable for any damages suffered by user as a result of using, modifying or distributing this software or its derivatives.

UserIO is class that provides methods for interacting with the user.

Copyright (c) 1993-2003 C. R. Coullard, D. S. Dilworth, J. H. Owen, All Rights Reserved.

Version:
4.0a 2004 08 27
Author:
D. S. Dilworth

Fields inherited from class giden.CORE.UserBase
NullBase, Services
 
Constructor Summary
UserIO(giden.CORE.SolverServices services, giden.CORE.GUISolver gui)
          Creates a user window, called from SolverMenu
 
Method Summary
 giden.CORE.UiEdge AddEdge(Edge edge)
          Add the edge to the window
 giden.CORE.UiEdge AddEdge(Edge edge, UiEdgeInfo info)
          Add the edge to the window, draw as defined by info
 giden.CORE.UiNode AddNode(Node node, int x, int y)
          Add the node to the window at the (x,y), and using the default draw information.
 giden.CORE.UiNode AddNode(Node node, java.awt.Point pt)
          Add the node to the window at the given point, and using the default draw information
 giden.CORE.UiNode AddNode(Node node, UiNodeInfo info)
          Add the node to the window, draw as defined by info
 void ClearStatusLine()
          Clear the status line
 void CreateAnimationButtons()
          Create animation sets
 giden.CORE.AnimationSet CreateAnimationSet(java.lang.String label, java.awt.Color color)
          Create a named AnimationSet and define color
 giden.CORE.ColorSet CreateColorSet(java.awt.Color color)
          Create a named AnimationSet and define color
 void CreateFinalButtons()
          Create animation sets
 giden.CORE.FinalSet CreateFinalSet(java.lang.String label, java.awt.Color color)
          Create a named final AnimationSet and define color
 RowDialogMain CreateRowDialog(java.lang.String name)
           
 void CreateSolverInputDialog(java.lang.String textname, giden.CORE.ExecBase solver, Network net, giden.GUI.GidenSolverInput input)
          Create a dialog box and wait for user response
 void DrawNetwork()
          Internal Method
 UiEdgeInfo GetDefaultUiEdgeInfo()
          Returns the default draw information for edges
 UiNodeInfo GetDefaultUiNodeInfo()
          Returns the default draw information for nodes
 UiEdgeInfo GetEdgeInfo(Edge edge)
          Gets draw info for the given edge
 giden.CORE.GUISolver GetGUI()
          Returns to GUI for this window
 Network GetNet()
          Create a named AnimationSet and define color
 UiNodeInfo GetNodeInfo(Node node)
          Gets draw info for the given node
 java.awt.Point GetTopRight()
          Internal Method
 giden.CORE.UiNetwork GetUiNet()
          Gets the UiNet for this window
 boolean IsNodeMember(Node node)
          Returns true if the node is a member of this window
 void MoveAll(giden.CORE.AnimationSet set)
          Move all nodes and edges into the given set
 boolean MoveToSet(Edge edge, giden.CORE.AnimationSet set)
          Move this edge to this set
 boolean MoveToSet(Node node, giden.CORE.AnimationSet set)
          Move this node to the animation set
 void NotifyOfSolverError(java.lang.String message)
          Internal Method
 void NotifyOfSolverNotice(java.lang.String message)
          Internal Method
 void NotifyOfSolverWarning(java.lang.String message)
          Internal Method
 void PutDirected(boolean flag)
          Changes the network to directed or undirected
 void PutEdgeColor(Edge edge, java.awt.Color color)
          Puts the color of an edge
 void PutEdgeInfo(Edge edge, UiEdgeInfo info)
          Puts draw info for the given edge
 void PutEdgeVisibility(Edge edge, boolean visible)
          Puts edge visibility
 void PutEdgeVisiblty(Edge edge, boolean visible)
          Deprecated.  
 void PutLabel(Edge edge, int label)
          Changes the integer label for this edge
 void PutLabel(Edge edge, java.lang.String label)
          Changes the string label for this edge
 void PutLabel(Node node, int label)
          Changes the integer label for this node
 void PutLabel(Node node, java.lang.String label)
          Changes the string label for this node
 void PutNodeColor(Node node, java.awt.Color color)
          Puts the color of a node
 void PutNodeInfo(Node node, UiNodeInfo info)
          Puts draw info for the given node
 void SetEdgeColor(Edge edge, java.awt.Color color)
          Deprecated.  
 void SetNodeColor(Node node, java.awt.Color color)
          Deprecated.  
 void ShowPseudoCodeText(java.lang.String token)
          Display the line with given token in the PseudoCode window
 void SingleStep()
          Single step trace all sets
 void SingleStep(giden.CORE.AnimationSet set)
          Single step trace this animation set
 void SingleStep(Edge edge, giden.CORE.AnimationSet set)
          Single step trace this edge and set
 void SingleStep(Node node, giden.CORE.AnimationSet set)
          Single step trace this node and set
 void StatusLine(java.lang.String message)
          Copies the message to the status line buffer
 void Trace(giden.CORE.AnimationSet set)
          Update an AnimationSet
 void Update()
          Update the UI to show changes to animation controls
 Edge UserMouseEdgeInput(java.lang.String prompt)
          Prompts the user and returns the clicked edge or null
 java.awt.Point UserMouseInput(java.lang.String question)
          Prompt user, wait for mouse click, returns coordinates
 Node UserMouseNodeInput(java.lang.String prompt)
          Prompts the user and returns the clicked node or null
 java.lang.String UserTextInput(java.lang.String question, java.lang.String answer)
          Prompt user with default answer, wait for text, returns text
 
Methods inherited from class giden.CORE.UserBase
CreateSolverResult, CreateSolverResult, PutEdgeVisibilty, RemoveFromSet, RemoveFromSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserIO

public UserIO(giden.CORE.SolverServices services,
              giden.CORE.GUISolver gui)
Creates a user window, called from SolverMenu
Method Detail

GetDefaultUiNodeInfo

public UiNodeInfo GetDefaultUiNodeInfo()
Returns the default draw information for nodes
Overrides:
GetDefaultUiNodeInfo in class giden.CORE.UserBase

GetDefaultUiEdgeInfo

public UiEdgeInfo GetDefaultUiEdgeInfo()
Returns the default draw information for edges
Overrides:
GetDefaultUiEdgeInfo in class giden.CORE.UserBase

AddNode

public giden.CORE.UiNode AddNode(Node node,
                                 int x,
                                 int y)
Add the node to the window at the (x,y), and using the default draw information.
Overrides:
AddNode in class giden.CORE.UserBase

AddNode

public giden.CORE.UiNode AddNode(Node node,
                                 java.awt.Point pt)
Add the node to the window at the given point, and using the default draw information
Overrides:
AddNode in class giden.CORE.UserBase

AddNode

public giden.CORE.UiNode AddNode(Node node,
                                 UiNodeInfo info)
Add the node to the window, draw as defined by info
Overrides:
AddNode in class giden.CORE.UserBase

AddEdge

public giden.CORE.UiEdge AddEdge(Edge edge)
Add the edge to the window
Overrides:
AddEdge in class giden.CORE.UserBase

AddEdge

public giden.CORE.UiEdge AddEdge(Edge edge,
                                 UiEdgeInfo info)
Add the edge to the window, draw as defined by info
Overrides:
AddEdge in class giden.CORE.UserBase

IsNodeMember

public boolean IsNodeMember(Node node)
Returns true if the node is a member of this window
Overrides:
IsNodeMember in class giden.CORE.UserBase

CreateRowDialog

public RowDialogMain CreateRowDialog(java.lang.String name)
Overrides:
CreateRowDialog in class giden.CORE.UserBase

CreateColorSet

public giden.CORE.ColorSet CreateColorSet(java.awt.Color color)
Create a named AnimationSet and define color
Overrides:
CreateColorSet in class giden.CORE.UserBase

CreateFinalSet

public giden.CORE.FinalSet CreateFinalSet(java.lang.String label,
                                          java.awt.Color color)
Create a named final AnimationSet and define color
Overrides:
CreateFinalSet in class giden.CORE.UserBase

CreateAnimationSet

public giden.CORE.AnimationSet CreateAnimationSet(java.lang.String label,
                                                  java.awt.Color color)
Create a named AnimationSet and define color
Overrides:
CreateAnimationSet in class giden.CORE.UserBase

NotifyOfSolverWarning

public void NotifyOfSolverWarning(java.lang.String message)
Internal Method
Overrides:
NotifyOfSolverWarning in class giden.CORE.UserBase

NotifyOfSolverError

public void NotifyOfSolverError(java.lang.String message)
Internal Method
Overrides:
NotifyOfSolverError in class giden.CORE.UserBase

NotifyOfSolverNotice

public void NotifyOfSolverNotice(java.lang.String message)
Internal Method
Overrides:
NotifyOfSolverNotice in class giden.CORE.UserBase

GetNet

public Network GetNet()
Create a named AnimationSet and define color
Overrides:
GetNet in class giden.CORE.UserBase

GetUiNet

public giden.CORE.UiNetwork GetUiNet()
Gets the UiNet for this window
Overrides:
GetUiNet in class giden.CORE.UserBase

GetGUI

public giden.CORE.GUISolver GetGUI()
Returns to GUI for this window
Overrides:
GetGUI in class giden.CORE.UserBase

GetTopRight

public java.awt.Point GetTopRight()
Internal Method
Overrides:
GetTopRight in class giden.CORE.UserBase

Update

public void Update()
Update the UI to show changes to animation controls
Overrides:
Update in class giden.CORE.UserBase

CreateAnimationButtons

public void CreateAnimationButtons()
Create animation sets
Overrides:
CreateAnimationButtons in class giden.CORE.UserBase

CreateFinalButtons

public void CreateFinalButtons()
Create animation sets
Overrides:
CreateFinalButtons in class giden.CORE.UserBase

Trace

public void Trace(giden.CORE.AnimationSet set)
Update an AnimationSet
Overrides:
Trace in class giden.CORE.UserBase

SingleStep

public void SingleStep()
Single step trace all sets
Overrides:
SingleStep in class giden.CORE.UserBase

SingleStep

public void SingleStep(giden.CORE.AnimationSet set)
Single step trace this animation set
Overrides:
SingleStep in class giden.CORE.UserBase
Parameters:
set - the animation set to mark as stepped

SingleStep

public void SingleStep(Node node,
                       giden.CORE.AnimationSet set)
Single step trace this node and set
Overrides:
SingleStep in class giden.CORE.UserBase
Parameters:
node - the node to move to the given set
set - the animation set to mark as stepped

SingleStep

public void SingleStep(Edge edge,
                       giden.CORE.AnimationSet set)
Single step trace this edge and set
Overrides:
SingleStep in class giden.CORE.UserBase
Parameters:
edge - the nedge to move to the given set
set - the animation set to mark as stepped

MoveToSet

public boolean MoveToSet(Node node,
                         giden.CORE.AnimationSet set)
Move this node to the animation set
Overrides:
MoveToSet in class giden.CORE.UserBase
Parameters:
node - the node to move to a new set
set - the set to move the node into

MoveToSet

public boolean MoveToSet(Edge edge,
                         giden.CORE.AnimationSet set)
Move this edge to this set
Overrides:
MoveToSet in class giden.CORE.UserBase
Parameters:
edge - the edge to move to a new set
set - the set to move the edge into

MoveAll

public void MoveAll(giden.CORE.AnimationSet set)
Move all nodes and edges into the given set
Overrides:
MoveAll in class giden.CORE.UserBase
Parameters:
set - the set to move all nodes and edge into

StatusLine

public void StatusLine(java.lang.String message)
Copies the message to the status line buffer
Overrides:
StatusLine in class giden.CORE.UserBase

ClearStatusLine

public void ClearStatusLine()
Clear the status line
Overrides:
ClearStatusLine in class giden.CORE.UserBase

UserTextInput

public java.lang.String UserTextInput(java.lang.String question,
                                      java.lang.String answer)
Prompt user with default answer, wait for text, returns text
Overrides:
UserTextInput in class giden.CORE.UserBase

UserMouseInput

public java.awt.Point UserMouseInput(java.lang.String question)
Prompt user, wait for mouse click, returns coordinates
Overrides:
UserMouseInput in class giden.CORE.UserBase

UserMouseNodeInput

public Node UserMouseNodeInput(java.lang.String prompt)
Prompts the user and returns the clicked node or null
Overrides:
UserMouseNodeInput in class giden.CORE.UserBase

UserMouseEdgeInput

public Edge UserMouseEdgeInput(java.lang.String prompt)
Prompts the user and returns the clicked edge or null
Overrides:
UserMouseEdgeInput in class giden.CORE.UserBase

ShowPseudoCodeText

public void ShowPseudoCodeText(java.lang.String token)
Display the line with given token in the PseudoCode window
Overrides:
ShowPseudoCodeText in class giden.CORE.UserBase
Parameters:
token - the string token associated with the text line

CreateSolverInputDialog

public void CreateSolverInputDialog(java.lang.String textname,
                                    giden.CORE.ExecBase solver,
                                    Network net,
                                    giden.GUI.GidenSolverInput input)
Create a dialog box and wait for user response
Overrides:
CreateSolverInputDialog in class giden.CORE.UserBase
Parameters:
textname - the text name for the solver
solver - the base class for the solver
net - the network the solver is currently processing
input - class with solver input information

GetNodeInfo

public UiNodeInfo GetNodeInfo(Node node)
Gets draw info for the given node
Overrides:
GetNodeInfo in class giden.CORE.UserBase

GetEdgeInfo

public UiEdgeInfo GetEdgeInfo(Edge edge)
Gets draw info for the given edge
Overrides:
GetEdgeInfo in class giden.CORE.UserBase

PutNodeInfo

public void PutNodeInfo(Node node,
                        UiNodeInfo info)
Puts draw info for the given node
Overrides:
PutNodeInfo in class giden.CORE.UserBase

PutEdgeInfo

public void PutEdgeInfo(Edge edge,
                        UiEdgeInfo info)
Puts draw info for the given edge
Overrides:
PutEdgeInfo in class giden.CORE.UserBase

SetNodeColor

public void SetNodeColor(Node node,
                         java.awt.Color color)
Deprecated.  

Puts the color of a node
Overrides:
SetNodeColor in class giden.CORE.UserBase

PutNodeColor

public void PutNodeColor(Node node,
                         java.awt.Color color)
Puts the color of a node

SetEdgeColor

public void SetEdgeColor(Edge edge,
                         java.awt.Color color)
Deprecated.  

Puts the color of an edge
Overrides:
SetEdgeColor in class giden.CORE.UserBase

PutEdgeColor

public void PutEdgeColor(Edge edge,
                         java.awt.Color color)
Puts the color of an edge
Overrides:
PutEdgeColor in class giden.CORE.UserBase

PutEdgeVisiblty

public void PutEdgeVisiblty(Edge edge,
                            boolean visible)
Deprecated.  

Puts edge visibility, misspelled

PutEdgeVisibility

public void PutEdgeVisibility(Edge edge,
                              boolean visible)
Puts edge visibility
Overrides:
PutEdgeVisibility in class giden.CORE.UserBase

PutLabel

public void PutLabel(Node node,
                     java.lang.String label)
Changes the string label for this node
Overrides:
PutLabel in class giden.CORE.UserBase
Parameters:
node - the node to be assigned the label
label - the new text label for this node

PutLabel

public void PutLabel(Node node,
                     int label)
Changes the integer label for this node
Overrides:
PutLabel in class giden.CORE.UserBase
Parameters:
node - the node to be assigned the label
label - the new integer label for this node

PutLabel

public void PutLabel(Edge edge,
                     java.lang.String label)
Changes the string label for this edge
Overrides:
PutLabel in class giden.CORE.UserBase
Parameters:
edge - the edge to be assigned the label
label - the new text label for this edge

PutLabel

public void PutLabel(Edge edge,
                     int label)
Changes the integer label for this edge
Overrides:
PutLabel in class giden.CORE.UserBase
Parameters:
edge - the edge to be assigned the label
label - the new integer label for this edge

PutDirected

public void PutDirected(boolean flag)
Changes the network to directed or undirected
Overrides:
PutDirected in class giden.CORE.UserBase
Parameters:
flag - true if the edge should be directed, otherwise false

DrawNetwork

public void DrawNetwork()
Internal Method
Overrides:
DrawNetwork in class giden.CORE.UserBase