Package org.apache.batik.apps.svgbrowser
Class DropDownHistoryModel
java.lang.Object
org.apache.batik.apps.svgbrowser.DropDownHistoryModel
- All Implemented Interfaces:
DropDownComponent.ScrollablePopupMenuModel
- Direct Known Subclasses:
DropDownHistoryModel.RedoPopUpMenuModel
,DropDownHistoryModel.UndoPopUpMenuModel
public class DropDownHistoryModel
extends Object
implements DropDownComponent.ScrollablePopupMenuModel
The history scrollable popup menu model. Used for undo / redo drop down
components.
- Version:
- $Id: DropDownHistoryModel.java 1804130 2017-08-04 14:41:11Z ssteiner $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The redo pop up menu model.static class
The undo pop up menu model. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ResourceBundle
The resource bundle.protected HistoryBrowserInterface
The history browser interface.protected ArrayList
Scrollable popup menu items.protected DropDownComponent.ScrollablePopupMenu
The parent scrollable popup menu.private static ResourceManager
The resource manager.private static final String
The resource file name. -
Constructor Summary
ConstructorsConstructorDescriptionDropDownHistoryModel
(DropDownComponent.ScrollablePopupMenu parent, HistoryBrowserInterface historyBrowserInterface) Creates the history pop up menu model. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addItem
(DropDownComponent.ScrollablePopupMenuItem item, String details) Adds the ScrollablePopupMenuItem to the item list and to the parent.protected void
clearAllScrollablePopupMenuItems
(String details) Removes all scrollable popup menu items from the items list and from the parent pop up menu.createItem
(String itemName) Creates the ScrollablePopupMenuItem with the specific name.Gets the footer text.void
Processes the showing of the pop up menu.void
Processes the showing of the pop up menu.void
Processes click on the pop up menu item.protected boolean
removeFirstScrollablePopupMenuItem
(String details) Removes the first scrollable popup menu item from the items list and from the parent pop up menu.protected void
removeItem
(DropDownComponent.ScrollablePopupMenuItem item, String details) Removes the ScrollablePopupMenuItem from the item list and from the parent.protected boolean
removeLastScrollablePopupMenuItem
(String details) Removes the last scrollable popup menu item from the items list and from the parent pop up menu.
-
Field Details
-
RESOURCES
The resource file name.- See Also:
-
bundle
The resource bundle. -
resources
The resource manager. -
items
Scrollable popup menu items. -
historyBrowserInterface
The history browser interface. -
parent
The parent scrollable popup menu.
-
-
Constructor Details
-
DropDownHistoryModel
public DropDownHistoryModel(DropDownComponent.ScrollablePopupMenu parent, HistoryBrowserInterface historyBrowserInterface) Creates the history pop up menu model.- Parameters:
parent
- The parent ScrollablePopupMenuhistoryBrowserInterface
- The historyBrowserInterface. Used to update the parent pop up menu when the HistoryBrowser fires the events
-
-
Method Details
-
createItem
Creates the ScrollablePopupMenuItem with the specific name.- Parameters:
itemName
- the name of the item- Returns:
- the item
-
addItem
Adds the ScrollablePopupMenuItem to the item list and to the parent. Fires the event 'itemsWereAdded' on the parent pop up menu- Parameters:
item
- The item to adddetails
- The details for the 'itemsWereAdded' event
-
removeItem
Removes the ScrollablePopupMenuItem from the item list and from the parent. Fires the event 'itemsWereRemoved' on the parent pop up menu- Parameters:
item
- The item to removedetails
- The details for the 'itemsWereRemoved' event
-
removeLastScrollablePopupMenuItem
Removes the last scrollable popup menu item from the items list and from the parent pop up menu.- Parameters:
details
- The details for the 'itemsWereRemoved' event- Returns:
- True if item was successfully removed
-
removeFirstScrollablePopupMenuItem
Removes the first scrollable popup menu item from the items list and from the parent pop up menu.- Parameters:
details
- The details for the 'itemsWereRemoved' event- Returns:
- True if item was successfully removed
-
clearAllScrollablePopupMenuItems
Removes all scrollable popup menu items from the items list and from the parent pop up menu.- Parameters:
details
- The details for the event
-
processItemClicked
public void processItemClicked()Processes click on the pop up menu item.- Specified by:
processItemClicked
in interfaceDropDownComponent.ScrollablePopupMenuModel
-
processBeforeShowed
public void processBeforeShowed()Description copied from interface:DropDownComponent.ScrollablePopupMenuModel
Processes the showing of the pop up menu. Invoked before showing the pop up menu- Specified by:
processBeforeShowed
in interfaceDropDownComponent.ScrollablePopupMenuModel
-
processAfterShowed
public void processAfterShowed()Description copied from interface:DropDownComponent.ScrollablePopupMenuModel
Processes the showing of the pop up menu. Invoked after showing the pop up menu- Specified by:
processAfterShowed
in interfaceDropDownComponent.ScrollablePopupMenuModel