com.sun.electric
Class Main.UserInterfaceDummy

java.lang.Object
  extended by com.sun.electric.tool.Client
      extended by com.sun.electric.tool.AbstractUserInterface
          extended by com.sun.electric.Main.UserInterfaceDummy
All Implemented Interfaces:
UserInterface
Enclosing class:
Main

public static class Main.UserInterfaceDummy
extends AbstractUserInterface


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.tool.Client
Client.BeepEvent, Client.EJobEvent, Client.JobQueueEvent, Client.OS, Client.PrintEvent, Client.ProgressNoteEvent, Client.ProgressValueEvent, Client.SavePrintEvent, Client.ServerEvent, Client.ShowMessageEvent, Client.StartProgressDialogEvent, Client.StopProgressDialogEvent, Client.TermLoggingEvent
 
Constructor Summary
Main.UserInterfaceDummy(int connectionId)
           
 
Method Summary
protected  void addEvent(Client.ServerEvent serverEvent)
           
 void adjustReferencePoint(Cell cell, double cX, double cY)
          Method to adjust reference point in WindowFrame containing the cell
 int askForChoice(java.lang.String message, java.lang.String title, java.lang.String[] choices, java.lang.String defaultChoice)
          Method to ask for a choice among possibilities.
 java.lang.String askForInput(java.lang.Object message, java.lang.String title, java.lang.String def)
          Method to ask for a line of text.
 boolean confirmMessage(java.lang.Object message)
          Method to show a message and ask for confirmation.
 EditWindow_ displayCell(Cell cell)
          Method to request that a Cell be displayed in a new window.
 Cell getCurrentCell()
          Get current cell from current library
 EditWindow_ getCurrentEditWindow_()
          Method to return the current "EditWindow_" object.
 EDatabase getDatabase()
          Method to return the current database object.
 int getDefaultTextSize()
          Method to return the height of default text (in points).
 java.lang.String getProgressNote()
          Method to get text message in the progress dialgo.
 Cell needCurrentCell()
          Method to demand the current Cell.
 EditWindow_ needCurrentEditWindow_()
          Method to demand the current "EditWindow_" object.
 void printMessage(java.lang.String message, boolean newLine)
          Method print a message.
 void repaintAllWindows()
          Method to request that all windows be redisplayed including palettes.
 java.lang.String reportLog(ErrorLogger.MessageLog log, boolean showhigh, Geometric[] gPair, int position)
          Method to return the error message associated with the current error.
 void saveMessages(java.lang.String filePath)
          Method to start saving messages.
 void setProgressNote(java.lang.String message)
          Method to set a text message in the progress dialog.
 void setProgressValue(int pct)
          Method to update the progress bar
 void showErrorMessage(java.lang.String[] message, java.lang.String title)
          Method to show an error message.
 void showErrorMessage(java.lang.String message, java.lang.String title)
          Method to show an error message.
 void showInformationMessage(java.lang.String message, java.lang.String title)
          Method to show an informational message.
protected  void showJobQueue(Job.Inform[] jobQueue)
           
 void startProgressDialog(java.lang.String type, java.lang.String filePath)
          Method to start the display of a progress dialog.
 void stopProgressDialog()
          Method to stop the progress bar
protected  void terminateJob(EJob ejob)
           
 void termLogging(ErrorLogger logger, boolean explain, boolean terminate)
           
 
Methods inherited from class com.sun.electric.tool.AbstractUserInterface
beep, finishInitialization, getCurrentLibrary, getCurrentLibraryId, getCurrentTechId, getCurrentTechnology, getJobKey, restoreHighlights, saveHighlights, setClientThread, setCurrentLibrary, setCurrentTechnology, showSnapshot, showUndoRedoStatus, updateIncrementalDRCErrors, updateNetworkErrors
 
Methods inherited from class com.sun.electric.tool.Client
getOperatingSystem, isOSMac, isOSWindows, newJobId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main.UserInterfaceDummy

public Main.UserInterfaceDummy(int connectionId)
Method Detail

startProgressDialog

public void startProgressDialog(java.lang.String type,
                                java.lang.String filePath)
Description copied from interface: UserInterface
Method to start the display of a progress dialog.

Parameters:
type - the message to show in the progress dialog.
filePath - the file being read (null if not reading a file).

stopProgressDialog

public void stopProgressDialog()
Description copied from interface: UserInterface
Method to stop the progress bar


setProgressValue

public void setProgressValue(int pct)
Description copied from interface: UserInterface
Method to update the progress bar

Parameters:
pct - the percentage done (from 0 to 100).

setProgressNote

public void setProgressNote(java.lang.String message)
Description copied from interface: UserInterface
Method to set a text message in the progress dialog.

Parameters:
message - the new progress message.

getProgressNote

public java.lang.String getProgressNote()
Description copied from interface: UserInterface
Method to get text message in the progress dialgo.

Returns:
the current progress message.

getDatabase

public EDatabase getDatabase()
Description copied from interface: UserInterface
Method to return the current database object.

Specified by:
getDatabase in interface UserInterface
Overrides:
getDatabase in class AbstractUserInterface
Returns:
the current database (null if none).

getCurrentEditWindow_

public EditWindow_ getCurrentEditWindow_()
Description copied from interface: UserInterface
Method to return the current "EditWindow_" object.

Returns:
the current "EditWindow_" object (null if none).

needCurrentEditWindow_

public EditWindow_ needCurrentEditWindow_()
Description copied from interface: UserInterface
Method to demand the current "EditWindow_" object. If none exists, an error message is displayed.

Returns:
the current "EditWindow_" object (null if none).

getCurrentCell

public Cell getCurrentCell()
Get current cell from current library

Returns:
the current Cell (null if none).

needCurrentCell

public Cell needCurrentCell()
Description copied from interface: UserInterface
Method to demand the current Cell. If none exists, an error message is displayed.

Returns:
the current Cell (null if none).

repaintAllWindows

public void repaintAllWindows()
Description copied from interface: UserInterface
Method to request that all windows be redisplayed including palettes.


adjustReferencePoint

public void adjustReferencePoint(Cell cell,
                                 double cX,
                                 double cY)
Description copied from interface: UserInterface
Method to adjust reference point in WindowFrame containing the cell


getDefaultTextSize

public int getDefaultTextSize()
Description copied from interface: UserInterface
Method to return the height of default text (in points).

Returns:
the height of default text (in points).

displayCell

public EditWindow_ displayCell(Cell cell)
Description copied from interface: UserInterface
Method to request that a Cell be displayed in a new window.

Parameters:
cell - the Cell to be displayed.
Returns:
the EditWindow_ object created to show the Cell.

termLogging

public void termLogging(ErrorLogger logger,
                        boolean explain,
                        boolean terminate)

reportLog

public java.lang.String reportLog(ErrorLogger.MessageLog log,
                                  boolean showhigh,
                                  Geometric[] gPair,
                                  int position)
Method to return the error message associated with the current error. Highlights associated graphics if "showhigh" is nonzero. Fills "g1" and "g2" with associated geometry modules (if nonzero).


showErrorMessage

public void showErrorMessage(java.lang.String message,
                             java.lang.String title)
Method to show an error message.

Parameters:
message - the error message to show.
title - the title of a dialog with the error message.

showErrorMessage

public void showErrorMessage(java.lang.String[] message,
                             java.lang.String title)
Method to show an error message.

Parameters:
message - the error message to show.
title - the title of a dialog with the error message.

showInformationMessage

public void showInformationMessage(java.lang.String message,
                                   java.lang.String title)
Method to show an informational message.

Parameters:
message - the message to show.
title - the title of a dialog with the message.

printMessage

public void printMessage(java.lang.String message,
                         boolean newLine)
Method print a message.

Parameters:
message - the message to show.
newLine - add new line after the message

saveMessages

public void saveMessages(java.lang.String filePath)
Method to start saving messages.

Parameters:
filePath - file to save

confirmMessage

public boolean confirmMessage(java.lang.Object message)
Method to show a message and ask for confirmation.

Parameters:
message - the message to show.
Returns:
true if "yes" was selected, false if "no" was selected.

askForChoice

public int askForChoice(java.lang.String message,
                        java.lang.String title,
                        java.lang.String[] choices,
                        java.lang.String defaultChoice)
Method to ask for a choice among possibilities.

Parameters:
message - the message to show.
title - the title of the dialog with the query.
choices - an array of choices to present, each in a button.
defaultChoice - the default choice.
Returns:
the index into the choices array that was selected.

askForInput

public java.lang.String askForInput(java.lang.Object message,
                                    java.lang.String title,
                                    java.lang.String def)
Method to ask for a line of text.

Parameters:
message - the prompt message.
title - the title of a dialog with the message.
def - the default response.
Returns:
the string (null if cancelled).

terminateJob

protected void terminateJob(EJob ejob)
Specified by:
terminateJob in class AbstractUserInterface

showJobQueue

protected void showJobQueue(Job.Inform[] jobQueue)
Specified by:
showJobQueue in class AbstractUserInterface

addEvent

protected void addEvent(Client.ServerEvent serverEvent)
Specified by:
addEvent in class AbstractUserInterface