01: /*
02: * Copyright 2001-2006 C:1 Financial Services GmbH
03: *
04: * This software is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License Version 2.1, as published by the Free Software Foundation.
07: *
08: * This software is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11: * Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public
14: * License along with this library; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16: */
17:
18: package de.finix.contelligent.client.gui.explorer;
19:
20: import java.awt.event.ActionEvent;
21: import java.util.logging.Logger;
22:
23: import javax.swing.AbstractAction;
24:
25: import de.finix.contelligent.client.gui.ContelligentAction;
26: import de.finix.contelligent.client.util.bookmark.BookmarkFolder;
27:
28: public class BookmarkFolderAction extends AbstractAction implements
29: ContelligentAction {
30:
31: static Logger log = Logger.getLogger(GoToBookmarkAction.class
32: .getName());
33:
34: private final ExplorerEditor editor;
35:
36: /**
37: * @param editor
38: * @param menuePosition
39: * @param bookmarkFolder
40: * @param menuTarget
41: * @param menuParentAction
42: */
43: public BookmarkFolderAction(ExplorerEditor editor,
44: int menuePosition, BookmarkFolder bookmarkFolder,
45: Integer menuTarget, BookmarkFolderAction menuParentAction) {
46:
47: // TODO !!! vllt lieber nur den namen übergeben?
48:
49: super (bookmarkFolder.getName());
50: //super(bookmarkFolder.getName(), Resources.defaultViewIcon);
51: this .editor = editor;
52:
53: putValue(TYPE, SUBMENU_ACTION);
54: putValue(ACTION_TYPE, BOOKMARK_ACTION);
55: putValue(ACTION_GROUP, BOOKMARKS_SHOW_BOOKMARKS_GROUP);
56: putValue(ACTION_POS, new Integer(menuePosition));
57: putValue(BUTTON_TARGET, NO_BUTTON);
58: // to build a hierarchical structure, we need
59: putValue(MENU_TARGET, menuTarget); // menuTarget can be MENU or SUBMENU
60: if (menuTarget.equals(SUBMENU) && menuParentAction != null) {
61: putValue(MENU_PARENT_ACTION, menuParentAction); // the parent BookmarkFolderAction below which this action will appear.
62: }
63: }
64:
65: /* (non-Javadoc)
66: * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
67: */
68: public void actionPerformed(ActionEvent e) {
69: }
70: }
|