1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005-2009 Grigor Iliev <grigor@grigoriliev.com> |
* Copyright (C) 2005-2011 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
50 |
import javax.swing.JPanel; |
import javax.swing.JPanel; |
51 |
import javax.swing.JTabbedPane; |
import javax.swing.JTabbedPane; |
52 |
|
|
53 |
import net.sf.juife.EnhancedDialog; |
import net.sf.juife.swing.EnhancedDialog; |
54 |
import net.sf.juife.JuifeUtils; |
import net.sf.juife.swing.JuifeUtils; |
55 |
|
|
56 |
import org.jsampler.CC; |
import org.jsampler.CC; |
|
import org.jsampler.HF; |
|
57 |
import org.jsampler.JSI18n; |
import org.jsampler.JSI18n; |
58 |
import org.jsampler.JSUtils; |
import org.jsampler.JSUtils; |
59 |
import org.jsampler.LSConsoleModel; |
import org.jsampler.LSConsoleModel; |
65 |
import org.jsampler.view.std.JSDefaultsPropsPane; |
import org.jsampler.view.std.JSDefaultsPropsPane; |
66 |
import org.jsampler.view.std.JSGeneralProps; |
import org.jsampler.view.std.JSGeneralProps; |
67 |
import org.jsampler.view.std.JSLSConsolePropsPane; |
import org.jsampler.view.std.JSLSConsolePropsPane; |
68 |
|
import org.jsampler.view.swing.SHF; |
69 |
|
|
70 |
|
import static org.jsampler.JSPrefs.*; |
71 |
import static org.jsampler.view.classic.ClassicI18n.i18n; |
import static org.jsampler.view.classic.ClassicI18n.i18n; |
72 |
import static org.jsampler.view.classic.ClassicPrefs.preferences; |
import static org.jsampler.view.classic.ClassicPrefs.preferences; |
|
import static org.jsampler.view.std.StdPrefs.*; |
|
73 |
|
|
74 |
|
|
75 |
/** |
/** |
297 |
|
|
298 |
int size = recentScriptsPane.getRecentScriptsSize(); |
int size = recentScriptsPane.getRecentScriptsSize(); |
299 |
preferences().setIntProperty(RECENT_LSCP_SCRIPTS_SIZE, size); |
preferences().setIntProperty(RECENT_LSCP_SCRIPTS_SIZE, size); |
300 |
((MainFrame)CC.getMainFrame()).updateRecentScriptsMenu(); |
((MainFrame)SHF.getMainFrame()).updateRecentScriptsMenu(); |
301 |
|
|
302 |
String s = jSamplerHomePane.getJSamplerHome(); |
String s = jSamplerHomePane.getJSamplerHome(); |
303 |
if(s.length() > 0 && !s.equals(CC.getJSamplerHome())) { |
if(s.length() > 0 && !s.equals(CC.getJSamplerHome())) { |
309 |
@Override |
@Override |
310 |
protected void |
protected void |
311 |
clearRecentScripts() { |
clearRecentScripts() { |
312 |
((MainFrame)CC.getMainFrame()).clearRecentScripts(); |
((MainFrame)SHF.getMainFrame()).clearRecentScripts(); |
313 |
} |
} |
314 |
} |
} |
315 |
} |
} |
583 |
if(fontName.equals("[Default]")) { |
if(fontName.equals("[Default]")) { |
584 |
b = Prefs.setInterfaceFont(null); |
b = Prefs.setInterfaceFont(null); |
585 |
} else if(Prefs.setInterfaceFont(fontName)) { |
} else if(Prefs.setInterfaceFont(fontName)) { |
586 |
HF.setUIDefaultFont(fontName); |
CC.getViewConfig().setUIDefaultFont(fontName); |
587 |
b = true; |
b = true; |
588 |
} |
} |
589 |
|
|
650 |
@Override |
@Override |
651 |
protected void |
protected void |
652 |
clearConsoleHistory() { |
clearConsoleHistory() { |
653 |
MainFrame mainFrame = (MainFrame)CC.getMainFrame(); |
MainFrame frame = (MainFrame)SHF.getMainFrame(); |
654 |
mainFrame.getLSConsoleModel().clearCommandHistory(); |
frame.getLSConsoleModel().clearCommandHistory(); |
655 |
} |
} |
656 |
|
|
657 |
@Override |
@Override |
659 |
apply() { |
apply() { |
660 |
super.apply(); |
super.apply(); |
661 |
|
|
662 |
MainFrame mainFrame = (MainFrame)CC.getMainFrame(); |
MainFrame frame = (MainFrame)SHF.getMainFrame(); |
663 |
|
|
664 |
LSConsoleModel model = mainFrame.getLSConsoleModel(); |
LSConsoleModel model = frame.getLSConsoleModel(); |
665 |
model.setCommandHistorySize(preferences().getIntProperty(LS_CONSOLE_HISTSIZE)); |
model.setCommandHistorySize(preferences().getIntProperty(LS_CONSOLE_HISTSIZE)); |
666 |
|
|
667 |
int c = preferences().getIntProperty(LS_CONSOLE_TEXT_COLOR); |
int c = preferences().getIntProperty(LS_CONSOLE_TEXT_COLOR); |
668 |
mainFrame.setLSConsoleTextColor(new Color(c)); |
frame.setLSConsoleTextColor(new Color(c)); |
669 |
|
|
670 |
c = preferences().getIntProperty(LS_CONSOLE_BACKGROUND_COLOR); |
c = preferences().getIntProperty(LS_CONSOLE_BACKGROUND_COLOR); |
671 |
mainFrame.setLSConsoleBackgroundColor(new Color(c)); |
frame.setLSConsoleBackgroundColor(new Color(c)); |
672 |
|
|
673 |
c = preferences().getIntProperty(LS_CONSOLE_NOTIFY_COLOR); |
c = preferences().getIntProperty(LS_CONSOLE_NOTIFY_COLOR); |
674 |
mainFrame.setLSConsoleNotifyColor(new Color(c)); |
frame.setLSConsoleNotifyColor(new Color(c)); |
675 |
|
|
676 |
c = preferences().getIntProperty(LS_CONSOLE_WARNING_COLOR); |
c = preferences().getIntProperty(LS_CONSOLE_WARNING_COLOR); |
677 |
mainFrame.setLSConsoleWarningColor(new Color(c)); |
frame.setLSConsoleWarningColor(new Color(c)); |
678 |
|
|
679 |
c = preferences().getIntProperty(LS_CONSOLE_ERROR_COLOR); |
c = preferences().getIntProperty(LS_CONSOLE_ERROR_COLOR); |
680 |
mainFrame.setLSConsoleErrorColor(new Color(c)); |
frame.setLSConsoleErrorColor(new Color(c)); |
681 |
} |
} |
682 |
} |
} |