Statistics
| Revision:

gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.swing / org.gvsig.tools.swing.api / src / main / java / org / gvsig / tools / swing / api / ToolsSwingManager.java @ 2975

History | View | Annotate | Download (37.4 KB)

1

    
2
package org.gvsig.tools.swing.api;
3

    
4
import java.awt.Color;
5
import java.awt.Dimension;
6
import java.awt.Image;
7
import java.awt.event.ActionListener;
8
import java.awt.image.BufferedImage;
9
import java.io.File;
10
import java.sql.Time;
11
import java.util.Collection;
12
import java.util.List;
13
import java.util.Locale;
14
import java.util.function.Supplier;
15
import javax.swing.AbstractButton;
16
import javax.swing.Action;
17
import javax.swing.ComboBoxModel;
18
import javax.swing.Icon;
19
import javax.swing.JButton;
20
import javax.swing.JComboBox;
21
import javax.swing.JComponent;
22
import javax.swing.JLabel;
23
import javax.swing.JList;
24
import javax.swing.JScrollPane;
25
import javax.swing.JSlider;
26
import javax.swing.JSpinner;
27
import javax.swing.JTabbedPane;
28
import javax.swing.JTable;
29
import javax.swing.JTextArea;
30
import javax.swing.JTree;
31
import javax.swing.table.TableModel;
32
import javax.swing.text.JTextComponent;
33
import javax.swing.tree.TreeModel;
34
import org.gvsig.tools.bookmarksandhistory.Bookmarks;
35
import org.gvsig.tools.bookmarksandhistory.History;
36
import org.gvsig.tools.swing.api.bookmarkshistory.BookmarksController;
37
import org.gvsig.tools.swing.api.bookmarkshistory.ComponentWithHistoryAndBookmarkController;
38
import org.gvsig.tools.swing.api.bookmarkshistory.HistoryController;
39
import org.gvsig.tools.swing.api.bookmarkshistory.TextFieldWithHistoryAndBookmarkController;
40
import org.gvsig.tools.swing.api.pickercontroller.CharsetPickerController;
41
import org.gvsig.tools.swing.api.pickercontroller.ColorPickerController;
42
import org.gvsig.tools.swing.api.pickercontroller.DataTypePickerController;
43
import org.gvsig.tools.swing.api.pickercontroller.DatePickerController;
44
import org.gvsig.tools.swing.api.pickercontroller.FilePickerController;
45
import org.gvsig.tools.swing.api.pickercontroller.FolderPickerController;
46
import org.gvsig.tools.swing.api.pickercontroller.PickerController;
47
import org.gvsig.tools.swing.api.viewer.ViewerFactory;
48
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
49

    
50
public interface ToolsSwingManager {
51
    
52
    public static final String MIMETYPE_TEXT = "text/plain";
53
    public static final String MIMETYPE_HTML = "text/html";
54
    
55
    // http://www.iana.org/assignments/media-types/text/tab-separated-values
56
    public static final String MIMETYPE_TSV = "text/tab-separated-values"; 
57
    
58
    public static final String COLOR_BUTTON_BACKGROUND = "Button.background";
59
    public static final String COLOR_BUTTON_DARKSHADOW = "Button.darkShadow";
60
    public static final String COLOR_BUTTON_DISABLEDTEXT = "Button.disabledText";
61
    public static final String COLOR_BUTTON_FOREGROUND = "Button.foreground";
62
    public static final String COLOR_BUTTON_HIGHLIGHT = "Button.highlight";
63
    public static final String COLOR_BUTTON_LIGHT = "Button.light";
64
    public static final String COLOR_BUTTON_SELECT = "Button.select";
65
    public static final String COLOR_BUTTON_SHADOW = "Button.shadow";
66
    public static final String COLOR_CHECKBOX_BACKGROUND = "CheckBox.background";
67
    public static final String COLOR_CHECKBOX_DISABLEDTEXT = "CheckBox.disabledText";
68
    public static final String COLOR_CHECKBOX_FOREGROUND = "CheckBox.foreground";
69
    public static final String COLOR_CHECKBOX_SELECT = "CheckBox.select";
70
    public static final String COLOR_CHECKBOXMENUITEM_ACCELERATORFOREGROUND = "CheckBoxMenuItem.acceleratorForeground";
71
    public static final String COLOR_CHECKBOXMENUITEM_ACCELERATORSELECTIONFOREGROUND = "CheckBoxMenuItem.acceleratorSelectionForeground";
72
    public static final String COLOR_CHECKBOXMENUITEM_BACKGROUND = "CheckBoxMenuItem.background";
73
    public static final String COLOR_CHECKBOXMENUITEM_DISABLEDBACKGROUND = "CheckBoxMenuItem.disabledBackground";
74
    public static final String COLOR_CHECKBOXMENUITEM_DISABLEDFOREGROUND = "CheckBoxMenuItem.disabledForeground";
75
    public static final String COLOR_CHECKBOXMENUITEM_FOREGROUND = "CheckBoxMenuItem.foreground";
76
    public static final String COLOR_CHECKBOXMENUITEM_SELECTIONBACKGROUND = "CheckBoxMenuItem.selectionBackground";
77
    public static final String COLOR_CHECKBOXMENUITEM_SELECTIONFOREGROUND = "CheckBoxMenuItem.selectionForeground";
78
    public static final String COLOR_COLORCHOOSER_BACKGROUND = "ColorChooser.background";
79
    public static final String COLOR_COLORCHOOSER_FOREGROUND = "ColorChooser.foreground";
80
    public static final String COLOR_COLORCHOOSER_SWATCHESDEFAULTRECENTCOLOR = "ColorChooser.swatchesDefaultRecentColor";
81
    public static final String COLOR_COMBOBOX_BACKGROUND = "ComboBox.background";
82
    public static final String COLOR_COMBOBOX_BUTTONBACKGROUND = "ComboBox.buttonBackground";
83
    public static final String COLOR_COMBOBOX_BUTTONDARKSHADOW = "ComboBox.buttonDarkShadow";
84
    public static final String COLOR_COMBOBOX_BUTTONHIGHLIGHT = "ComboBox.buttonHighlight";
85
    public static final String COLOR_COMBOBOX_BUTTONSHADOW = "ComboBox.buttonShadow";
86
    public static final String COLOR_COMBOBOX_DISABLEDBACKGROUND = "ComboBox.disabledBackground";
87
    public static final String COLOR_COMBOBOX_DISABLEDFOREGROUND = "ComboBox.disabledForeground";
88
    public static final String COLOR_COMBOBOX_FOREGROUND = "ComboBox.foreground";
89
    public static final String COLOR_COMBOBOX_SELECTIONBACKGROUND = "ComboBox.selectionBackground";
90
    public static final String COLOR_COMBOBOX_SELECTIONFOREGROUND = "ComboBox.selectionForeground";
91
    public static final String COLOR_DESKTOP_BACKGROUND = "Desktop.background";
92
    public static final String COLOR_EDITORPANE_BACKGROUND = "EditorPane.background";
93
    public static final String COLOR_EDITORPANE_CARETFOREGROUND = "EditorPane.caretForeground";
94
    public static final String COLOR_EDITORPANE_FOREGROUND = "EditorPane.foreground";
95
    public static final String COLOR_EDITORPANE_INACTIVEBACKGROUND = "EditorPane.inactiveBackground";
96
    public static final String COLOR_EDITORPANE_INACTIVEFOREGROUND = "EditorPane.inactiveForeground";
97
    public static final String COLOR_EDITORPANE_SELECTIONBACKGROUND = "EditorPane.selectionBackground";
98
    public static final String COLOR_EDITORPANE_SELECTIONFOREGROUND = "EditorPane.selectionForeground";
99
    public static final String COLOR_FOCUS_COLOR = "Focus.color";
100
    public static final String COLOR_FORMATTEDTEXTFIELD_BACKGROUND = "FormattedTextField.background";
101
    public static final String COLOR_FORMATTEDTEXTFIELD_CARETFOREGROUND = "FormattedTextField.caretForeground";
102
    public static final String COLOR_FORMATTEDTEXTFIELD_FOREGROUND = "FormattedTextField.foreground";
103
    public static final String COLOR_FORMATTEDTEXTFIELD_INACTIVEBACKGROUND = "FormattedTextField.inactiveBackground";
104
    public static final String COLOR_FORMATTEDTEXTFIELD_INACTIVEFOREGROUND = "FormattedTextField.inactiveForeground";
105
    public static final String COLOR_FORMATTEDTEXTFIELD_SELECTIONBACKGROUND = "FormattedTextField.selectionBackground";
106
    public static final String COLOR_FORMATTEDTEXTFIELD_SELECTIONFOREGROUND = "FormattedTextField.selectionForeground";
107
    public static final String COLOR_INTERNALFRAME_ACTIVETITLEBACKGROUND = "InternalFrame.activeTitleBackground";
108
    public static final String COLOR_INTERNALFRAME_ACTIVETITLEFOREGROUND = "InternalFrame.activeTitleForeground";
109
    public static final String COLOR_INTERNALFRAME_BACKGROUND = "InternalFrame.background";
110
    public static final String COLOR_INTERNALFRAME_BORDERCOLOR = "InternalFrame.borderColor";
111
    public static final String COLOR_INTERNALFRAME_BORDERDARKSHADOW = "InternalFrame.borderDarkShadow";
112
    public static final String COLOR_INTERNALFRAME_BORDERHIGHLIGHT = "InternalFrame.borderHighlight";
113
    public static final String COLOR_INTERNALFRAME_BORDERLIGHT = "InternalFrame.borderLight";
114
    public static final String COLOR_INTERNALFRAME_BORDERSHADOW = "InternalFrame.borderShadow";
115
    public static final String COLOR_INTERNALFRAME_INACTIVETITLEBACKGROUND = "InternalFrame.inactiveTitleBackground";
116
    public static final String COLOR_INTERNALFRAME_INACTIVETITLEFOREGROUND = "InternalFrame.inactiveTitleForeground";
117
    public static final String COLOR_INTERNALFRAME_OPTIONDIALOGBACKGROUND = "InternalFrame.optionDialogBackground";
118
    public static final String COLOR_INTERNALFRAME_PALETTEBACKGROUND = "InternalFrame.paletteBackground";
119
    public static final String COLOR_LABEL_BACKGROUND = "Label.background";
120
    public static final String COLOR_LABEL_DISABLEDFOREGROUND = "Label.disabledForeground";
121
    public static final String COLOR_LABEL_DISABLEDSHADOW = "Label.disabledShadow";
122
    public static final String COLOR_LABEL_FOREGROUND = "Label.foreground";
123
    public static final String COLOR_LIST_BACKGROUND = "List.background";
124
    public static final String COLOR_LIST_FOREGROUND = "List.foreground";
125
    public static final String COLOR_LIST_SELECTIONBACKGROUND = "List.selectionBackground";
126
    public static final String COLOR_LIST_SELECTIONFOREGROUND = "List.selectionForeground";
127
    public static final String COLOR_MENU_ACCELERATORFOREGROUND = "Menu.acceleratorForeground";
128
    public static final String COLOR_MENU_ACCELERATORSELECTIONFOREGROUND = "Menu.acceleratorSelectionForeground";
129
    public static final String COLOR_MENU_BACKGROUND = "Menu.background";
130
    public static final String COLOR_MENU_DISABLEDBACKGROUND = "Menu.disabledBackground";
131
    public static final String COLOR_MENU_DISABLEDFOREGROUND = "Menu.disabledForeground";
132
    public static final String COLOR_MENU_FOREGROUND = "Menu.foreground";
133
    public static final String COLOR_MENU_SELECTIONBACKGROUND = "Menu.selectionBackground";
134
    public static final String COLOR_MENU_SELECTIONFOREGROUND = "Menu.selectionForeground";
135
    public static final String COLOR_MENUBAR_BACKGROUND = "MenuBar.background";
136
    public static final String COLOR_MENUBAR_DISABLEDBACKGROUND = "MenuBar.disabledBackground";
137
    public static final String COLOR_MENUBAR_DISABLEDFOREGROUND = "MenuBar.disabledForeground";
138
    public static final String COLOR_MENUBAR_FOREGROUND = "MenuBar.foreground";
139
    public static final String COLOR_MENUBAR_HIGHLIGHT = "MenuBar.highlight";
140
    public static final String COLOR_MENUBAR_SELECTIONBACKGROUND = "MenuBar.selectionBackground";
141
    public static final String COLOR_MENUBAR_SELECTIONFOREGROUND = "MenuBar.selectionForeground";
142
    public static final String COLOR_MENUBAR_SHADOW = "MenuBar.shadow";
143
    public static final String COLOR_MENUITEM_ACCELERATORFOREGROUND = "MenuItem.acceleratorForeground";
144
    public static final String COLOR_MENUITEM_ACCELERATORSELECTIONFOREGROUND = "MenuItem.acceleratorSelectionForeground";
145
    public static final String COLOR_MENUITEM_BACKGROUND = "MenuItem.background";
146
    public static final String COLOR_MENUITEM_DISABLEDBACKGROUND = "MenuItem.disabledBackground";
147
    public static final String COLOR_MENUITEM_DISABLEDFOREGROUND = "MenuItem.disabledForeground";
148
    public static final String COLOR_MENUITEM_FOREGROUND = "MenuItem.foreground";
149
    public static final String COLOR_MENUITEM_SELECTIONBACKGROUND = "MenuItem.selectionBackground";
150
    public static final String COLOR_MENUITEM_SELECTIONFOREGROUND = "MenuItem.selectionForeground";
151
    public static final String COLOR_OPTIONPANE_BACKGROUND = "OptionPane.background";
152
    public static final String COLOR_OPTIONPANE_FOREGROUND = "OptionPane.foreground";
153
    public static final String COLOR_OPTIONPANE_MESSAGEFOREGROUND = "OptionPane.messageForeground";
154
    public static final String COLOR_PANEL_BACKGROUND = "Panel.background";
155
    public static final String COLOR_PANEL_FOREGROUND = "Panel.foreground";
156
    public static final String COLOR_PASSWORDFIELD_BACKGROUND = "PasswordField.background";
157
    public static final String COLOR_PASSWORDFIELD_CARETFOREGROUND = "PasswordField.caretForeground";
158
    public static final String COLOR_PASSWORDFIELD_FOREGROUND = "PasswordField.foreground";
159
    public static final String COLOR_PASSWORDFIELD_INACTIVEBACKGROUND = "PasswordField.inactiveBackground";
160
    public static final String COLOR_PASSWORDFIELD_INACTIVEFOREGROUND = "PasswordField.inactiveForeground";
161
    public static final String COLOR_PASSWORDFIELD_SELECTIONBACKGROUND = "PasswordField.selectionBackground";
162
    public static final String COLOR_PASSWORDFIELD_SELECTIONFOREGROUND = "PasswordField.selectionForeground";
163
    public static final String COLOR_POPUPMENU_BACKGROUND = "PopupMenu.background";
164
    public static final String COLOR_POPUPMENU_FOREGROUND = "PopupMenu.foreground";
165
    public static final String COLOR_POPUPMENU_SELECTIONBACKGROUND = "PopupMenu.selectionBackground";
166
    public static final String COLOR_POPUPMENU_SELECTIONFOREGROUND = "PopupMenu.selectionForeground";
167
    public static final String COLOR_PROGRESSBAR_BACKGROUND = "ProgressBar.background";
168
    public static final String COLOR_PROGRESSBAR_FOREGROUND = "ProgressBar.foreground";
169
    public static final String COLOR_PROGRESSBAR_SELECTIONBACKGROUND = "ProgressBar.selectionBackground";
170
    public static final String COLOR_PROGRESSBAR_SELECTIONFOREGROUND = "ProgressBar.selectionForeground";
171
    public static final String COLOR_RADIOBUTTON_BACKGROUND = "RadioButton.background";
172
    public static final String COLOR_RADIOBUTTON_DARKSHADOW = "RadioButton.darkShadow";
173
    public static final String COLOR_RADIOBUTTON_DISABLEDTEXT = "RadioButton.disabledText";
174
    public static final String COLOR_RADIOBUTTON_FOREGROUND = "RadioButton.foreground";
175
    public static final String COLOR_RADIOBUTTON_HIGHLIGHT = "RadioButton.highlight";
176
    public static final String COLOR_RADIOBUTTON_LIGHT = "RadioButton.light";
177
    public static final String COLOR_RADIOBUTTON_SELECT = "RadioButton.select";
178
    public static final String COLOR_RADIOBUTTON_SHADOW = "RadioButton.shadow";
179
    public static final String COLOR_RADIOBUTTONMENUITEM_ACCELERATORFOREGROUND = "RadioButtonMenuItem.acceleratorForeground";
180
    public static final String COLOR_RADIOBUTTONMENUITEM_ACCELERATORSELECTIONFOREGROUND = "RadioButtonMenuItem.acceleratorSelectionForeground";
181
    public static final String COLOR_RADIOBUTTONMENUITEM_BACKGROUND = "RadioButtonMenuItem.background";
182
    public static final String COLOR_RADIOBUTTONMENUITEM_DISABLEDBACKGROUND = "RadioButtonMenuItem.disabledBackground";
183
    public static final String COLOR_RADIOBUTTONMENUITEM_DISABLEDFOREGROUND = "RadioButtonMenuItem.disabledForeground";
184
    public static final String COLOR_RADIOBUTTONMENUITEM_FOREGROUND = "RadioButtonMenuItem.foreground";
185
    public static final String COLOR_RADIOBUTTONMENUITEM_SELECTIONBACKGROUND = "RadioButtonMenuItem.selectionBackground";
186
    public static final String COLOR_RADIOBUTTONMENUITEM_SELECTIONFOREGROUND = "RadioButtonMenuItem.selectionForeground";
187
    public static final String COLOR_SCROLLBAR_BACKGROUND = "ScrollBar.background";
188
    public static final String COLOR_SCROLLBAR_FOREGROUND = "ScrollBar.foreground";
189
    public static final String COLOR_SCROLLBAR_THUMB = "ScrollBar.thumb";
190
    public static final String COLOR_SCROLLBAR_THUMBDARKSHADOW = "ScrollBar.thumbDarkShadow";
191
    public static final String COLOR_SCROLLBAR_THUMBHIGHLIGHT = "ScrollBar.thumbHighlight";
192
    public static final String COLOR_SCROLLBAR_THUMBSHADOW = "ScrollBar.thumbShadow";
193
    public static final String COLOR_SCROLLBAR_TRACK = "ScrollBar.track";
194
    public static final String COLOR_SCROLLBAR_TRACKHIGHLIGHT = "ScrollBar.trackHighlight";
195
    public static final String COLOR_SCROLLPANE_BACKGROUND = "ScrollPane.background";
196
    public static final String COLOR_SCROLLPANE_FOREGROUND = "ScrollPane.foreground";
197
    public static final String COLOR_SEPARATOR_FOREGROUND = "Separator.foreground";
198
    public static final String COLOR_SEPARATOR_HIGHLIGHT = "Separator.highlight";
199
    public static final String COLOR_SEPARATOR_SHADOW = "Separator.shadow";
200
    public static final String COLOR_SLIDER_BACKGROUND = "Slider.background";
201
    public static final String COLOR_SLIDER_FOCUS = "Slider.focus";
202
    public static final String COLOR_SLIDER_FOREGROUND = "Slider.foreground";
203
    public static final String COLOR_SLIDER_HIGHLIGHT = "Slider.highlight";
204
    public static final String COLOR_SLIDER_SHADOW = "Slider.shadow";
205
    public static final String COLOR_SLIDER_TICKCOLOR = "Slider.tickColor";
206
    public static final String COLOR_SPINNER_BACKGROUND = "Spinner.background";
207
    public static final String COLOR_SPINNER_FOREGROUND = "Spinner.foreground";
208
    public static final String COLOR_SPLITPANE_BACKGROUND = "SplitPane.background";
209
    public static final String COLOR_SPLITPANE_DARKSHADOW = "SplitPane.darkShadow";
210
    public static final String COLOR_SPLITPANE_HIGHLIGHT = "SplitPane.highlight";
211
    public static final String COLOR_SPLITPANE_SHADOW = "SplitPane.shadow";
212
    public static final String COLOR_SPLITPANEDIVIDER_DRAGGINGCOLOR = "SplitPaneDivider.draggingColor";
213
    public static final String COLOR_TABBEDPANE_BACKGROUND = "TabbedPane.background";
214
    public static final String COLOR_TABBEDPANE_DARKSHADOW = "TabbedPane.darkShadow";
215
    public static final String COLOR_TABBEDPANE_FOCUS = "TabbedPane.focus";
216
    public static final String COLOR_TABBEDPANE_FOREGROUND = "TabbedPane.foreground";
217
    public static final String COLOR_TABBEDPANE_HIGHLIGHT = "TabbedPane.highlight";
218
    public static final String COLOR_TABBEDPANE_LIGHT = "TabbedPane.light";
219
    public static final String COLOR_TABBEDPANE_SHADOW = "TabbedPane.shadow";
220
    public static final String COLOR_TABLE_BACKGROUND = "Table.background";
221
    public static final String COLOR_TABLE_FOCUSCELLBACKGROUND = "Table.focusCellBackground";
222
    public static final String COLOR_TABLE_FOCUSCELLFOREGROUND = "Table.focusCellForeground";
223
    public static final String COLOR_TABLE_FOREGROUND = "Table.foreground";
224
    public static final String COLOR_TABLE_GRIDCOLOR = "Table.gridColor";
225
    public static final String COLOR_TABLE_SELECTIONBACKGROUND = "Table.selectionBackground";
226
    public static final String COLOR_TABLE_SELECTIONFOREGROUND = "Table.selectionForeground";
227
    public static final String COLOR_TABLEHEADER_BACKGROUND = "TableHeader.background";
228
    public static final String COLOR_TABLEHEADER_FOREGROUND = "TableHeader.foreground";
229
    public static final String COLOR_TEXTAREA_BACKGROUND = "TextArea.background";
230
    public static final String COLOR_TEXTAREA_CARETFOREGROUND = "TextArea.caretForeground";
231
    public static final String COLOR_TEXTAREA_FOREGROUND = "TextArea.foreground";
232
    public static final String COLOR_TEXTAREA_INACTIVEBACKGROUND = "TextArea.inactiveBackground";
233
    public static final String COLOR_TEXTAREA_INACTIVEFOREGROUND = "TextArea.inactiveForeground";
234
    public static final String COLOR_TEXTAREA_SELECTIONBACKGROUND = "TextArea.selectionBackground";
235
    public static final String COLOR_TEXTAREA_SELECTIONFOREGROUND = "TextArea.selectionForeground";
236
    public static final String COLOR_TEXTCOMPONENT_SELECTIONBACKGROUNDINACTIVE = "TextComponent.selectionBackgroundInactive";
237
    public static final String COLOR_TEXTFIELD_BACKGROUND = "TextField.background";
238
    public static final String COLOR_TEXTFIELD_CARETFOREGROUND = "TextField.caretForeground";
239
    public static final String COLOR_TEXTFIELD_DARKSHADOW = "TextField.darkShadow";
240
    public static final String COLOR_TEXTFIELD_FOREGROUND = "TextField.foreground";
241
    public static final String COLOR_TEXTFIELD_HIGHLIGHT = "TextField.highlight";
242
    public static final String COLOR_TEXTFIELD_INACTIVEBACKGROUND = "TextField.inactiveBackground";
243
    public static final String COLOR_TEXTFIELD_INACTIVEFOREGROUND = "TextField.inactiveForeground";
244
    public static final String COLOR_TEXTFIELD_LIGHT = "TextField.light";
245
    public static final String COLOR_TEXTFIELD_SELECTIONBACKGROUND = "TextField.selectionBackground";
246
    public static final String COLOR_TEXTFIELD_SELECTIONFOREGROUND = "TextField.selectionForeground";
247
    public static final String COLOR_TEXTFIELD_SHADOW = "TextField.shadow";
248
    public static final String COLOR_TEXTPANE_BACKGROUND = "TextPane.background";
249
    public static final String COLOR_TEXTPANE_CARETFOREGROUND = "TextPane.caretForeground";
250
    public static final String COLOR_TEXTPANE_FOREGROUND = "TextPane.foreground";
251
    public static final String COLOR_TEXTPANE_INACTIVEBACKGROUND = "TextPane.inactiveBackground";
252
    public static final String COLOR_TEXTPANE_INACTIVEFOREGROUND = "TextPane.inactiveForeground";
253
    public static final String COLOR_TEXTPANE_SELECTIONBACKGROUND = "TextPane.selectionBackground";
254
    public static final String COLOR_TEXTPANE_SELECTIONFOREGROUND = "TextPane.selectionForeground";
255
    public static final String COLOR_TITLEDBORDER_TITLECOLOR = "TitledBorder.titleColor";
256
    public static final String COLOR_TOGGLEBUTTON_BACKGROUND = "ToggleButton.background";
257
    public static final String COLOR_TOGGLEBUTTON_DARKSHADOW = "ToggleButton.darkShadow";
258
    public static final String COLOR_TOGGLEBUTTON_DISABLEDTEXT = "ToggleButton.disabledText";
259
    public static final String COLOR_TOGGLEBUTTON_FOREGROUND = "ToggleButton.foreground";
260
    public static final String COLOR_TOGGLEBUTTON_HIGHLIGHT = "ToggleButton.highlight";
261
    public static final String COLOR_TOGGLEBUTTON_LIGHT = "ToggleButton.light";
262
    public static final String COLOR_TOGGLEBUTTON_SHADOW = "ToggleButton.shadow";
263
    public static final String COLOR_TOOLBAR_BACKGROUND = "ToolBar.background";
264
    public static final String COLOR_TOOLBAR_DARKSHADOW = "ToolBar.darkShadow";
265
    public static final String COLOR_TOOLBAR_DOCKINGBACKGROUND = "ToolBar.dockingBackground";
266
    public static final String COLOR_TOOLBAR_DOCKINGFOREGROUND = "ToolBar.dockingForeground";
267
    public static final String COLOR_TOOLBAR_FLOATINGBACKGROUND = "ToolBar.floatingBackground";
268
    public static final String COLOR_TOOLBAR_FLOATINGFOREGROUND = "ToolBar.floatingForeground";
269
    public static final String COLOR_TOOLBAR_FOREGROUND = "ToolBar.foreground";
270
    public static final String COLOR_TOOLBAR_HIGHLIGHT = "ToolBar.highlight";
271
    public static final String COLOR_TOOLBAR_LIGHT = "ToolBar.light";
272
    public static final String COLOR_TOOLBAR_SHADOW = "ToolBar.shadow";
273
    public static final String COLOR_TOOLTIP_BACKGROUND = "ToolTip.background";
274
    public static final String COLOR_TOOLTIP_FOREGROUND = "ToolTip.foreground";
275
    public static final String COLOR_TREE_BACKGROUND = "Tree.background";
276
    public static final String COLOR_TREE_FOREGROUND = "Tree.foreground";
277
    public static final String COLOR_TREE_HASH = "Tree.hash";
278
    public static final String COLOR_TREE_LINE = "Tree.line";
279
    public static final String COLOR_TREE_SELECTIONBACKGROUND = "Tree.selectionBackground";
280
    public static final String COLOR_TREE_SELECTIONBORDERCOLOR = "Tree.selectionBorderColor";
281
    public static final String COLOR_TREE_SELECTIONFOREGROUND = "Tree.selectionForeground";
282
    public static final String COLOR_TREE_TEXTBACKGROUND = "Tree.textBackground";
283
    public static final String COLOR_TREE_TEXTFOREGROUND = "Tree.textForeground";
284
    public static final String COLOR_VIEWPORT_BACKGROUND = "Viewport.background";
285
    public static final String COLOR_VIEWPORT_FOREGROUND = "Viewport.foreground";
286
    public static final String COLOR_ACTIVECAPTION = "activeCaption";
287
    public static final String COLOR_ACTIVECAPTIONBORDER = "activeCaptionBorder";
288
    public static final String COLOR_ACTIVECAPTIONTEXT = "activeCaptionText";
289
    public static final String COLOR_CONTROL = "control";
290
    public static final String COLOR_CONTROLDKSHADOW = "controlDkShadow";
291
    public static final String COLOR_CONTROLHIGHLIGHT = "controlHighlight";
292
    public static final String COLOR_CONTROLLTHIGHLIGHT = "controlLtHighlight";
293
    public static final String COLOR_CONTROLSHADOW = "controlShadow";
294
    public static final String COLOR_CONTROLTEXT = "controlText";
295
    public static final String COLOR_DESKTOP = "desktop";
296
    public static final String COLOR_INACTIVECAPTION = "inactiveCaption";
297
    public static final String COLOR_INACTIVECAPTIONBORDER = "inactiveCaptionBorder";
298
    public static final String COLOR_INACTIVECAPTIONTEXT = "inactiveCaptionText";
299
    public static final String COLOR_INFO = "info";
300
    public static final String COLOR_INFOTEXT = "infoText";
301
    public static final String COLOR_MENU = "menu";
302
    public static final String COLOR_MENUTEXT = "menuText";
303
    public static final String COLOR_SCROLLBAR = "scrollbar";
304
    public static final String COLOR_TEXT = "text";
305
    public static final String COLOR_TEXTHIGHLIGHT = "textHighlight";
306
    public static final String COLOR_TEXTHIGHLIGHTTEXT = "textHighlightText";
307
    public static final String COLOR_TEXTINACTIVETEXT = "textInactiveText";
308
    public static final String COLOR_TEXTTEXT = "textText";
309
    public static final String COLOR_WINDOW = "window";
310
    public static final String COLOR_WINDOWBORDER = "windowBorder";
311
    public static final String COLOR_WINDOWTEXT = "windowText";
312

    
313
    public void setWarningBackgroundColor(Color warningBackgroundColor);
314
    
315
    public Color getWarningBackgroundColor();
316
    
317
    public ActionListenerSupport createActionListenerSupport();
318

    
319
    public JListWithCheckbox createJListWithCheckbox(JList wrappedList);
320

    
321
    public void setTreeModel(JComboBox comboBox, TreeModel aTreeModel);
322

    
323
    public ComboBoxModel createComboBoxModel(TreeModel treeModel);
324

    
325
    /**
326
     * @param txtLabel
327
     * @param btnShowDialog
328
     * @param sldAlpha
329
     * @param allowNull
330
     * @return 
331
     * @deprecated use createColorPickerController
332
     */
333
    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull);
334
    /**
335
     * @param txtLabel
336
     * @param btnShowDialog
337
     * @return 
338
     * @deprecated use createColorPickerController
339
     */
340
    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog);
341
    /**
342
     * @param txtLabel
343
     * @param btnShowDialog
344
     * @param sldAlpha
345
     * @return 
346
     * @deprecated use createColorPickerController
347
     */
348
    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha);
349
    
350
    
351
    /**
352
     * Create a buffered Image of the given size and type.
353
     * In this context, buffered image means editable image (admits setRGB etc)
354
     * If the size is bigger of max physical size of buffered image, creates a file mapped buffered Image.
355
     *
356
     * @param w width in pixels of the requested image
357
     * @param h height in pixels of the requested image
358
     * @param type image type (refers to bands, etc. see {@link Image}
359
     * @return a buffered (editable) image of the desired size and type
360
     * @see setMaxPhysicalSizeOfBufferedImage
361
     * @see getMaxPhysicalSizeOfBufferedImage
362
     *
363
     */
364
    public BufferedImage createBufferedImage(int w, int h, int type);
365

    
366

    
367
    /**
368
     * Create a file mapped buffered Image of the given size and type.
369
     * In this context, buffered image means editable image (admits setRGB etc)
370
     *
371
     * @param w width in pixels of the requested image
372
     * @param h height in pixels of the requested image
373
     * @param type image type (refers to bands, etc. see {@link Image}
374
     * @return a buffered (editable) image of the desired size and type
375
     */
376
    public BufferedImage createVirtualBufferedImage(int w, int h, int type);
377

    
378
    public BufferedImage copyBufferedImage(BufferedImage img);
379

    
380
    /**
381
     * Sets the max physical size of buffered image creates by this manager.
382
     *
383
     * @param dimension
384
     * @see createBufferedImage
385
     * @see createVirtualBufferedImage
386
     */
387
    public void setMaxPhysicalSizeOfBufferedImage(Dimension dimension);
388

    
389
    /**
390
     * Return the max physical size of buffered image creates by this manager.
391
     *
392
     * @return
393
     * @see createBufferedImage
394
     * @see createVirtualBufferedImage
395
     */
396
    public Dimension getMaxPhysicalSizeOfBufferedImage();
397

    
398
    /**
399
     * Alpha blending is the process of combining a translucent foreground color with a background 
400
     * 
401
     * https://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending
402
     * 
403
     * @param bgColor
404
     * @param fgColor
405
     * @return 
406
     */    
407
    public Color alphaBlendingWithOpaqueBackground(Color bgColor, Color fgColor);
408
    
409
    public Color opaqueColor(Color src);
410

    
411
    public void translate(JComponent component);
412
    
413
    public void translate(AbstractButton component);
414

    
415
    public void translate(JLabel component);
416
    
417
    public void translate(JTabbedPane component);
418

    
419
    public void translate(JComponent component, boolean wrap);
420
    
421
    public void translate(AbstractButton component, boolean wrap);
422

    
423
    public void translate(JLabel component, boolean wrap);
424
    
425
    public void translate(JTabbedPane component, boolean wrap);
426

    
427
    public void setDefaultPopupMenu(final JTextComponent component);
428
    
429
    public void setDefaultPopupMenu(final JComboBox component);
430

    
431
    public void setDefaultPopupMenu(final JTextComponent component, String title);    
432
    
433
    public void setDefaultPopupMenu(final JTextComponent component, String title, boolean textEditor);
434

    
435
    public void setDefaultPopupMenu(final JSpinner component, String title, boolean textEditor);
436

    
437
    public void setDefaultPopupMenu(final JComboBox component, String title);    
438

    
439
    public ChangeListenerHelper createChangeListenerHelper();
440
    
441
    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull);
442
    
443
    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog);
444
    
445
    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha);
446
    
447
    public DatePickerController createDatePickerController(JTextComponent txtDate, JButton btnDate);
448

    
449
    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon);
450

    
451
    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile);
452

    
453
    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle);
454

    
455
    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon);
456

    
457
    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile);
458

    
459
    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle);
460

    
461
    public PickerController<byte[]> createByteArrayPickerController(JTextComponent txtText, JButton btnUpload, JButton btnDownload, JButton btnEditAsText, String fileChooserID, File initialPath);
462

    
463
    public PickerController<byte[]> createByteArrayPickerController(JTextComponent txtText, JButton btnUpload, JButton btnDownload, String fileChooserID, File initialPath);
464

    
465
    public PickerController<byte[]> createByteArrayPickerController(JTextComponent txtText, JButton btnUpload, JButton btnDownload);
466

    
467
    public CharsetPickerController createCharsetPickerController(JLabel lblCharset, JComboBox cboCharset);
468
    
469
    public CharsetPickerController createCharsetPickerController(JComboBox cboCharset);
470
    
471
    public PickerController<Locale> createLocalePickerController(JComboBox cboLocale);
472

    
473
    public void removeBorder(JComponent component);
474
    
475
    public JScrollPane getJScrollPane(JComponent component);
476
    
477
    public void addClearButton(final JTextComponent text,  final ActionListener action);
478

    
479
    public void addClearButton(final JTextComponent text);
480

    
481
    public void addClearButton(JComboBox combo);
482
    
483
    public void addClearButton(JComboBox combo, final ActionListener action);
484
    
485
    public boolean hasClearButton(final JComboBox combo);
486
    
487
    public boolean hasClearButton(final JTextComponent text);
488
    
489
    public void removeClearButton(final JComboBox combo);
490
    
491
    public void removeClearButton(final JTextComponent text);
492
    
493
    public SimpleImage createSimpleImage();
494
    
495
    public SimpleImage createSimpleImage(Object source);
496
    
497
    public DropDown createDropDown(JComboBox combo);
498
    
499
    public DropDown createDropDown(JLabel label);
500

    
501
    public DropDown createDropDown(AbstractButton button);
502

    
503
    public DropDown createDropDown(JComponent component);
504
    
505
    /**
506
     * Contructor for creating a CompoundIcon where the icons are
507
     * layed out HORIZONTAL, the gap is 0 and the X/Y alignments will
508
     * default to CENTER.
509
     *
510
     * @param icons the Icons to be painted as part of the CompoundIcon
511
     * 
512
     * @return the CompoundIcon
513
     */
514
    public CompoundIcon createCompoundIcon(Icon... icons);
515

    
516
    /**
517
     * Contructor for creating a CompoundIcon where the gap is 0 and
518
     * the X/Y alignments will default to CENTER.
519
     *
520
     * @param orientation the orientation used to lay out the icons for painting. 
521
     * Must be one of SwingConstants.HORIZONTAL, SwingConstants.VERTICAL or STACKED.
522
     * @param icons the Icons to be painted as part of the CompoundIcon
523
     * 
524
     * @return the CompoundIcon
525
     */
526
    public CompoundIcon createCompoundIcon(int orientation, Icon... icons);
527

    
528
    /**
529
     * Convenience contructor for creating a CompoundIcon where the X/Y
530
     * alignments will default to CENTER.
531
     *
532
     * @param orientation the orientation used to lay out the icons for painting. 
533
     * Must be one of SwingConstants.HORIZONTAL, SwingConstants.VERTICAL or STACKED.
534
     * @param gap the gap between the icons
535
     * @param icons the Icons to be painted as part of the CompoundIcon
536
     * 
537
     * @return the CompoundIcon
538
     */
539
    public CompoundIcon createCompoundIcon(int orientation, int gap, Icon... icons);
540

    
541
    /**
542
     * Create a CompoundIcon specifying all the properties.
543
     *
544
     * @param orientation the orientation used to lay out the icons for painting. 
545
     * Must be one of SwingConstants.HORIZONTAL, SwingConstants.VERTICAL or STACKED.
546
     * @param gap the gap between the icons
547
     * @param alignmentX the X alignment of the icons. Common values are SwingConstants.LEFT,
548
     * SwingConstants.CENTER, SwingConstants.RIGHT.
549
     * @param alignmentY the Y alignment of the icons. Common values are SwingConstants.TOP,
550
     * SwingConstants.CENTER, SwingConstants.BOTTOM.
551
     * @param icons the Icons to be painted as part of the CompoundIcon
552
     * 
553
     * @return the CompoundIcon
554
     */
555
    public CompoundIcon createCompoundIcon(int orientation, int gap, int alignmentX, int alignmentY, Icon... icons);
556
    
557
    public BookmarksController createBookmarksController(Bookmarks bookmarks, JButton button);
558
    
559
    public HistoryController createHistoryController(History history, JButton button);
560

    
561
    public FilteredTableModel createFilteredTableModel(TableModel model, int filterColumn);
562

    
563
    public TextFieldWithHistoryAndBookmarkController createTextFieldWithHistoryAndBookmarkController(String name, JTextComponent text, JButton btnApply, JButton btnHistory, JButton btnBookmarks);
564

    
565
    public ComponentWithHistoryAndBookmarkController createComboBoxWithHistoryAndBookmarkController(String name, JComboBox combo);
566
    
567
    public FilteredListModel createFilteredListModel();
568
    
569
    public FilteredTreeModel createFilteredTreeModel(JTree tree);
570
    
571
    public FilteredListController createFilteredListController(JList list, JTextComponent text, JButton button);
572
    
573
    public FilteredTreeController createFilteredTreeController(JTree list, JTextComponent text, JButton button);
574
    
575
    public JLabel createTitledSeparator(String title, int height, int titlePosition, int titleJustification);
576

    
577
    public JLabel createTitledSeparator(String title);
578

    
579
    public JWebBrowser createJWebBrowser();
580
    
581
    public void registerJWebBrowserFactory(JWebBrowserFactory factory);
582
    
583
    public DataTypePickerController createDataTypePickerController(JComboBox cboDataType, JButton btnDataType, boolean allowNull);
584
    
585
    public TableColumnAdjuster createTableColumnAdjuster(JTable table);
586
    
587
    public MessageBarController createMessageBarController(JLabel txtLabel, int timeDuration);
588
    
589
    public String showZoomDialog(java.awt.Component parent, String title, String text, boolean editable);
590

    
591
    public String showZoomDialog(java.awt.Component parent, String title, String text, boolean editable, WindowManager.MODE mode);
592

    
593
    public String showZoomDialog(java.awt.Component parent, String title, String text, boolean editable, WindowManager.MODE mode, List<Action> customActions);
594
    
595
    public DropDown createDropDownIcon(JLabel lblNull);
596
    
597
    public void putInClipboard(String data);
598
    
599
    public void putInClipboard(String data, String mimetype);
600
    
601
    public String getFromClipboard();
602

    
603
    public boolean isClipboardEmpty();
604
    
605
    public void addClipboardObserver(java.util.Observer observer);
606
    
607
    public void deleteClipboardObserver(java.util.Observer observer);
608
    
609
    public JSpinner spinnerOfNumber(JSpinner spinner, Number value);
610
    
611
    public JSpinner spinnerOfNumber(JSpinner spinner, Class valueClass);
612
    
613
    public JSpinner spinnerOfIntegers(JSpinner spinner, Integer value, int minimum, int maximum, int stepSize);
614
    
615
    public JSpinner spinnerOfTime(JSpinner spinner);
616
    
617
    public JSpinner spinnerOfTime(JSpinner spinner, Time value);
618

    
619
    public java.awt.Window findWindow(java.awt.Component c);
620
    
621
    public java.awt.Container findRootContainer(java.awt.Component c);
622
    
623
    public boolean isModalDialogShowing();
624
    
625
    public void registerViewer(ViewerFactory factory);
626
    
627
    public ViewerFactory getViewerFactory(String name);
628
    
629
    public Collection<ViewerFactory> getViewerFactories();
630
    
631
    public void addLineNumbers(JTextComponent text, JScrollPane scroll);
632
    
633
    public TextComponentUndoRedoHelper addUndoRedoSupport(JTextComponent text);
634

    
635
    public SearchToolbar addSearchToolbar(JTextComponent text);
636

    
637
    public void registerDesktopPanelSizeSupplier(Supplier<Dimension> supplier);
638
    
639
    public Dimension getDesktopPanelSize();
640
}