|
||||||||||
| 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.AbstractButton
javax.swing.JMenuItem
javax.swing.JMenu
csheets.ui.ReopenMenu
public class ReopenMenu
A menu for displaying recently opened files, and allowing the user to reopen them.
| Nested Class Summary | |
|---|---|
protected class |
ReopenMenu.RemoveAllAction
An action for removing all items from the menu. |
protected class |
ReopenMenu.RemoveObsoleteAction
An action for removing the obsolete items from the menu. |
protected static class |
ReopenMenu.ReopenAction
An action for reopening a spreadsheet. |
| Nested classes/interfaces inherited from class javax.swing.JMenu |
|---|
JMenu.AccessibleJMenu, JMenu.WinListener |
| Nested classes/interfaces inherited from class javax.swing.JMenuItem |
|---|
JMenuItem.AccessibleJMenuItem |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JMenu |
|---|
popupListener |
| 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 | |
|---|---|
ReopenMenu(CleanSheets app,
UIController uiController)
Creates a reopen menu, and creates items using the given properties (if available). |
|
| Method Summary | |
|---|---|
JMenuItem |
addReopenItem(File file)
Adds an item for this file to the top of the reopen menu. |
void |
removeAll()
Removes all file items from the reopen menu, |
void |
removeObsolete()
Removes all obsolete file items from the reopen menu, i.e. the items referring to files that don't exist. |
void |
setMaximumItems(int items)
Sets the maximum number of reopen items in the menu. |
void |
workbookCreated(SpreadsheetAppEvent event)
Invoked by the spreadsheet application to indicate that a new workbook has been created. |
void |
workbookLoaded(SpreadsheetAppEvent event)
Invoked by the spreadsheet application to indicate that a workbook has been loaded from the given file. |
void |
workbookSaved(SpreadsheetAppEvent event)
Invoked by the spreadsheet application to indicate that a workbook was saved to the given file. |
void |
workbookUnloaded(SpreadsheetAppEvent event)
Invoked by the spreadsheet application to indicate that a workbook has been unloaded (closed). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.MenuElement |
|---|
processKeyEvent, processMouseEvent |
| Constructor Detail |
|---|
public ReopenMenu(CleanSheets app,
UIController uiController)
app - the CleanSheets applicationuiController - the user interface controller| Method Detail |
|---|
public JMenuItem addReopenItem(File file)
file - the filename of the file
public void removeObsolete()
public void removeAll()
removeAll in class JMenupublic void setMaximumItems(int items)
items - the number of reopen items in the menupublic void workbookCreated(SpreadsheetAppEvent event)
SpreadsheetAppListener
workbookCreated in interface SpreadsheetAppListenerevent - the spreadsheet application event that occuredpublic void workbookLoaded(SpreadsheetAppEvent event)
SpreadsheetAppListener
workbookLoaded in interface SpreadsheetAppListenerevent - the spreadsheet application event that occuredpublic void workbookUnloaded(SpreadsheetAppEvent event)
SpreadsheetAppListener
workbookUnloaded in interface SpreadsheetAppListenerevent - the spreadsheet application event that occuredpublic void workbookSaved(SpreadsheetAppEvent event)
SpreadsheetAppListener
workbookSaved in interface SpreadsheetAppListenerevent - the spreadsheet application event that occured
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||