com.sun.electric.tool.user.ui
Class PaletteFrame

java.lang.Object
  extended by com.sun.electric.tool.user.ui.PaletteFrame
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener

public class PaletteFrame
extends java.lang.Object
implements java.awt.event.MouseListener

This class defines a component window in the side bar.


Nested Class Summary
static class PaletteFrame.PlaceNewNode
          Class that creates the node selected from the component menu.
static interface PaletteFrame.PlaceNodeEventListener
          Interface for a Palette object that can be added to the Palette frame
static class PaletteFrame.PlaceNodeListener
          Class to choose a location for new node placement.
 
Method Summary
 void arcProtoChanged()
           
 javax.swing.JPanel getTechPalette()
           
 void loadForTechnology(Technology tech, WindowFrame ww)
          Set the Technology Palette to the current technology.
 void loadTechnologies(boolean makeCurrent)
          Method to update the technology popup selector.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
static PaletteFrame newInstance(WindowFrame ww)
          Method to create a new window on the screen that displays the component menu.
static PaletteFrame.PlaceNodeListener placeInstance(java.lang.Object obj, PaletteFrame.PlaceNodeEventListener palette, boolean export)
          Method to interactively place an instance of a node.
 void setCursor(java.awt.Cursor cursor)
          Method to set the cursor that is displayed in the PaletteFrame.
 void setSelectedItem(java.lang.Object anObject)
          Public function to set selected item in techSelector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static PaletteFrame newInstance(WindowFrame ww)
Method to create a new window on the screen that displays the component menu.

Returns:
the PaletteFrame that shows the component menu.

loadTechnologies

public void loadTechnologies(boolean makeCurrent)
Method to update the technology popup selector. Called at initialization or when a new technology has been created.

Parameters:
makeCurrent - true to keep the current technology selected, false to set to the current technology.

setSelectedItem

public void setSelectedItem(java.lang.Object anObject)
Public function to set selected item in techSelector

Parameters:
anObject -

setCursor

public void setCursor(java.awt.Cursor cursor)
Method to set the cursor that is displayed in the PaletteFrame.

Parameters:
cursor - the cursor to display here.

getTechPalette

public javax.swing.JPanel getTechPalette()

arcProtoChanged

public void arcProtoChanged()

loadForTechnology

public void loadForTechnology(Technology tech,
                              WindowFrame ww)
Set the Technology Palette to the current technology.


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

placeInstance

public static PaletteFrame.PlaceNodeListener placeInstance(java.lang.Object obj,
                                                           PaletteFrame.PlaceNodeEventListener palette,
                                                           boolean export)
Method to interactively place an instance of a node.

Parameters:
obj - the node to create. If this is a NodeProto, one of these types is created. If this is a NodeInst, one of these is created, and the specifics of this instance are copied.
palette - if not null, is notified of certain events during the placing of the node If this is null, then the request did not come from the palette.