com.sun.electric.tool
Class AbstractUserInterface

java.lang.Object
  extended by com.sun.electric.tool.Client
      extended by com.sun.electric.tool.AbstractUserInterface
All Implemented Interfaces:
UserInterface
Direct Known Subclasses:
Main.UserInterfaceDummy, UserInterfaceMain

public abstract class AbstractUserInterface
extends Client
implements UserInterface


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
protected AbstractUserInterface(int connectionId)
           
 
Method Summary
protected abstract  void addEvent(Client.ServerEvent serverEvent)
           
 void beep()
          Method to beep.
 void finishInitialization()
           
 Library getCurrentLibrary()
          Method to return the current Library.
 LibId getCurrentLibraryId()
           
 TechId getCurrentTechId()
           
 Technology getCurrentTechnology()
          Method to return the current Technology.
 EDatabase getDatabase()
          Method to return the current database object.
 Job.Key getJobKey()
          Method to return Job Key of a currently executed Job.
 void restoreHighlights(int highlightsId)
          Restore state of highlights by its ID.
 int saveHighlights()
          Save current state of highlights and return its ID.
protected  void setClientThread()
           
 void setCurrentLibrary(Library lib)
           
 void setCurrentTechnology(Technology tech)
           
protected abstract  void showJobQueue(Job.Inform[] jobQueue)
           
protected  void showSnapshot(Snapshot newSnapshot, boolean undoRedo)
          Show new database snapshot.
 void showUndoRedoStatus(boolean newUndoEnabled, boolean newRedoEnabled)
          Show status of undo/redo buttons
protected abstract  void terminateJob(EJob ejob)
           
protected  void updateIncrementalDRCErrors(Cell cell, java.util.List<ErrorLogger.MessageLog> newErrors, java.util.List<ErrorLogger.MessageLog> delErrors)
           
protected  void updateNetworkErrors(Cell cell, java.util.List<ErrorLogger.MessageLog> errors)
           
 
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
 
Methods inherited from interface com.sun.electric.database.variable.UserInterface
adjustReferencePoint, askForChoice, askForInput, confirmMessage, displayCell, getCurrentCell, getCurrentEditWindow_, getDefaultTextSize, getProgressNote, needCurrentCell, needCurrentEditWindow_, printMessage, repaintAllWindows, reportLog, saveMessages, setProgressNote, setProgressValue, showErrorMessage, showInformationMessage, startProgressDialog, stopProgressDialog, termLogging
 

Constructor Detail

AbstractUserInterface

protected AbstractUserInterface(int connectionId)
Method Detail

getJobKey

public Job.Key getJobKey()
Description copied from interface: UserInterface
Method to return Job Key of a currently executed Job. Jobless context (Gui) is represented by a Job Key with jobId=0.

Specified by:
getJobKey in interface UserInterface

getDatabase

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

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

getCurrentTechnology

public Technology getCurrentTechnology()
Description copied from interface: UserInterface
Method to return the current Technology.

Specified by:
getCurrentTechnology in interface UserInterface
Returns:
the current database (null if none).

getCurrentTechId

public TechId getCurrentTechId()

setCurrentTechnology

public void setCurrentTechnology(Technology tech)

getCurrentLibrary

public Library getCurrentLibrary()
Method to return the current Library.

Specified by:
getCurrentLibrary in interface UserInterface
Returns:
the current Library.

getCurrentLibraryId

public LibId getCurrentLibraryId()

setCurrentLibrary

public void setCurrentLibrary(Library lib)

addEvent

protected abstract void addEvent(Client.ServerEvent serverEvent)

finishInitialization

public void finishInitialization()

updateNetworkErrors

protected void updateNetworkErrors(Cell cell,
                                   java.util.List<ErrorLogger.MessageLog> errors)

updateIncrementalDRCErrors

protected void updateIncrementalDRCErrors(Cell cell,
                                          java.util.List<ErrorLogger.MessageLog> newErrors,
                                          java.util.List<ErrorLogger.MessageLog> delErrors)

saveHighlights

public int saveHighlights()
Save current state of highlights and return its ID.


restoreHighlights

public void restoreHighlights(int highlightsId)
Restore state of highlights by its ID.

Parameters:
highlightsId - id of saved highlights.

showUndoRedoStatus

public void showUndoRedoStatus(boolean newUndoEnabled,
                               boolean newRedoEnabled)
Show status of undo/redo buttons

Parameters:
newUndoEnabled - new status of undo button.
newRedoEnabled - new status of redo button.

showJobQueue

protected abstract void showJobQueue(Job.Inform[] jobQueue)

showSnapshot

protected void showSnapshot(Snapshot newSnapshot,
                            boolean undoRedo)
Show new database snapshot.

Parameters:
newSnapshot - new snapshot.

terminateJob

protected abstract void terminateJob(EJob ejob)

beep

public void beep()
Description copied from interface: UserInterface
Method to beep.

Specified by:
beep in interface UserInterface

setClientThread

protected void setClientThread()