|
||||||||||
| 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.JMenuBar
dasher.applet.JDasherMenuBar
public class JDasherMenuBar
The menu bar is entirely dumb. Its purpose is to do the donkey work of setting up the menus; it then simply listens for events and calls the appropriate methods belonging to its host. It is the responsibility of the host to ensure it is properly set up to begin with, including setting which options are selected at application startup.
Members and functions not documented; largely everything means what its name suggests. If new menu items are desired, one should create a new local variable referencing the new menu items, and add lines to the Constructor which create the new menus.
| 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 javax.swing.JMenu |
control
|
private javax.swing.JCheckBoxMenuItem |
control_mousestart
|
private javax.swing.JCheckBoxMenuItem |
control_spacestart
|
private javax.swing.JMenu |
control_speed
|
private javax.swing.JCheckBoxMenuItem |
control_speed_auto
|
private javax.swing.JRadioButtonMenuItem |
control_speed_fast
|
private javax.swing.JRadioButtonMenuItem |
control_speed_fastest
|
private javax.swing.JRadioButtonMenuItem |
control_speed_medium
|
private javax.swing.JRadioButtonMenuItem |
control_speed_slow
|
private javax.swing.JMenu |
control_style
|
private javax.swing.JRadioButtonMenuItem |
control_style_click
|
private javax.swing.JRadioButtonMenuItem |
control_style_normal
|
private javax.swing.JMenu |
edit
|
private javax.swing.JMenuItem |
edit_copy
|
private javax.swing.JMenuItem |
edit_cut
|
private javax.swing.JMenuItem |
edit_paste
|
private javax.swing.JMenu |
file
|
private javax.swing.JMenuItem |
file_exit
|
private javax.swing.JMenuItem |
file_new
|
private javax.swing.JMenu |
help
|
private javax.swing.JMenuItem |
help_about
|
private JDasherMenuBarListener |
m_Host
|
private javax.swing.JMenu |
options
|
private javax.swing.JMenu |
options_alphabet
|
private javax.swing.ButtonGroup |
options_alphabet_group
|
private javax.swing.JMenu |
options_colours
|
private javax.swing.ButtonGroup |
options_colours_group
|
private javax.swing.JMenuItem |
options_editfont
|
private javax.swing.JMenu |
options_fontsize
|
private javax.swing.JRadioButtonMenuItem |
options_fontsize_large
|
private javax.swing.JRadioButtonMenuItem |
options_fontsize_medium
|
private javax.swing.JRadioButtonMenuItem |
options_fontsize_small
|
private javax.swing.JCheckBoxMenuItem |
options_mouseline
|
private javax.swing.JMenu |
prediction
|
private javax.swing.JMenu |
prediction_langmodel
|
private javax.swing.JCheckBoxMenuItem |
prediction_langmodel_learn
|
private javax.swing.JRadioButtonMenuItem |
prediction_langmodel_net
|
private javax.swing.JRadioButtonMenuItem |
prediction_langmodel_ppm
|
| 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 | |
|---|---|
JDasherMenuBar(JDasherMenuBarListener listener)
Creates a JDasherMenuBar which signals a given listener when the user selects menu items. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
flavorsChanged(java.awt.datatransfer.FlavorEvent arg0)
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
void |
setAlphabets(java.util.ArrayList<java.lang.String> alphs,
java.lang.String current)
|
void |
setColours(java.util.ArrayList<java.lang.String> colours,
java.lang.String current)
|
void |
setInputFilter(java.lang.String filter)
|
void |
setLangModelLearns(boolean enabled)
|
void |
setMouseLine(boolean enabled)
|
void |
setPasteEnabled(boolean enabled)
|
void |
setSelectedColour(java.lang.String colour)
|
void |
setSelectedFontSize(int size)
|
void |
setSelectedLM(int LMID)
|
void |
setSpeedAbs()
|
void |
setSpeedAuto(boolean enabled)
|
void |
setStartMouse(boolean enabled)
|
void |
setStartSpace(boolean enabled)
|
| 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 javax.swing.JMenu file
private javax.swing.JMenu edit
private javax.swing.JMenu options
private javax.swing.JMenu control
private javax.swing.JMenu prediction
private javax.swing.JMenu help
private javax.swing.JMenuItem file_new
private javax.swing.JMenuItem file_exit
private javax.swing.JMenuItem edit_cut
private javax.swing.JMenuItem edit_copy
private javax.swing.JMenuItem edit_paste
private javax.swing.JMenu control_speed
private javax.swing.JRadioButtonMenuItem control_speed_slow
private javax.swing.JRadioButtonMenuItem control_speed_medium
private javax.swing.JRadioButtonMenuItem control_speed_fast
private javax.swing.JRadioButtonMenuItem control_speed_fastest
private javax.swing.JCheckBoxMenuItem control_speed_auto
private javax.swing.JMenu control_style
private javax.swing.JRadioButtonMenuItem control_style_normal
private javax.swing.JRadioButtonMenuItem control_style_click
private javax.swing.JCheckBoxMenuItem control_mousestart
private javax.swing.JCheckBoxMenuItem control_spacestart
private javax.swing.JMenuItem options_editfont
private javax.swing.JMenu options_fontsize
private javax.swing.JRadioButtonMenuItem options_fontsize_small
private javax.swing.JRadioButtonMenuItem options_fontsize_medium
private javax.swing.JRadioButtonMenuItem options_fontsize_large
private javax.swing.JCheckBoxMenuItem options_mouseline
private javax.swing.JMenu options_alphabet
private javax.swing.JMenu options_colours
private javax.swing.JMenu prediction_langmodel
private javax.swing.JRadioButtonMenuItem prediction_langmodel_ppm
private javax.swing.JRadioButtonMenuItem prediction_langmodel_net
private javax.swing.JCheckBoxMenuItem prediction_langmodel_learn
private javax.swing.JMenuItem help_about
private javax.swing.ButtonGroup options_colours_group
private javax.swing.ButtonGroup options_alphabet_group
private JDasherMenuBarListener m_Host
| Constructor Detail |
|---|
public JDasherMenuBar(JDasherMenuBarListener listener)
listener - Listener whose methods are to be
invoked upon user commands| Method Detail |
|---|
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void setSelectedFontSize(int size)
public void setAlphabets(java.util.ArrayList<java.lang.String> alphs,
java.lang.String current)
public void setColours(java.util.ArrayList<java.lang.String> colours,
java.lang.String current)
public void setInputFilter(java.lang.String filter)
public void setMouseLine(boolean enabled)
public void setStartMouse(boolean enabled)
public void setStartSpace(boolean enabled)
public void setSelectedLM(int LMID)
public void setPasteEnabled(boolean enabled)
public void setSpeedAbs()
public void setSpeedAuto(boolean enabled)
public void setLangModelLearns(boolean enabled)
public void setSelectedColour(java.lang.String colour)
public void flavorsChanged(java.awt.datatransfer.FlavorEvent arg0)
flavorsChanged in interface java.awt.datatransfer.FlavorListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||