|
||||||||||
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
se.entitymanager.presentation.swing.SwingToolBar
public class SwingToolBar
Tool bar for presentation with Swing framework.
The class initializes a JToolBar
.
FocusListener
is implemented
for recognizing the currently selected entity in one
of the trees displayed.
Shares Actions with SwingMenuBar
and
SwingPopupMenu
.
Nested Class Summary |
---|
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private CopyAction |
copyAction
|
private CopyToAction |
copyToAction
|
private CutAction |
cutAction
|
private CutToAction |
cutToAction
|
private DeleteAction |
deleteAction
|
private EntityInterface |
entity
The entity to be edited. |
private LogicFacade |
logicFacade
The logic facade to access entities. |
private OpenAction |
openAction
The Actions |
private PasteAction |
pasteAction
|
private SwingPresentationFacade |
presentationFacade
The presentation facade to which this object belongs, |
private RenameAction |
renameAction
|
private ShowPropertiesAction |
showPropertiesAction
|
private static java.lang.String |
TOOLBAR_CLOSE_ICON_NAME
Path to icon for application tool bar function 'close'. |
private static java.lang.String |
TOOLBAR_COPY_ICON_NAME
Path to icon for application tool bar function 'copy'. |
private static java.lang.String |
TOOLBAR_COPYTO_ICON_NAME
Path to icon for application tool bar function 'copy to'. |
private static java.lang.String |
TOOLBAR_CUT_ICON_NAME
Path to icon for application tool bar function 'cut'. |
private static java.lang.String |
TOOLBAR_CUTTO_ICON_NAME
Path to icon for application tool bar function 'cut to'. |
private static java.lang.String |
TOOLBAR_DELETE_ICON_NAME
Path to icon for application tool bar function 'delete'. |
private static java.lang.String |
TOOLBAR_HELP_ICON_NAME
Path to icon for application tool bar function 'help'. |
private static java.lang.String |
TOOLBAR_OPEN_ICON_NAME
Path to icon for application tool bar function 'open'. |
private static java.lang.String |
TOOLBAR_PASTE_ICON_NAME
Path to icon for application tool bar function 'paste'. |
private static java.lang.String |
TOOLBAR_PROPERTIES_ICON_NAME
Path to icon for application tool bar function 'properties'. |
private static java.lang.String |
TOOLBAR_RENAME_ICON_NAME
Path to icon for application tool bar function 'rename'. |
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 |
Constructor Summary | |
---|---|
protected |
SwingToolBar(SwingPresentationFacade presentationFacade)
Constructs a tool bar for a presentationFacade . |
Method Summary | |
---|---|
private void |
createGUI()
Creates the GUI elements of the tool bar. |
void |
focusGained(java.awt.event.FocusEvent e)
Enables file specific tool bar items if an entity in one of the trees of SwingDualTreePanel is selected |
void |
focusLost(java.awt.event.FocusEvent e)
|
void |
valueChanged(javax.swing.event.TreeSelectionEvent e)
Implementation of TreeSelectionListener.valueChanged(TreeSelectionEvent) . |
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, 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, 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, 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, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private SwingPresentationFacade presentationFacade
private LogicFacade logicFacade
private EntityInterface entity
private OpenAction openAction
private ShowPropertiesAction showPropertiesAction
private CutAction cutAction
private CopyAction copyAction
private PasteAction pasteAction
private CutToAction cutToAction
private CopyToAction copyToAction
private RenameAction renameAction
private DeleteAction deleteAction
private static final java.lang.String TOOLBAR_OPEN_ICON_NAME
private static final java.lang.String TOOLBAR_PROPERTIES_ICON_NAME
private static final java.lang.String TOOLBAR_CUT_ICON_NAME
private static final java.lang.String TOOLBAR_COPY_ICON_NAME
private static final java.lang.String TOOLBAR_PASTE_ICON_NAME
private static final java.lang.String TOOLBAR_COPYTO_ICON_NAME
private static final java.lang.String TOOLBAR_CUTTO_ICON_NAME
private static final java.lang.String TOOLBAR_RENAME_ICON_NAME
private static final java.lang.String TOOLBAR_DELETE_ICON_NAME
private static final java.lang.String TOOLBAR_HELP_ICON_NAME
private static final java.lang.String TOOLBAR_CLOSE_ICON_NAME
Constructor Detail |
---|
protected SwingToolBar(SwingPresentationFacade presentationFacade)
presentationFacade
.
presentationFacade
- the presentation facade to useMethod Detail |
---|
private void createGUI()
Initializes the buttons and actions.
public void focusGained(java.awt.event.FocusEvent e)
SwingDualTreePanel
is selected
focusGained
in interface java.awt.event.FocusListener
FocusListener.focusGained(java.awt.event.FocusEvent)
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
FocusListener.focusLost(java.awt.event.FocusEvent)
public void valueChanged(javax.swing.event.TreeSelectionEvent e)
TreeSelectionListener.valueChanged(TreeSelectionEvent)
.
This method is called, when selection of a tree changes.
It makes CutToAction
and CopyToAction
available when nodes in both trees are selected.
valueChanged
in interface javax.swing.event.TreeSelectionListener
tse
- the selection event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |