1 package charactermanaj.model;
4 import java.io.BufferedOutputStream;
6 import java.io.FileNotFoundException;
7 import java.io.FileOutputStream;
8 import java.io.IOException;
9 import java.io.InputStream;
10 import java.io.OutputStream;
13 import java.nio.charset.Charset;
14 import java.util.ArrayList;
15 import java.util.List;
16 import java.util.Locale;
17 import java.util.Properties;
19 import java.util.logging.Level;
20 import java.util.logging.Logger;
21 import java.util.regex.Pattern;
23 import charactermanaj.util.ApplicationLogHandler;
24 import charactermanaj.util.BeanPropertiesUtilities;
25 import charactermanaj.util.ConfigurationDirUtilities;
28 * アプリケーションの全域にわたる設定.<br>
29 * アプリケーション設定は、クラスパス上のリソース、コートベース直下のappConfig.xml、ユーザーごとのappConfig.xmlの順に読み込まれます
34 public final class AppConfig {
39 private static final String CONFIG_NAME = "appConfig.xml";
42 * 全ユーザー用キャラクターディレクトリのシステムプロパティのキー名.<br>
44 public static final String COMMON_CHARACTER_DIR_PROPERTY_NAME = "character.dir";
49 private static final String DEFAULT_SPECIFICATION_VERSION = "1.0";
55 private static final Logger logger = Logger.getLogger(AppConfig.class.getName());
61 private static final AppConfig singleton = new AppConfig();
69 public static AppConfig getInstance() {
80 private String implementationVersion;
82 private String specificationVersion;
86 * ビルドされたjarパッケージからバージョン情報を取得する.<br>
87 * クラスパスの実行からのバージョンは常に「develop」となる.<br>
91 public String getImplementationVersion() {
92 return implementationVersion;
97 * ビルドされたjarパッケージからバージョン情報を取得する.<br>
98 * クラスパスの実行からのバージョンは常に「develop」となる.<br>
102 public String getSpecificationVersion() {
103 return specificationVersion;
107 * ビルドされたjarパッケージからバージョン情報を取得する.<br>
108 * クラスパスの実行からのバージョンは常に「develop」となる.<br>
110 private void loadAppVersions() {
111 Package pak = this.getClass().getPackage();
112 String implementationVersion = "develop";
113 String specificationVersion = DEFAULT_SPECIFICATION_VERSION;
115 String vInfo = pak.getImplementationVersion();
116 if (vInfo != null && implementationVersion.trim().length() > 0) {
117 implementationVersion = vInfo.trim();
119 String specVInfo = pak.getSpecificationVersion();
120 if (specVInfo != null && specVInfo.trim().length() > 0) {
121 specificationVersion = specVInfo.trim();
125 this.implementationVersion = implementationVersion;
126 this.specificationVersion = specificationVersion;
130 * 設定ファイルのロケール固有版へのファイル末尾の修飾文字列を読み込み順に取得する.
131 * @param locale ロケール、nullの場合はデフォルト
132 * @return ロケールを表すファイル末尾の修飾文字列の読み込み順のリスト
134 private String[] getLocalizedSuffix(Locale locale) {
135 if (locale == null) {
136 locale = Locale.getDefault();
139 String language = locale.getLanguage();
140 String country = locale.getCountry();
141 String variant = locale.getVariant();
143 return new String[] {
146 "_" + language + "_" + country,
147 "_" + language + "_" + country + "_" + variant,
152 * 指定されたファイル名の拡張子の前にロケール固有の修飾文字列を付与したリスト作成して返す.
154 * @param locale ロケール、nullの場合はデフォルト
155 * @return ロケールの検索順序でのロケール固有の修飾文字列が付与されたファイルのリスト
157 private List<File> expandLocalizedSuffix(File base, Locale locale) {
158 String path = base.getPath();
160 int pt = path.lastIndexOf(".");
163 left = path.substring(0, pt);
164 right = path.substring(pt);
171 ArrayList<File> files = new ArrayList<File>();
172 for (String suffix : getLocalizedSuffix(locale)) {
173 String newPath = left + suffix + right;
174 System.out.println("newpath=" + newPath);
175 files.add(new File(newPath));
181 * 設定ファイルの読み込み順序で、読み込むべきURIのリストを返す.<br>
183 * <li>(1) リソース上の/appConfig.xml</li>
184 * <li>(2) appConfigFileシステムプロパティで指定されたファイル</li>
185 * <li>(3) コードベース下のappConfig.xml</li>
186 * <li>(4) アプリケーションデータ保存先のappConfig.xml</li>
188 * appConfigFileシステムプロパティがある場合は、(1)(2)の順。 <br>
189 * 指定がない場合は、(1)(3)(4)の順に読み取る.<br>
191 * @return 優先順位での設定ファイルの読み込み先URIのリスト
192 * @throws IOException
194 public List<URI> getCandidateURIs() throws IOException {
195 List<URI> uris = new ArrayList<URI>();
196 // リソース中の既定 (ロケール識別あり)
197 for (File localizedFile : expandLocalizedSuffix(new File(getClass()
198 .getResource("/" + CONFIG_NAME).getPath()), null)) {
199 uris.add(localizedFile.toURI());
202 String specifiedAppConfig = System.getProperty("appConfigFile");
203 if (specifiedAppConfig != null) {
204 // システムプロパティでappConfig.xmlを明示している場合は、それを読み込む。
205 // (appConfigFileシステムプロパティが空の場合は、リソース埋め込みの既定の設定だけをよみこむ)
206 if (specifiedAppConfig.trim().length() > 0) {
207 File specifiedAppConfigFile = new File(specifiedAppConfig);
208 uris.add(specifiedAppConfigFile.toURI());
212 // システムプロパティて明示していない場合は、まずコードベースを使用する.(ロケール識別あり)
213 File codeBase = ConfigurationDirUtilities.getApplicationBaseDir();
214 for (File localizedFile : expandLocalizedSuffix(new File(codeBase,
215 CONFIG_NAME).getCanonicalFile(), null)) {
216 uris.add(localizedFile.toURI());
219 // システムプロパティて明示していない場合は、次にユーザディレクトリを使用する.
220 File userDataDir = ConfigurationDirUtilities.getUserDataDir();
221 uris.add(new File(userDataDir, CONFIG_NAME).toURI());
227 * 保存先の試行順序ごとのファイルのリスト。
231 public List<File> getPrioritySaveFileList() {
232 ArrayList<File> saveFiles = new ArrayList<File>();
234 String specifiedAppConfig = System.getProperty("appConfigFile");
235 if (specifiedAppConfig != null) {
236 // システムプロパティでappConfig.xmlを明示している場合
237 if (specifiedAppConfig.trim().length() > 0) {
238 File specifiedAppConfigFile = new File(specifiedAppConfig);
239 if (!specifiedAppConfigFile.exists()
240 || specifiedAppConfigFile.canWrite()) {
241 // まだ存在しないか、書き込み可能である場合のみ候補とする.
242 saveFiles.add(specifiedAppConfigFile);
246 // システムプロパティappConfigFileがなければユーザディレクトリへ書き込む
247 // ユーザディレクトリは常に候補とする.
248 File userDataDir = ConfigurationDirUtilities.getUserDataDir();
249 saveFiles.add(new File(userDataDir, CONFIG_NAME));
257 * 存在しないか、読み取りに失敗した場合は、該当ファイルはスキップされる.<br>
259 public void loadConfig() {
260 Properties config = new Properties();
262 for (URI uri : getCandidateURIs()) {
264 continue; // リソースがない場合はnullになる
266 // ファイルの実在チェック (チェックできる場合のみ)
267 if ("file".equals(uri.getScheme())) {
268 File file = new File(uri);
269 if (!file.exists()) {
270 logger.log(Level.CONFIG, "appConfig.xml is not found.:" + file);
274 // appConfig.xmlの読み込みを行う.
275 // Properties#loadFromXML() はXMLからキーを読み取り、既存のキーに対して上書きする.
276 // XMLに存在しないキーは読み込み前のままなので、繰り返し呼び出すことで「重ね合わせ」することができる.
278 URL resourceURL = uri.toURL();
279 InputStream is = resourceURL.openStream();
281 config.loadFromXML(is);
282 logger.log(Level.CONFIG, "appConfig.xml is loaded.:" + uri);
287 } catch (FileNotFoundException ex) {
288 logger.log(Level.CONFIG, "appConfig.xml is not found.: " + uri, ex);
289 // 無視する (無い場合は十分にありえるので「情報」レベルでログ。)
290 } catch (Exception ex) {
291 logger.log(Level.WARNING, "appConfig.xml loading failed.: " + uri, ex);
296 } catch (IOException ex) {
297 throw new RuntimeException("appConfig.xml loading failed.", ex);
298 } catch (RuntimeException ex) {
299 throw new RuntimeException("appConfig.xml loading failed.", ex);
301 BeanPropertiesUtilities.loadFromProperties(this, config);
305 * プロパティをアプリケーションデータの指定した保存先に保存する.
307 * @throws IOException
310 public void saveConfig(List<File> prioritySaveFiles) throws IOException {
311 Properties config = getProperties();
312 IOException oex = null;
313 for (File configStore : prioritySaveFiles) {
315 OutputStream os = new BufferedOutputStream(
316 new FileOutputStream(configStore));
318 config.storeToXML(os, CONFIG_NAME, "UTF-8");
325 } catch (IOException ex) {
326 logger.log(Level.WARNING, "アプリケーション設定の保存に失敗しました" + ex, ex);
331 // 例外が発生していれば、最後の例外を返す.
338 * プロパティをアプリケーションデータの保存先に保存する.
340 * @throws IOException
343 public void saveConfig() throws IOException {
344 saveConfig(getPrioritySaveFileList());
348 * Propertiesの値を設定した場合に設定できない項目があるかチェックする.<br>
349 * このメソッドを呼び出しても、アプリケーション設定自身は何も影響されない.<br>
353 * @return 設定できなかったプロパティキーのコレクション、問題なければ空が返される.
355 public static Set<String> checkProperties(Properties props) {
357 throw new IllegalArgumentException();
359 AppConfig dummy = new AppConfig(); // アプリケーションから参照されないダミーのインスタンスを作成する.
360 return BeanPropertiesUtilities.loadFromProperties(dummy, props);
364 * Propertiesの値で設定を更新する.<br>
368 * @return 設定できなかったプロパティキーのコレクション、問題なければ空が返される.
370 public Set<String> update(Properties props) {
372 throw new IllegalArgumentException();
374 return BeanPropertiesUtilities.loadFromProperties(this, props);
378 * このアプリケーション設定をプロパティに書き出して返します.<br>
382 public Properties getProperties() {
383 Properties config = new Properties();
384 BeanPropertiesUtilities.saveToProperties(this, config);
390 * プロファイル選択ダイアログのプロファイルのサンプルイメージの背景色
392 * @return サンプルイメージの背景色
394 public Color getSampleImageBgColor() {
395 return sampleImageBgColor;
398 public void setSampleImageBgColor(Color sampleImageBgColor) {
399 if (sampleImageBgColor == null) {
400 throw new IllegalArgumentException();
402 this.sampleImageBgColor = sampleImageBgColor;
405 private Color sampleImageBgColor = Color.white;
409 * デフォルトのイメージ背景色を取得する.
411 * @return デフォルトのイメージ背景色
413 public Color getDefaultImageBgColor() {
414 return defaultImageBgColor;
417 public void setDefaultImageBgColor(Color defaultImageBgColor) {
418 if (defaultImageBgColor == null) {
419 throw new IllegalArgumentException();
421 this.defaultImageBgColor = defaultImageBgColor;
424 private Color defaultImageBgColor = Color.white;
429 * @return 使用中アイテムの背景色
431 public Color getCheckedItemBgColor() {
432 return checkedItemBgColor;
435 public void setCheckedItemBgColor(Color checkedItemBgColor) {
436 if (checkedItemBgColor == null) {
437 throw new IllegalArgumentException();
439 this.checkedItemBgColor = checkedItemBgColor;
442 private Color checkedItemBgColor = Color.cyan.brighter();
450 public Color getSelectedItemBgColor() {
451 return selectedItemBgColor;
454 public void setSelectedItemBgColor(Color selectedItemBgColor) {
455 this.selectedItemBgColor = selectedItemBgColor;
458 private Color selectedItemBgColor = Color.orange;
461 * 不備のあるデータ行の背景色を取得する.
463 * @return 不備のあるデータ行の背景色
465 public Color getInvalidBgColor() {
466 return invalidBgColor;
469 public void setInvalidBgColor(Color invalidBgColor) {
470 if (invalidBgColor == null) {
471 throw new IllegalArgumentException();
473 this.invalidBgColor = invalidBgColor;
476 private Color invalidBgColor = Color.red.brighter().brighter();
479 * JPEG画像変換時の圧縮率を取得する.
483 public float getCompressionQuality() {
484 return compressionQuality;
487 public void setCompressionQuality(float compressionQuality) {
488 if (compressionQuality < .1f || compressionQuality > 1f) {
489 throw new IllegalArgumentException();
491 this.compressionQuality = compressionQuality;
494 private float compressionQuality = .8f;
497 * エクスポートウィザードのプリセットにパーツ不足時の警告色(前景色)を取得する.
499 * @return エクスポートウィザードのプリセットにパーツ不足時の警告色(前景色)
501 public Color getExportPresetWarningsForegroundColor() {
502 return exportPresetWarningsForegroundColor;
505 public void setExportPresetWarningsForegroundColor(
506 Color exportPresetWarningsForegroundColor) {
507 this.exportPresetWarningsForegroundColor = exportPresetWarningsForegroundColor;
510 private Color exportPresetWarningsForegroundColor = Color.red;
513 * JARファイル転送用バッファサイズ.<br>
515 * @return JARファイル転送用バッファサイズ.
517 public int getJarTransferBufferSize() {
518 return jarTransferBufferSize;
521 public void setJarTransferBufferSize(int jarTransferBufferSize) {
522 if (jarTransferBufferSize <= 0) {
523 throw new IllegalArgumentException();
525 this.jarTransferBufferSize = jarTransferBufferSize;
528 private int jarTransferBufferSize = 4096;
531 * ZIPファイル名のエンコーディング.<br>
533 * @return ZIPファイル名のエンコーディング.<br>
535 public String getZipNameEncoding() {
536 return zipNameEncoding;
539 public void setZipNameEncoding(String zipNameEncoding) {
540 if (zipNameEncoding == null) {
541 throw new IllegalArgumentException();
544 Charset.forName(zipNameEncoding);
545 } catch (Exception ex) {
546 throw new RuntimeException("unsupported charset: " + zipNameEncoding);
548 this.zipNameEncoding = zipNameEncoding;
551 private String zipNameEncoding = "csWindows31J";
554 * ディセーブルなテーブルのセルのフォアグラウンドカラーを取得する.
556 * @return ディセーブルなテーブルのセルのフォアグラウンドカラー
558 public Color getDisabledCellForgroundColor() {
559 return disabledCellForegroundColor;
562 public void setDisabledCellForegroundColor(Color disabledCellForegroundColor) {
563 if (disabledCellForegroundColor == null) {
564 throw new IllegalArgumentException();
566 this.disabledCellForegroundColor = disabledCellForegroundColor;
569 private Color disabledCellForegroundColor = Color.gray;
573 * ディレクトリを監視する間隔(mSec)を取得する.
575 * @return ディレクトリを監視する間隔(mSec)
577 public int getDirWatchInterval() {
578 return dirWatchInterval;
581 public void setDirWatchInterval(int dirWatchInterval) {
582 if (dirWatchInterval <= 0) {
583 throw new IllegalArgumentException();
585 this.dirWatchInterval = dirWatchInterval;
588 private int dirWatchInterval = 7 * 1000;
593 * @return ディレクトリの監視を有効にする場合はtrue
595 public boolean isEnableDirWatch() {
596 return enableDirWatch;
599 public void setEnableDirWatch(boolean enableDirWatch) {
600 this.enableDirWatch = enableDirWatch;
603 private boolean enableDirWatch = true;
606 * ファイル転送に使うバッファサイズ.<br>
610 public int getFileTransferBufferSize() {
611 return fileTransferBufferSize;
614 public void setFileTransferBufferSize(int fileTransferBufferSize) {
615 if (fileTransferBufferSize <= 0) {
616 throw new IllegalArgumentException();
618 this.fileTransferBufferSize = fileTransferBufferSize;
621 private int fileTransferBufferSize = 4096;
624 * プレビューのインジケータを表示するまでのディレイ(mSec)を取得する.
626 * @return プレビューのインジケータを表示するまでのディレイ(mSec)
628 public long getPreviewIndicatorDelay() {
629 return previewIndeicatorDelay;
632 public void setPreviewIndeicatorDelay(long previewIndeicatorDelay) {
633 if (previewIndeicatorDelay < 0) {
634 throw new IllegalArgumentException();
636 this.previewIndeicatorDelay = previewIndeicatorDelay;
639 private long previewIndeicatorDelay = 300;
642 * 情報ダイアログの編集ボタンを「開く」アクションにする場合はtrue、「編集」アクションにする場合はfalse
644 * @return trueならばOpen、falseならばEdit
646 public boolean isInformationDialogOpenMethod() {
647 return informationDialogOpenMethod;
650 public void setInformationDialogOpenMethod(
651 boolean informationDialogOpenMethod) {
652 this.informationDialogOpenMethod = informationDialogOpenMethod;
655 private boolean informationDialogOpenMethod = true;
659 * falseの場合は{@link ApplicationLogHandler}の実装に従って終了時に 必要なければログは削除される.<br>
661 * @return 常に残す場合はtrue、そうでなければfalse
663 public boolean isNoRemoveLog() {
667 public void setNoRemoveLog(boolean noRemoveLog) {
668 this.noRemoveLog = noRemoveLog;
671 private boolean noRemoveLog = false;
679 public Color getGridColor() {
683 public void setGridColor(Color gridColor) {
684 if (gridColor == null) {
685 throw new IllegalArgumentException();
687 this.gridColor = gridColor;
690 private Color gridColor = Color.gray;
693 * カラーダイアログの値が変更されたら、自動的にプレビューを更新するか?
695 * @return カラーダイアログの値が変更されたら、自動的にプレビューを更新する場合はtrue (デフォルトはtrue)
697 public boolean isEnableAutoColorChange() {
698 return enableAutoColorChange;
701 public void setEnableAutoColorChange(boolean enableAutoColorChange) {
702 this.enableAutoColorChange = enableAutoColorChange;
705 private boolean enableAutoColorChange = true;
707 public void setAuthorEditConflictBgColor(Color authorEditConflictBgColor) {
708 if (authorEditConflictBgColor == null) {
709 throw new IllegalArgumentException();
711 this.authorEditConflictBgColor = authorEditConflictBgColor;
715 * パーツの作者編集時に複数作者を選択した場合のに入力ボックスの背景色
719 public Color getAuthorEditConflictBgColor() {
720 return authorEditConflictBgColor;
723 Color authorEditConflictBgColor = Color.yellow;
726 public void setMainFrameMaxWidth(int width) {
727 this.mainFrameMaxWidth = width;
733 * @return メインフレームの初期表示時の最大幅
735 public int getMainFrameMaxWidth() {
736 return mainFrameMaxWidth;
739 private int mainFrameMaxWidth = 800;
741 public void setMainFrameMaxHeight(int height) {
742 this.mainFrameMaxHeight = height;
748 * @return メインフレームの初期表示時の最大高さ
750 public int getMainFrameMaxHeight() {
751 return mainFrameMaxHeight;
754 private int mainFrameMaxHeight = 600;
758 * カラーダイアログで存在しないレイヤーをディセーブルにしない.
760 * @return ディセーブルにしない場合はtrue
762 public boolean isNotDisableLayerTab() {
763 return notDisableLayerTab;
766 public void setNotDisableLayerTab(boolean notDisableLayerTab) {
767 this.notDisableLayerTab = notDisableLayerTab;
770 private boolean notDisableLayerTab;
775 * この指定日を経過した古いログは削除される.<br>
780 public long getPurgeLogDays() {
784 public void setPurgeLogDays(long purgeLogDays) {
785 this.purgeLogDays = purgeLogDays;
788 private long purgeLogDays = 10;
790 public String getPartsColorGroupPattern() {
791 return partsColorGroupPattern;
794 public void setPartsColorGroupPattern(String pattern) {
795 if (pattern != null && pattern.trim().length() > 0) {
796 Pattern.compile(pattern);
798 partsColorGroupPattern = pattern;
801 private String partsColorGroupPattern = "^.*\\(@\\).*$";
803 private Color selectPanelTitleColor = Color.BLUE;
805 public Color getSelectPanelTitleColor() {
806 return selectPanelTitleColor;
809 public void setSelectPanelTitleColor(Color color) {
811 throw new IllegalArgumentException();
813 selectPanelTitleColor = color;
816 private boolean enableAutoShrinkPanel;
818 public boolean isEnableAutoShrinkPanel() {
819 return enableAutoShrinkPanel;
822 public void setEnableAutoShrinkPanel(boolean enableAutoShrinkPanel) {
823 this.enableAutoShrinkPanel = enableAutoShrinkPanel;
826 public boolean isDisableWatchDirIfNotWritable() {
827 return disableWatchDirIfNotWritable;
830 public void setDisableWatchDirIfNotWritable(boolean disableWatchDirIfNotWritable) {
831 this.disableWatchDirIfNotWritable = disableWatchDirIfNotWritable;
834 private boolean disableWatchDirIfNotWritable = true;
836 public void setEnablePNGSupportForWindows(boolean enablePNGSupportForWindows) {
837 this.enablePNGSupportForWindows = enablePNGSupportForWindows;
840 public boolean isEnablePNGSupportForWindows() {
841 return enablePNGSupportForWindows;
844 private boolean enablePNGSupportForWindows = true;
847 * 画像表示(通常モード)でオプティマイズを有効にする最大倍率.
849 private double renderingOptimizeThresholdForNormal = 2.;
851 public void setRenderingOptimizeThresholdForNormal(
852 double renderingOptimizeThresholdForNormal) {
853 this.renderingOptimizeThresholdForNormal = renderingOptimizeThresholdForNormal;
856 public double getRenderingOptimizeThresholdForNormal() {
857 return renderingOptimizeThresholdForNormal;
860 * 画像表示(チェックモード)でオプティマイズを有効にする最大倍率.
862 private double renderingOptimizeThresholdForCheck = 0.;
864 public void setRenderingOptimizeThresholdForCheck(
865 double renderingOptimizeThresholdForCheck) {
866 this.renderingOptimizeThresholdForCheck = renderingOptimizeThresholdForCheck;
869 public double getRenderingOptimizeThresholdForCheck() {
870 return renderingOptimizeThresholdForCheck;
876 private boolean enableInterpolationBicubic = true;
878 public void setEnableInterpolationBicubic(boolean enableInterpolationBicubic) {
879 this.enableInterpolationBicubic = enableInterpolationBicubic;
882 public boolean isEnableInterpolationBicubic() {
883 return enableInterpolationBicubic;
889 private String predefinedZoomRanges = "20, 50, 80, 100, 120, 150, 200, 300, 400, 800";
891 public String getPredefinedZoomRanges() {
892 return predefinedZoomRanges;
895 public void setPredefinedZoomRanges(String predefinedZoomRanges) {
896 this.predefinedZoomRanges = predefinedZoomRanges;
902 private boolean enableZoomPanel = true;
904 public boolean isEnableZoomPanel() {
905 return enableZoomPanel;
908 public void setEnableZoomPanel(boolean enableZoomPanel) {
909 this.enableZoomPanel = enableZoomPanel;
913 * ズームパネルをアクティブにする下部範囲
915 private int zoomPanelActivationArea = 30;
917 public int getZoomPanelActivationArea() {
918 return zoomPanelActivationArea;
921 public void setZoomPanelActivationArea(int zoomPanelActivationArea) {
922 this.zoomPanelActivationArea = zoomPanelActivationArea;
928 private boolean enableRenderingHints = true;
930 public void setEnableRenderingHints(boolean enableRenderingHints) {
931 this.enableRenderingHints = enableRenderingHints;
934 public boolean isEnableRenderingHints() {
935 return enableRenderingHints;
941 private int drawGridMask = 2;
943 public int getDrawGridMask() {
947 public void setDrawGridMask(int drawGridMask) {
948 this.drawGridMask = drawGridMask & 0x03;
951 private int previewGridColor = 0x7f7f0000;
953 public int getPreviewGridColor() {
954 return previewGridColor;
957 public void setPreviewGridColor(int previewGridColor) {
958 this.previewGridColor = previewGridColor;
961 private int previewGridSize = 20;
963 public int getPreviewGridSize() {
964 return previewGridSize;
967 public void setPreviewGridSize(int previewGridSize) {
968 this.previewGridSize = previewGridSize;
974 private int previewUnfilledSpaceForCheckMode = 0;
976 public int getPreviewUnfilledSpaceForCheckMode() {
977 return previewUnfilledSpaceForCheckMode;
980 public void setPreviewUnfilledSpaceForCheckMode(
981 int previewUnfilledSpaceForCheckMode) {
982 this.previewUnfilledSpaceForCheckMode = previewUnfilledSpaceForCheckMode;
986 * チェックモードでツールチップを表示するか?
988 private boolean enableCheckInfoTooltip = true;
990 public boolean isEnableCheckInfoTooltip() {
991 return enableCheckInfoTooltip;
994 public void setEnableCheckInfoTooltip(boolean enableCheckInfoTooltip) {
995 this.enableCheckInfoTooltip = enableCheckInfoTooltip;
999 * ホイールによるスクロールの単位.<br>
1001 private int wheelScrollUnit = 10;
1003 public int getWheelScrollUnit() {
1004 return wheelScrollUnit;
1007 public void setWheelScrollUnit(int wheelScrollUnit) {
1008 this.wheelScrollUnit = wheelScrollUnit;
1012 * 壁紙にオフスクリーン描画を使用するか?.<br>
1013 * (あまり劇的なパフォーマンス効果はない.)
1015 private boolean enableOffscreenWallpaper = false;
1017 public boolean isEnableOffscreenWallpaper() {
1018 return enableOffscreenWallpaper;
1021 public void setEnableOffscreenWallpaper(boolean enableOffscreenWallpaper) {
1022 this.enableOffscreenWallpaper = enableOffscreenWallpaper;
1028 private int offscreenWallpaperSize = 300;
1030 public int getOffscreenWallpaperSize() {
1031 return offscreenWallpaperSize;
1034 public void setOffscreenWallpaperSize(int offscreenWallpaperSize) {
1035 this.offscreenWallpaperSize = offscreenWallpaperSize;
1041 private int randomChooserMaxHistory = 10;
1043 public int getRandomChooserMaxHistory() {
1044 return randomChooserMaxHistory;
1047 public void setRandomChooserMaxHistory(int randomChooserMaxHistory) {
1048 this.randomChooserMaxHistory = randomChooserMaxHistory;
1052 * デフォルトのフォントサイズ、0以下の場合はシステム既定のまま
1054 private int defaultFontSize = 12;
1056 public int getDefaultFontSize() {
1057 return defaultFontSize;
1060 public void setDefaultFontSize(int defaultFontSize) {
1061 this.defaultFontSize = defaultFontSize;
1065 * デフォルトのフォントファミリー、カンマ区切り
1067 private String fontPriority = "Lucida Grande";
1069 public String getFontPriority() {
1070 return fontPriority;
1073 public void setFontPriority(String fontPriority) {
1074 this.fontPriority = fontPriority;