|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JToolBar
com.sun.electric.tool.user.ui.ToolBar
public class ToolBar
This class manages the Electric toolbar.
Nested Class Summary | |
---|---|
static class |
ToolBar.CursorMode
CursorMode is a typesafe enum class that describes the current editing mode (select, zoom, etc). |
static class |
ToolBar.EToolBarButton
Generic tool bar button. |
static class |
ToolBar.EToolBarGeneralMenuButton
Generic tool bar radio button. |
static class |
ToolBar.SelectMode
SelectMode is a typesafe enum class that describes the current selection modes (objects or area). |
static class |
ToolBar.SelectModeButton
|
Nested classes/interfaces inherited from class javax.swing.JToolBar |
---|
javax.swing.JToolBar.AccessibleJToolBar, javax.swing.JToolBar.Separator |
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static ToolBar.EToolBarButton |
expandOneLevelCommand
|
static EMenu |
modesSubMenu
|
static ToolBar.EToolBarButton |
openLibraryCommand
|
static ToolBar.EToolBarButton |
preferencesCommand
|
static ToolBar.EToolBarButton |
redoCommand
|
static ToolBar.EToolBarButton |
saveLibraryCommand
|
static ToolBar.EToolBarButton |
undoCommand
|
static ToolBar.EToolBarButton |
unexpandOneLevelCommand
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, 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 javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary | |
---|---|
static ToolBar |
createToolBar()
Method to create the toolbar. |
void |
finished()
Call when done with this toolBar to release its resources |
static java.util.List<ToolBar.EToolBarButton> |
getAllButtons()
Method to return a list of all known toolbar buttons. |
static java.util.Map<java.lang.String,java.lang.String> |
getCommandToIconMap()
Method to return a mapping from command names to disk files with their icons. |
static ToolBar.CursorMode |
getCursorMode()
Method to tell which cursor mode is in effect. |
static ToolBar.EToolBarButton[] |
getFactoryButtons()
Method to return the "factory default" set of toolbar buttons. |
static javax.swing.ImageIcon |
getProperSizeIcon(java.lang.String fileName)
Method to convert an image file name into a proper-sized icon for the Toolbar. |
static ToolBar.SelectMode |
getSelectMode()
Method to tell what selection mode is in effect. |
static ToolBar.EToolBarButton[] |
getToolbarButtons()
Method to return all of the buttons in the toolbar. |
static javax.swing.ImageIcon |
getUnknownIcon()
Method to return the icon to use when no icon can be found. |
static boolean |
isSelectSpecial()
Returns state of "select special" button |
static java.awt.Cursor |
readCursor(java.lang.String cursorName,
int hotX,
int hotY)
|
static void |
setCommandToIconMap(java.util.Map<java.lang.String,java.lang.String> newMap)
Method to set a mapping from command names to disk files with their icons. |
static void |
setGridAligment()
Method to signal ToolBar that gridAlignment changed |
static void |
setSaveLibraryButton()
|
static void |
setToolbarButtons(ToolBar.EToolBarButton[] buttons)
Method to change the order of buttons in the toolbar. |
void |
updateCellHistoryStatus(boolean backEnabled,
boolean forwardEnabled)
Update CellHistory buttons on this ToolBar |
static void |
updateToolBarButtons()
Update associated ToolBarButtons on all toolbars and updatable menu items on all menubars |
static void |
updateUndoRedoButtons(boolean undo,
boolean redo)
|
Methods inherited from class javax.swing.JToolBar |
---|
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, 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 |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ToolBar.EToolBarButton openLibraryCommand
public static final ToolBar.EToolBarButton saveLibraryCommand
public static final EMenu modesSubMenu
public static final ToolBar.EToolBarButton preferencesCommand
public static final ToolBar.EToolBarButton expandOneLevelCommand
public static final ToolBar.EToolBarButton unexpandOneLevelCommand
public static final ToolBar.EToolBarButton undoCommand
public static final ToolBar.EToolBarButton redoCommand
Method Detail |
---|
public static ToolBar createToolBar()
public static ToolBar.EToolBarButton[] getFactoryButtons()
public static java.util.List<ToolBar.EToolBarButton> getAllButtons()
public static ToolBar.EToolBarButton[] getToolbarButtons()
public static javax.swing.ImageIcon getUnknownIcon()
public static void setToolbarButtons(ToolBar.EToolBarButton[] buttons)
buttons
- the new order of buttons in the toolbar.public static javax.swing.ImageIcon getProperSizeIcon(java.lang.String fileName)
fileName
- the path to the image file.
public static java.util.Map<java.lang.String,java.lang.String> getCommandToIconMap()
public static void setCommandToIconMap(java.util.Map<java.lang.String,java.lang.String> newMap)
newMap
- a new mapping from command names to disk files with their icons.public static void setSaveLibraryButton()
public static java.awt.Cursor readCursor(java.lang.String cursorName, int hotX, int hotY)
public static ToolBar.CursorMode getCursorMode()
public static void setGridAligment()
public static ToolBar.SelectMode getSelectMode()
public static boolean isSelectSpecial()
public static void updateUndoRedoButtons(boolean undo, boolean redo)
public void updateCellHistoryStatus(boolean backEnabled, boolean forwardEnabled)
backEnabled
- true to enable goBackButton.forwardEnabled
- true toenable goForwardButton.public static void updateToolBarButtons()
public void finished()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |