01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: EditorPaneToolAction.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.gui.ui.actions;
09:
10: import javax.swing.*;
11:
12: import com.uwyn.rife.gui.ui.EditorPane;
13: import com.uwyn.rife.swing.Command;
14: import com.uwyn.rife.swing.JAction;
15:
16: public abstract class EditorPaneToolAction extends JAction {
17: private EditorPane mEditorPane = null;
18:
19: public EditorPaneToolAction(Command command, String name) {
20: this (command, name, null, null, null, null);
21: }
22:
23: public EditorPaneToolAction(Command command, String name,
24: char mnemonic) {
25: this (command, name, new Integer(mnemonic), null, null, null);
26: }
27:
28: public EditorPaneToolAction(Command command, String name,
29: Integer mnemonic) {
30: this (command, name, mnemonic, null, null, null);
31: }
32:
33: public EditorPaneToolAction(Command command, String name,
34: char mnemonic, KeyStroke accelerator) {
35: this (command, name, new Integer(mnemonic), accelerator, null,
36: null);
37: }
38:
39: public EditorPaneToolAction(Command command, String name,
40: Integer mnemonic, KeyStroke accelerator) {
41: this (command, name, mnemonic, accelerator, null, null);
42: }
43:
44: public EditorPaneToolAction(Command command, String name,
45: char mnemonic, KeyStroke accelerator, Icon icon) {
46: this (command, name, new Integer(mnemonic), accelerator, icon,
47: null);
48: }
49:
50: public EditorPaneToolAction(Command command, String name,
51: Integer mnemonic, KeyStroke accelerator, Icon icon) {
52: this (command, name, mnemonic, accelerator, icon, null);
53: }
54:
55: public EditorPaneToolAction(Command command, Icon icon) {
56: this (command, null, null, null, icon, null);
57: }
58:
59: public EditorPaneToolAction(Command command, Icon icon,
60: String shortDescription) {
61: this (command, null, null, null, icon, shortDescription);
62: }
63:
64: public EditorPaneToolAction(Command command, String name,
65: Integer mnemonic, KeyStroke accelerator, Icon icon,
66: String shortDescription) {
67: super (command, name, mnemonic, accelerator, icon,
68: shortDescription);
69: }
70:
71: public void setEditorPane(EditorPane pane) {
72: mEditorPane = pane;
73: }
74:
75: public EditorPane getEditorPane() {
76: return mEditorPane;
77: }
78: }
|