com.ohrasys.cad.gds.swing
Class JGDSParser

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.ohrasys.cad.gds.swing.JGDSParser
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class JGDSParser
extends javax.swing.JComponent

A lightweight GDSII parser Swing component.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int EXPLICIT_CONTROL
          Indicates the control panel should be embedded within the component
static int IMPLICIT_CONTROL
          Indicates the control panel is available via a popup menu
static int PROGRAMMATIC_CONTROL
          Indicates component control is available only via programmatic means
 
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JGDSParser()
          Creates a new JGDSParser object with control panel embedded in the component.
JGDSParser(int controlMode)
          Creates a new JGDSParser object.
JGDSParser(java.lang.String gdsfile)
          Creates a new JGDSParser object with control panel embedded in the component.
JGDSParser(java.lang.String gdsfile, int controlMode)
          Creates a new JGDSParser object.
JGDSParser(java.lang.String gdsfile, java.lang.String logfile)
          Creates a new JGDSParser object with control panel embedded in the component.
JGDSParser(java.lang.String gdsfile, java.lang.String logfile, int controlMode)
          Creates a new JGDSParser object.
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
          Registers ActionListener to receive events.
 java.lang.String getGds()
          Returns the current GDS file location
 java.lang.String getLog()
          Returns the current log file location
 void interruptParser()
          Interrupts the parser
 void parseDesign()
          Parses the currently specified GDS file set using the setGds method.
 void removeActionListener(java.awt.event.ActionListener listener)
          Removes ActionListener from the list of listeners.
 void setGds(java.lang.String gds)
          Sets the GDS file to parse
 void setLog(java.lang.String log)
          Sets the logfile for the parser.
 java.lang.String toString()
          Returns a string representation of the object
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPLICIT_CONTROL

public static final int EXPLICIT_CONTROL
Indicates the control panel should be embedded within the component

See Also:
Constant Field Values

IMPLICIT_CONTROL

public static final int IMPLICIT_CONTROL
Indicates the control panel is available via a popup menu

See Also:
Constant Field Values

PROGRAMMATIC_CONTROL

public static final int PROGRAMMATIC_CONTROL
Indicates component control is available only via programmatic means

See Also:
Constant Field Values
Constructor Detail

JGDSParser

public JGDSParser()
Creates a new JGDSParser object with control panel embedded in the component.


JGDSParser

public JGDSParser(int controlMode)
Creates a new JGDSParser object.

Parameters:
controlMode - One of EXPLICIT_CONTROL, IMPLICIT_CONTROL or PROGRAMMATIC_CONTROL indicating whether the components controls are available as an embedded control panel, a popup control panel, or only via program control.

JGDSParser

public JGDSParser(java.lang.String gdsfile)
Creates a new JGDSParser object with control panel embedded in the component.

Parameters:
gdsfile - The initial GDS file to parse.

JGDSParser

public JGDSParser(java.lang.String gdsfile,
                  int controlMode)
Creates a new JGDSParser object.

Parameters:
gdsfile - The initial GDS file to parse.
controlMode - One of EXPLICIT_CONTROL, IMPLICIT_CONTROL or PROGRAMMATIC_CONTROL indicating whether the components controls are available as an embedded control panel, a popup control panel, or only via program control.

JGDSParser

public JGDSParser(java.lang.String gdsfile,
                  java.lang.String logfile)
Creates a new JGDSParser object with control panel embedded in the component.

Parameters:
gdsfile - The inital GDS file to parse.
logfile - The log file.

JGDSParser

public JGDSParser(java.lang.String gdsfile,
                  java.lang.String logfile,
                  int controlMode)
Creates a new JGDSParser object.

Parameters:
gdsfile - The GDS file to parse.
logfile - The log file to use.
controlMode - One of EXPLICIT_CONTROL, IMPLICIT_CONTROL or PROGRAMMATIC_CONTROL indicating whether the components controls are available as an embedded control panel, a popup control panel, or only via program control.
Throws:
java.lang.IllegalArgumentException - If controlMode is not an allowed value.
Method Detail

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Registers ActionListener to receive events.

Parameters:
listener - The listener to register.

getGds

public java.lang.String getGds()
Returns the current GDS file location

Returns:
The current GDS file location

getLog

public java.lang.String getLog()
Returns the current log file location

Returns:
The current log file location

interruptParser

public void interruptParser()
Interrupts the parser


parseDesign

public void parseDesign()
Parses the currently specified GDS file set using the setGds method.


removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Removes ActionListener from the list of listeners.

Parameters:
listener - The listener to remove.

setGds

public void setGds(java.lang.String gds)
Sets the GDS file to parse

Parameters:
gds - The path to the GDS file to parse.

setLog

public void setLog(java.lang.String log)
Sets the logfile for the parser. If null, the standard output is used.

Parameters:
log - The path to the log file.

toString

public java.lang.String toString()
Returns a string representation of the object

Overrides:
toString in class java.awt.Component
Returns:
The physical address of the instance