01: /*
02: * ActionDisplay.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.gui.settings;
13:
14: import workbench.gui.renderer.*;
15:
16: /**
17: * A wrapper class to display an Action for the {@link ShortcutEditor}
18: * It simply holds a text and a tooltip
19: *
20: * @see ActionDisplayRenderer
21: * @see ShortcutEditor
22: * @author support@sql-workbench.net
23: */
24: public class ActionDisplay implements Comparable {
25:
26: public String text;
27: public String tooltip;
28:
29: public ActionDisplay(String txt, String tip) {
30: text = txt;
31: tooltip = tip;
32: }
33:
34: public int compareTo(Object other) {
35: ActionDisplay a = (ActionDisplay) other;
36: return text.compareToIgnoreCase(a.text);
37: }
38:
39: public String toString() {
40: return text;
41: }
42: }
|