|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JMenuBar se.entitymanager.presentation.swing.SwingMenuBar
public class SwingMenuBar
Menu bar for presentation with Swing framework.
The class initializes a JMenuBar
.
FocusListener
is implemented
for recognizing the currently selected entity in one
of the trees displayed.
Shares Actions with SwingToolBar
and
SwingPopupMenu
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JMenuBar |
---|
javax.swing.JMenuBar.AccessibleJMenuBar |
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 static java.lang.String |
MENUBAR_CLOSE_ICON_NAME
Path to icon for application tool bar function 'close'. |
private static java.lang.String |
MENUBAR_COPY_ICON_NAME
Path to icon for application tool bar function 'copy'. |
private static java.lang.String |
MENUBAR_COPYTO_ICON_NAME
Path to icon for application tool bar function 'copy to'. |
private static java.lang.String |
MENUBAR_CUT_ICON_NAME
Path to icon for application tool bar function 'cut'. |
private static java.lang.String |
MENUBAR_CUTTO_ICON_NAME
Path to icon for application tool bar function 'cut to'. |
private static java.lang.String |
MENUBAR_DELETE_ICON_NAME
Path to icon for application tool bar function 'delete'. |
private static java.lang.String |
MENUBAR_HELP_ICON_NAME
Path to icon for application tool bar function 'help'. |
private static java.lang.String |
MENUBAR_INFORMATION_ICON_NAME
Path to icon for application tool bar function 'information'. |
private static java.lang.String |
MENUBAR_OPEN_ICON_NAME
Path to icon for application tool bar function 'open'. |
private static java.lang.String |
MENUBAR_PASTE_ICON_NAME
Path to icon for application tool bar function 'paste'. |
private static java.lang.String |
MENUBAR_PROPERTIES_ICON_NAME
Path to icon for application tool bar function 'properties'. |
private static java.lang.String |
MENUBAR_RENAME_ICON_NAME
Path to icon for application tool bar function 'rename'. |
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
|
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
protected |
SwingMenuBar(SwingPresentationFacade presentationFacade)
Constructs a menu bar for a presentationFacade . |
Method Summary | |
---|---|
private void |
createGUI()
Creates the GUI elements of the menu bar. |
void |
focusGained(java.awt.event.FocusEvent e)
Enables file specific menu 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.JMenuBar |
---|
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, 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, 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 MENUBAR_OPEN_ICON_NAME
private static final java.lang.String MENUBAR_PROPERTIES_ICON_NAME
private static final java.lang.String MENUBAR_CUT_ICON_NAME
private static final java.lang.String MENUBAR_COPY_ICON_NAME
private static final java.lang.String MENUBAR_PASTE_ICON_NAME
private static final java.lang.String MENUBAR_COPYTO_ICON_NAME
private static final java.lang.String MENUBAR_CUTTO_ICON_NAME
private static final java.lang.String MENUBAR_RENAME_ICON_NAME
private static final java.lang.String MENUBAR_DELETE_ICON_NAME
private static final java.lang.String MENUBAR_INFORMATION_ICON_NAME
private static final java.lang.String MENUBAR_HELP_ICON_NAME
private static final java.lang.String MENUBAR_CLOSE_ICON_NAME
Constructor Detail |
---|
protected SwingMenuBar(SwingPresentationFacade presentationFacade)
presentationFacade
.
presentationFacade
- the presentation facade to useMethod Detail |
---|
private void createGUI()
Initializes the menues, menu items and the 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 |