Class s2iMain

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--s2iMain

public class s2iMain
extends javax.swing.JFrame
implements s2iDBOpenListener

The SpiTran main class.

Author:
Anish Malhotra, Cadence Design Systems
See Also:
Serialized Form

Inner Class Summary
(package private)  class s2iMain.menuItemListener
          A class to handle menu events.
(package private)  class s2iMain.sppFilter
          A FileFilter class for choosing SpiTran project files in a JFileChooser
(package private)  class s2iMain.SymAction
          A class to handle button and field events.
(package private)  class s2iMain.SymWindow
           
 
Inner classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
(package private)  boolean fComponentsAdjusted
          Has the layout been adjusted?
(package private)  javax.swing.JButton jButton1
           
(package private)  javax.swing.JButton jConfigButton
           
(package private)  javax.swing.JLabel jLabel1
           
(package private)  javax.swing.JLabel jLabel2
           
(package private)  javax.swing.JPanel jPanel1
           
(package private)  javax.swing.JScrollPane jScrollPane1
           
(package private)  javax.swing.JScrollPane jScrollPane2
           
(package private)  javax.swing.JTable jTable1
           
(package private)  javax.swing.JTable jTable2
           
(package private)  javax.swing.JToolBar jToolBar1
           
(package private)  javax.swing.JMenuBar menuBar
          The menubar
(package private)  javax.swing.JMenuItem menuItem_EditSetup
          The Edit -> Setup menu command
(package private)  javax.swing.JMenuItem menuItem_FileExit
          The File -> Exit menu command
(package private)  javax.swing.JMenuItem menuItem_FileNew
          The File -> New menu command
(package private)  javax.swing.JMenuItem menuItem_FileOpen
          The File -> Open menu command
(package private)  javax.swing.JMenuItem menuItem_FileSave
          The File -> Save menu command
(package private)  javax.swing.JMenuItem menuItem_HelpAbout
          The Help -> About menu command
(package private)  javax.swing.JMenuItem menuItem_HelpUserGuide
          The Help -> User Guide menu command
(package private)  javax.swing.JMenuItem menuItem_TranslateExecute
          The Translate -> Execute menu command
(package private)  javax.swing.JMenuItem menuItem_TranslateOptions
          The Translate -> Options menu command
(package private)  s2iConfigureNodes s2iConfigureNodes1
          The "Configure Nodes" window
(package private)  s2iCktInstantiator subcktInstantiator
          The s2iCktInstantiator for manipulating the instance table
(package private)  javax.swing.JButton TBIconNew
           
(package private)  javax.swing.JButton TBIconOpen
           
(package private)  javax.swing.JButton TBIconSave
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, defaultCloseOperation, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis
 
Fields inherited from class java.awt.Window
active, base, focusMgr, inputContext, nameCounter, OPENED, ownedWindowList, serialVersionUID, state, warningString, weakThis, windowListener, windowSerializedDataVersion
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
s2iMain()
          Construct the SpiTran main class.
s2iMain(java.lang.String sTitle)
          Construct the SpiTran main class with a specific window title.
 
Method Summary
 void addNotify()
          Call the superclass addNotify method, then adjust the layout.
(package private)  void FileOpen()
          Allow the user to choose a SpiTran project file, and open it.
 void getDB()
          Display the information read in from a SpiTran project file.
(package private)  void jButton2_actionPerformed(java.awt.event.ActionEvent event)
          Handle an action event on the Configure Nodes button.
(package private)  void JFrame1_WindowClosing(java.awt.event.WindowEvent event)
          Quit the application when the main window closes.
static void main(java.lang.String[] args)
          Run SpiTran.
(package private)  void readSubCkts()
          Read in subckt definitions from the Spice file and display them in the subckt definition table.
 void setVisible(boolean b)
          Construct the SpiTran main class with a specific window title.
 void showAbout()
           
static void showHelp()
          Show the User Guide.
(package private)  void TranslateExecute()
          Prepare all of the files needed by s2ibis and run it
(package private)  void writeLibnInclToFile(java.lang.String fname, java.lang.String[] prefix, java.util.Vector vect)
          Write items to a new Spice file: A list of Strings provided in the call A list of .LIB file names provided in the call
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, createRootPaneException, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
, addToFrameList, constructComponentName, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, initIDs, isResizable, postProcessKeyEvent, readObject, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle, writeObject
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyOrientation, countComponents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, paint, paintComponents, postsOldMouseEvents, preferredSize, print, printComponents, printOneComponent, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

fComponentsAdjusted

boolean fComponentsAdjusted
Has the layout been adjusted?

jToolBar1

javax.swing.JToolBar jToolBar1

TBIconNew

javax.swing.JButton TBIconNew

TBIconOpen

javax.swing.JButton TBIconOpen

TBIconSave

javax.swing.JButton TBIconSave

jPanel1

javax.swing.JPanel jPanel1

jLabel1

javax.swing.JLabel jLabel1

jScrollPane1

javax.swing.JScrollPane jScrollPane1

jTable1

javax.swing.JTable jTable1

jLabel2

javax.swing.JLabel jLabel2

jButton1

javax.swing.JButton jButton1

jScrollPane2

javax.swing.JScrollPane jScrollPane2

jTable2

javax.swing.JTable jTable2

jConfigButton

javax.swing.JButton jConfigButton

menuBar

javax.swing.JMenuBar menuBar
The menubar

subcktInstantiator

s2iCktInstantiator subcktInstantiator
The s2iCktInstantiator for manipulating the instance table

menuItem_EditSetup

javax.swing.JMenuItem menuItem_EditSetup
The Edit -> Setup menu command

menuItem_FileNew

javax.swing.JMenuItem menuItem_FileNew
The File -> New menu command

menuItem_FileOpen

javax.swing.JMenuItem menuItem_FileOpen
The File -> Open menu command

menuItem_FileSave

javax.swing.JMenuItem menuItem_FileSave
The File -> Save menu command

menuItem_FileExit

javax.swing.JMenuItem menuItem_FileExit
The File -> Exit menu command

menuItem_TranslateOptions

javax.swing.JMenuItem menuItem_TranslateOptions
The Translate -> Options menu command

menuItem_TranslateExecute

javax.swing.JMenuItem menuItem_TranslateExecute
The Translate -> Execute menu command

s2iConfigureNodes1

s2iConfigureNodes s2iConfigureNodes1
The "Configure Nodes" window

menuItem_HelpUserGuide

javax.swing.JMenuItem menuItem_HelpUserGuide
The Help -> User Guide menu command

menuItem_HelpAbout

javax.swing.JMenuItem menuItem_HelpAbout
The Help -> About menu command
Constructor Detail

s2iMain

public s2iMain()
Construct the SpiTran main class.

s2iMain

public s2iMain(java.lang.String sTitle)
Construct the SpiTran main class with a specific window title.
Parameters:
sTitle - The window title String
Method Detail

setVisible

public void setVisible(boolean b)
Construct the SpiTran main class with a specific window title.
Parameters:
b - true if the window should become visible
Overrides:
setVisible in class java.awt.Component

main

public static void main(java.lang.String[] args)
Run SpiTran. This sets up a look and feel:
Parameters:
args - This class can be run with arguments: -debug Turn on verbose message printing -root Set the installation root if it is not the working dir

addNotify

public void addNotify()
Call the superclass addNotify method, then adjust the layout.
Overrides:
addNotify in class java.awt.Frame

JFrame1_WindowClosing

void JFrame1_WindowClosing(java.awt.event.WindowEvent event)
Quit the application when the main window closes.
Parameters:
event - unused

jButton2_actionPerformed

void jButton2_actionPerformed(java.awt.event.ActionEvent event)
Handle an action event on the Configure Nodes button.
Parameters:
event - The event that triggered the call

readSubCkts

void readSubCkts()
Read in subckt definitions from the Spice file and display them in the subckt definition table.

writeLibnInclToFile

void writeLibnInclToFile(java.lang.String fname,
                         java.lang.String[] prefix,
                         java.util.Vector vect)
                   throws java.io.IOException,
                          java.lang.IndexOutOfBoundsException
Write items to a new Spice file:
Parameters:
fname - The name String of the file to write
prefix - The Vector of strings to begin the file with
vect - The Vector of .LIB file names to append
Throws:
java.io.IOException -  
java.lang.IndexOutOfBoundsException -  

TranslateExecute

void TranslateExecute()
Prepare all of the files needed by s2ibis and run it

FileOpen

void FileOpen()
Allow the user to choose a SpiTran project file, and open it.

getDB

public void getDB()
Display the information read in from a SpiTran project file.
Specified by:
getDB in interface s2iDBOpenListener

showHelp

public static void showHelp()
Show the User Guide. There should be a version of this that takes a keyword for context-sensitive help. This method is static so that it can be called from other classes without the instance variable.

showAbout

public void showAbout()