java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JMenuBar
simula.editor.EditorMenues
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,MenuElement
The editor's menues.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JMenuBar
JMenuBar.AccessibleJMenuBar
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Modifier and TypeFieldDescriptionprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu item(package private) ActionListener
the ActionListenerprivate JCheckBox
CheckBoxprivate JCheckBox
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenu
Menuprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenu
Menuprivate JMenu
Menuprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu item(package private) JPopupMenu
The popup menu.(package private) JMenuItem
Refresh item.private JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenu
Menuprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenu
Menuprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemprivate JMenuItem
Menu itemprivate JMenuItem
Popup Menu itemFields inherited from class javax.swing.JComponent
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
accessibleContext, 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
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
Add popup menu items,private JMenuItem
defJMenuItem
(String ident, String toolTipText) Define a Menu item with toolTip.private void
About action(package private) void
Close action.private void
Close current file acation.private void
The debug action(package private) void
Exit action.private void
More actionprivate void
Open file acationprivate void
The run action(package private) void
doSaveCurrentFile
(boolean saveAs) Do save current source file.private void
Utility: Start running current Simula program.private boolean
isTextFile
(String lowName) Test if a file is a text file(package private) void
Maybe save current source file.private int
noSimTypeDialog
(File file) Popup a warning: The file 'name' Does not end with the recomended .simprivate int
overwriteDialog
(File file) Popup a warning: The file: 'name' Already exists - Do you want to overwrite it ?private void
Remove Workspace action.private int
saveDialog
(File file) Save file dialogprivate void
Select ExtLibDir action.private void
Select Java directory action.private void
Select output directory action.private void
Select Workspace action.private void
HelpMenu: setAcceleratorsprivate void
The undo action(package private) void
Update menu items.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, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
fileMenu
Menu -
newFile
Menu item -
openFile
Menu item -
saveFile
Menu item -
saveAs
Menu item -
close
Menu item -
closeAll
Menu item -
exit
Menu item -
editMenu
Menu -
refresh
JMenuItem refreshRefresh item. -
cut
Menu item -
copy
Menu item -
paste
Menu item -
undo
Menu item -
runMenu
Menu -
run
Menu item -
debug
Menu item -
settings
Menu -
autoRefresh
CheckBox -
setWorkSpace
Menu item -
setJavaDir
Menu item -
setOutputDir
Menu item -
setExtLibDir
Menu item -
workSpaces
Menu item -
compilerOption
Menu item -
runtimeOption
Menu item -
helpMenu
Menu -
about
Menu item -
more
Menu item -
popupMenu
JPopupMenu popupMenuThe popup menu. -
newFile2
Popup Menu item -
openFile2
Popup Menu item -
saveFile2
Popup Menu item -
saveAs2
Popup Menu item -
close2
Popup Menu item -
closeAll2
Popup Menu item -
exit2
Popup Menu item -
refresh2
Popup Menu item -
cut2
Popup Menu item -
copy2
Popup Menu item -
paste2
Popup Menu item -
undo2
Popup Menu item -
run2
Popup Menu item -
debug2
Popup Menu item -
autoRefresh2
Popup Menu item -
setWorkSpace2
Popup Menu item -
setJavaDir2
Popup Menu item -
setOutputDir2
Popup Menu item -
setExtLibDir2
Popup Menu item -
workSpaces2
Popup Menu item -
compilerOption2
Popup Menu item -
runtimeOption2
Popup Menu item -
about2
Popup Menu item -
more2
Popup Menu item -
actionListener
ActionListener actionListenerthe ActionListener
-
-
Constructor Details
-
EditorMenues
EditorMenues()Create a new instance of EditorMenues.
-
-
Method Details
-
defJMenuItem
Define a Menu item with toolTip.- Parameters:
ident
- item identifiertoolTipText
- the tooltip text- Returns:
- the resulting MenuItem
-
setAccelerators
private void setAccelerators()HelpMenu: setAccelerators -
addPopupMenuItems
private void addPopupMenuItems()Add popup menu items, -
updateMenuItems
void updateMenuItems()Update menu items. -
doOpenFileAction
private void doOpenFileAction()Open file acation -
isTextFile
Test if a file is a text file- Parameters:
lowName
- the ident after .- Returns:
- true if it is a text file
-
doSaveCurrentFile
void doSaveCurrentFile(boolean saveAs) Do save current source file.- Parameters:
saveAs
- true if a file chooser is wanted
-
doCloseCurrentFileAction
private void doCloseCurrentFileAction()Close current file acation. -
doCloseAllAction
void doCloseAllAction()Close action. -
doExitAction
void doExitAction()Exit action. -
maybeSaveCurrentFile
void maybeSaveCurrentFile()Maybe save current source file.Also used by RunMeny[Run]
-
overwriteDialog
Popup a warning: The file: 'name' Already exists - Do you want to overwrite it ?- Parameters:
file
- the file- Returns:
- an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
-
noSimTypeDialog
Popup a warning: The file 'name' Does not end with the recomended .sim- Parameters:
file
- the file- Returns:
- an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
-
saveDialog
Save file dialog- Parameters:
file
- the file- Returns:
- an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
-
undoAction
private void undoAction()The undo action -
doRunAction
private void doRunAction()The run action -
doDebugAction
private void doDebugAction()The debug action -
doStartRunning
private void doStartRunning()Utility: Start running current Simula program. -
selectWorkspaceAction
private void selectWorkspaceAction()Select Workspace action. -
selectJavaDirAction
private void selectJavaDirAction()Select Java directory action. -
selectOutputDirAction
private void selectOutputDirAction()Select output directory action. -
selectExtLibDirAction
private void selectExtLibDirAction()Select ExtLibDir action. -
removeWorkspacesAction
private void removeWorkspacesAction()Remove Workspace action. -
doAboutAction
private void doAboutAction()About action -
doMoreAction
private void doMoreAction()More action
-