1 package charactermanaj.model;
\r
3 import java.awt.Color;
\r
4 import java.io.BufferedOutputStream;
\r
6 import java.io.FileNotFoundException;
\r
7 import java.io.FileOutputStream;
\r
8 import java.io.IOException;
\r
9 import java.io.InputStream;
\r
10 import java.io.OutputStream;
\r
11 import java.net.URI;
\r
12 import java.net.URL;
\r
13 import java.nio.charset.Charset;
\r
14 import java.util.ArrayList;
\r
15 import java.util.List;
\r
16 import java.util.Properties;
\r
17 import java.util.Set;
\r
18 import java.util.logging.Level;
\r
19 import java.util.logging.Logger;
\r
20 import java.util.regex.Pattern;
\r
22 import charactermanaj.util.ApplicationLogHandler;
\r
23 import charactermanaj.util.BeanPropertiesUtilities;
\r
24 import charactermanaj.util.ConfigurationDirUtilities;
\r
27 * アプリケーションの全域にわたる設定.<br>
\r
28 * アプリケーション設定は、クラスパス上のリソース、コートベース直下のappConfig.xml、ユーザーごとのappConfig.xmlの順に読み込まれます
\r
33 public final class AppConfig {
\r
38 private static final String CONFIG_NAME = "appConfig.xml";
\r
41 * 全ユーザー用キャラクターディレクトリのシステムプロパティのキー名.<br>
\r
43 public static final String COMMON_CHARACTER_DIR_PROPERTY_NAME = "character.dir";
\r
48 private static final String DEFAULT_SPECIFICATION_VERSION = "1.0";
\r
54 private static final Logger logger = Logger.getLogger(AppConfig.class.getName());
\r
60 private static final AppConfig singleton = new AppConfig();
\r
68 public static AppConfig getInstance() {
\r
75 private AppConfig() {
\r
79 private String implementationVersion;
\r
81 private String specificationVersion;
\r
85 * ビルドされたjarパッケージからバージョン情報を取得する.<br>
\r
86 * クラスパスの実行からのバージョンは常に「develop」となる.<br>
\r
90 public String getImplementationVersion() {
\r
91 return implementationVersion;
\r
96 * ビルドされたjarパッケージからバージョン情報を取得する.<br>
\r
97 * クラスパスの実行からのバージョンは常に「develop」となる.<br>
\r
101 public String getSpecificationVersion() {
\r
102 return specificationVersion;
\r
106 * ビルドされたjarパッケージからバージョン情報を取得する.<br>
\r
107 * クラスパスの実行からのバージョンは常に「develop」となる.<br>
\r
109 private void loadAppVersions() {
\r
110 Package pak = this.getClass().getPackage();
\r
111 String implementationVersion = "develop";
\r
112 String specificationVersion = DEFAULT_SPECIFICATION_VERSION;
\r
114 String vInfo = pak.getImplementationVersion();
\r
115 if (vInfo != null && implementationVersion.trim().length() > 0) {
\r
116 implementationVersion = vInfo.trim();
\r
118 String specVInfo = pak.getSpecificationVersion();
\r
119 if (specVInfo != null && specVInfo.trim().length() > 0) {
\r
120 specificationVersion = specVInfo.trim();
\r
124 this.implementationVersion = implementationVersion;
\r
125 this.specificationVersion = specificationVersion;
\r
129 * 設定ファイルの読み込み順序で、読み込むべきURIのリストを返す.<br>
\r
131 * <li>(1) リソース上の/appConfig.xml</li>
\r
132 * <li>(2) appConfigFileシステムプロパティで指定されたファイル</li>
\r
133 * <li>(3) コードベース下のappConfig.xml</li>
\r
134 * <li>(4) アプリケーションデータ保存先のappConfig.xml</li>
\r
136 * appConfigFileシステムプロパティがある場合は、(1)(2)の順。 <br>
\r
137 * 指定がない場合は、(1)(3)(4)の順に読み取る.<br>
\r
139 * @return 優先順位での設定ファイルの読み込み先URIのリスト
\r
140 * @throws IOException
\r
142 public List<URI> getCandidateURIs() throws IOException {
\r
143 List<URI> uris = new ArrayList<URI>();
\r
145 uris.add(new File(getClass().getResource("/" + CONFIG_NAME).getPath())
\r
148 String specifiedAppConfig = System.getProperty("appConfigFile");
\r
149 if (specifiedAppConfig != null) {
\r
150 // システムプロパティでappConfig.xmlを明示している場合は、それを読み込む。
\r
151 // (appConfigFileシステムプロパティが空の場合は、リソース埋め込みの既定の設定だけをよみこむ)
\r
152 if (specifiedAppConfig.trim().length() > 0) {
\r
153 File specifiedAppConfigFile = new File(specifiedAppConfig);
\r
154 uris.add(specifiedAppConfigFile.toURI());
\r
158 // システムプロパティが指定されていない場合は、
\r
159 // コードベース、つぎにユーザーディレクトリの順で読み込む
\r
160 File codeBase = ConfigurationDirUtilities.getApplicationBaseDir();
\r
161 File userDataDir = ConfigurationDirUtilities.getUserDataDir();
\r
163 // システムプロパティて明示していない場合は、コードベースおよびユーザディレクトリを使用する.
\r
164 uris.add(new File(codeBase, CONFIG_NAME).getCanonicalFile().toURI());
\r
165 uris.add(new File(userDataDir, CONFIG_NAME).toURI());
\r
171 * 保存先の試行順序ごとのファイルのリスト。
\r
175 public List<File> getPrioritySaveFileList() {
\r
176 ArrayList<File> saveFiles = new ArrayList<File>();
\r
178 String specifiedAppConfig = System.getProperty("appConfigFile");
\r
179 if (specifiedAppConfig != null) {
\r
180 // システムプロパティでappConfig.xmlを明示している場合
\r
181 if (specifiedAppConfig.trim().length() > 0) {
\r
182 File specifiedAppConfigFile = new File(specifiedAppConfig);
\r
183 if (!specifiedAppConfigFile.exists()
\r
184 || specifiedAppConfigFile.canWrite()) {
\r
185 // まだ存在しないか、書き込み可能である場合のみ候補とする.
\r
186 saveFiles.add(specifiedAppConfigFile);
\r
190 // システムプロパティappConfigFileがなければユーザディレクトリへ書き込む
\r
191 // ユーザディレクトリは常に候補とする.
\r
192 File userDataDir = ConfigurationDirUtilities.getUserDataDir();
\r
193 saveFiles.add(new File(userDataDir, CONFIG_NAME));
\r
201 * 存在しないか、読み取りに失敗した場合は、該当ファイルはスキップされる.<br>
\r
203 public void loadConfig() {
\r
204 Properties config = new Properties();
\r
206 for (URI uri : getCandidateURIs()) {
\r
208 continue; // リソースがない場合はnullになる
\r
210 // ファイルの実在チェック (チェックできる場合のみ)
\r
211 if ("file".equals(uri.getScheme())) {
\r
212 File file = new File(uri);
\r
213 if (!file.exists()) {
\r
214 logger.log(Level.CONFIG, "appConfig.xml is not found.:" + file);
\r
218 // appConfig.xmlの読み込みを行う.
\r
219 // Properties#loadFromXML() はXMLからキーを読み取り、既存のキーに対して上書きする.
\r
220 // XMLに存在しないキーは読み込み前のままなので、繰り返し呼び出すことで「重ね合わせ」することができる.
\r
222 URL resourceURL = uri.toURL();
\r
223 InputStream is = resourceURL.openStream();
\r
225 config.loadFromXML(is);
\r
226 logger.log(Level.CONFIG, "appConfig.xml is loaded.:" + uri);
\r
231 } catch (FileNotFoundException ex) {
\r
232 logger.log(Level.CONFIG, "appConfig.xml is not found.: " + uri, ex);
\r
233 // 無視する (無い場合は十分にありえるので「情報」レベルでログ。)
\r
234 } catch (Exception ex) {
\r
235 logger.log(Level.WARNING, "appConfig.xml loading failed.: " + uri, ex);
\r
240 } catch (IOException ex) {
\r
241 throw new RuntimeException("appConfig.xml loading failed.", ex);
\r
242 } catch (RuntimeException ex) {
\r
243 throw new RuntimeException("appConfig.xml loading failed.", ex);
\r
245 BeanPropertiesUtilities.loadFromProperties(this, config);
\r
249 * プロパティをアプリケーションデータの指定した保存先に保存する.
\r
251 * @throws IOException
\r
254 public void saveConfig(List<File> prioritySaveFiles) throws IOException {
\r
255 Properties config = getProperties();
\r
256 IOException oex = null;
\r
257 for (File configStore : prioritySaveFiles) {
\r
259 OutputStream os = new BufferedOutputStream(
\r
260 new FileOutputStream(configStore));
\r
262 config.storeToXML(os, CONFIG_NAME, "UTF-8");
\r
263 return; // 成功した時点で終了
\r
269 } catch (IOException ex) {
\r
270 logger.log(Level.WARNING, "アプリケーション設定の保存に失敗しました" + ex, ex);
\r
275 // 例外が発生していれば、最後の例外を返す.
\r
282 * プロパティをアプリケーションデータの保存先に保存する.
\r
284 * @throws IOException
\r
287 public void saveConfig() throws IOException {
\r
288 saveConfig(getPrioritySaveFileList());
\r
292 * Propertiesの値を設定した場合に設定できない項目があるかチェックする.<br>
\r
293 * このメソッドを呼び出しても、アプリケーション設定自身は何も影響されない.<br>
\r
297 * @return 設定できなかったプロパティキーのコレクション、問題なければ空が返される.
\r
299 public static Set<String> checkProperties(Properties props) {
\r
300 if (props == null) {
\r
301 throw new IllegalArgumentException();
\r
303 AppConfig dummy = new AppConfig(); // アプリケーションから参照されないダミーのインスタンスを作成する.
\r
304 return BeanPropertiesUtilities.loadFromProperties(dummy, props);
\r
308 * Propertiesの値で設定を更新する.<br>
\r
312 * @return 設定できなかったプロパティキーのコレクション、問題なければ空が返される.
\r
314 public Set<String> update(Properties props) {
\r
315 if (props == null) {
\r
316 throw new IllegalArgumentException();
\r
318 return BeanPropertiesUtilities.loadFromProperties(this, props);
\r
322 * このアプリケーション設定をプロパティに書き出して返します.<br>
\r
326 public Properties getProperties() {
\r
327 Properties config = new Properties();
\r
328 BeanPropertiesUtilities.saveToProperties(this, config);
\r
334 * プロファイル選択ダイアログのプロファイルのサンプルイメージの背景色
\r
336 * @return サンプルイメージの背景色
\r
338 public Color getSampleImageBgColor() {
\r
339 return sampleImageBgColor;
\r
342 public void setSampleImageBgColor(Color sampleImageBgColor) {
\r
343 if (sampleImageBgColor == null) {
\r
344 throw new IllegalArgumentException();
\r
346 this.sampleImageBgColor = sampleImageBgColor;
\r
349 private Color sampleImageBgColor = Color.white;
\r
353 * デフォルトのイメージ背景色を取得する.
\r
355 * @return デフォルトのイメージ背景色
\r
357 public Color getDefaultImageBgColor() {
\r
358 return defaultImageBgColor;
\r
361 public void setDefaultImageBgColor(Color defaultImageBgColor) {
\r
362 if (defaultImageBgColor == null) {
\r
363 throw new IllegalArgumentException();
\r
365 this.defaultImageBgColor = defaultImageBgColor;
\r
368 private Color defaultImageBgColor = Color.white;
\r
371 * 使用中アイテムの背景色を取得する.
\r
373 * @return 使用中アイテムの背景色
\r
375 public Color getCheckedItemBgColor() {
\r
376 return checkedItemBgColor;
\r
379 public void setCheckedItemBgColor(Color checkedItemBgColor) {
\r
380 if (checkedItemBgColor == null) {
\r
381 throw new IllegalArgumentException();
\r
383 this.checkedItemBgColor = checkedItemBgColor;
\r
386 private Color checkedItemBgColor = Color.cyan.brighter();
\r
392 * @return 選択アイテムの背景色
\r
394 public Color getSelectedItemBgColor() {
\r
395 return selectedItemBgColor;
\r
398 public void setSelectedItemBgColor(Color selectedItemBgColor) {
\r
399 this.selectedItemBgColor = selectedItemBgColor;
\r
402 private Color selectedItemBgColor = Color.orange;
\r
405 * 不備のあるデータ行の背景色を取得する.
\r
407 * @return 不備のあるデータ行の背景色
\r
409 public Color getInvalidBgColor() {
\r
410 return invalidBgColor;
\r
413 public void setInvalidBgColor(Color invalidBgColor) {
\r
414 if (invalidBgColor == null) {
\r
415 throw new IllegalArgumentException();
\r
417 this.invalidBgColor = invalidBgColor;
\r
420 private Color invalidBgColor = Color.red.brighter().brighter();
\r
423 * JPEG画像変換時の圧縮率を取得する.
\r
427 public float getCompressionQuality() {
\r
428 return compressionQuality;
\r
431 public void setCompressionQuality(float compressionQuality) {
\r
432 if (compressionQuality < .1f || compressionQuality > 1f) {
\r
433 throw new IllegalArgumentException();
\r
435 this.compressionQuality = compressionQuality;
\r
438 private float compressionQuality = .8f;
\r
441 * エクスポートウィザードのプリセットにパーツ不足時の警告色(前景色)を取得する.
\r
443 * @return エクスポートウィザードのプリセットにパーツ不足時の警告色(前景色)
\r
445 public Color getExportPresetWarningsForegroundColor() {
\r
446 return exportPresetWarningsForegroundColor;
\r
449 public void setExportPresetWarningsForegroundColor(
\r
450 Color exportPresetWarningsForegroundColor) {
\r
451 this.exportPresetWarningsForegroundColor = exportPresetWarningsForegroundColor;
\r
454 private Color exportPresetWarningsForegroundColor = Color.red;
\r
457 * JARファイル転送用バッファサイズ.<br>
\r
459 * @return JARファイル転送用バッファサイズ.
\r
461 public int getJarTransferBufferSize() {
\r
462 return jarTransferBufferSize;
\r
465 public void setJarTransferBufferSize(int jarTransferBufferSize) {
\r
466 if (jarTransferBufferSize <= 0) {
\r
467 throw new IllegalArgumentException();
\r
469 this.jarTransferBufferSize = jarTransferBufferSize;
\r
472 private int jarTransferBufferSize = 4096;
\r
475 * ZIPファイル名のエンコーディング.<br>
\r
477 * @return ZIPファイル名のエンコーディング.<br>
\r
479 public String getZipNameEncoding() {
\r
480 return zipNameEncoding;
\r
483 public void setZipNameEncoding(String zipNameEncoding) {
\r
484 if (zipNameEncoding == null) {
\r
485 throw new IllegalArgumentException();
\r
488 Charset.forName(zipNameEncoding);
\r
489 } catch (Exception ex) {
\r
490 throw new RuntimeException("unsupported charset: " + zipNameEncoding);
\r
492 this.zipNameEncoding = zipNameEncoding;
\r
495 private String zipNameEncoding = "csWindows31J";
\r
498 * ディセーブルなテーブルのセルのフォアグラウンドカラーを取得する.
\r
500 * @return ディセーブルなテーブルのセルのフォアグラウンドカラー
\r
502 public Color getDisabledCellForgroundColor() {
\r
503 return disabledCellForegroundColor;
\r
506 public void setDisabledCellForegroundColor(Color disabledCellForegroundColor) {
\r
507 if (disabledCellForegroundColor == null) {
\r
508 throw new IllegalArgumentException();
\r
510 this.disabledCellForegroundColor = disabledCellForegroundColor;
\r
513 private Color disabledCellForegroundColor = Color.gray;
\r
517 * ディレクトリを監視する間隔(mSec)を取得する.
\r
519 * @return ディレクトリを監視する間隔(mSec)
\r
521 public int getDirWatchInterval() {
\r
522 return dirWatchInterval;
\r
525 public void setDirWatchInterval(int dirWatchInterval) {
\r
526 if (dirWatchInterval <= 0) {
\r
527 throw new IllegalArgumentException();
\r
529 this.dirWatchInterval = dirWatchInterval;
\r
532 private int dirWatchInterval = 7 * 1000;
\r
535 * ディレクトリの監視を有効にするか?
\r
537 * @return ディレクトリの監視を有効にする場合はtrue
\r
539 public boolean isEnableDirWatch() {
\r
540 return enableDirWatch;
\r
543 public void setEnableDirWatch(boolean enableDirWatch) {
\r
544 this.enableDirWatch = enableDirWatch;
\r
547 private boolean enableDirWatch = true;
\r
550 * ファイル転送に使うバッファサイズ.<br>
\r
554 public int getFileTransferBufferSize() {
\r
555 return fileTransferBufferSize;
\r
558 public void setFileTransferBufferSize(int fileTransferBufferSize) {
\r
559 if (fileTransferBufferSize <= 0) {
\r
560 throw new IllegalArgumentException();
\r
562 this.fileTransferBufferSize = fileTransferBufferSize;
\r
565 private int fileTransferBufferSize = 4096;
\r
568 * プレビューのインジケータを表示するまでのディレイ(mSec)を取得する.
\r
570 * @return プレビューのインジケータを表示するまでのディレイ(mSec)
\r
572 public long getPreviewIndicatorDelay() {
\r
573 return previewIndeicatorDelay;
\r
576 public void setPreviewIndeicatorDelay(long previewIndeicatorDelay) {
\r
577 if (previewIndeicatorDelay < 0) {
\r
578 throw new IllegalArgumentException();
\r
580 this.previewIndeicatorDelay = previewIndeicatorDelay;
\r
583 private long previewIndeicatorDelay = 300;
\r
586 * 情報ダイアログの編集ボタンを「開く」アクションにする場合はtrue、「編集」アクションにする場合はfalse
\r
588 * @return trueならばOpen、falseならばEdit
\r
590 public boolean isInformationDialogOpenMethod() {
\r
591 return informationDialogOpenMethod;
\r
594 public void setInformationDialogOpenMethod(
\r
595 boolean informationDialogOpenMethod) {
\r
596 this.informationDialogOpenMethod = informationDialogOpenMethod;
\r
599 private boolean informationDialogOpenMethod = true;
\r
603 * falseの場合は{@link ApplicationLogHandler}の実装に従って終了時に 必要なければログは削除される.<br>
\r
605 * @return 常に残す場合はtrue、そうでなければfalse
\r
607 public boolean isNoRemoveLog() {
\r
608 return noRemoveLog;
\r
611 public void setNoRemoveLog(boolean noRemoveLog) {
\r
612 this.noRemoveLog = noRemoveLog;
\r
615 private boolean noRemoveLog = false;
\r
621 * @return テーブルのグリッド色
\r
623 public Color getGridColor() {
\r
627 public void setGridColor(Color gridColor) {
\r
628 if (gridColor == null) {
\r
629 throw new IllegalArgumentException();
\r
631 this.gridColor = gridColor;
\r
634 private Color gridColor = Color.gray;
\r
637 * カラーダイアログの値が変更されたら、自動的にプレビューを更新するか?
\r
639 * @return カラーダイアログの値が変更されたら、自動的にプレビューを更新する場合はtrue (デフォルトはtrue)
\r
641 public boolean isEnableAutoColorChange() {
\r
642 return enableAutoColorChange;
\r
645 public void setEnableAutoColorChange(boolean enableAutoColorChange) {
\r
646 this.enableAutoColorChange = enableAutoColorChange;
\r
649 private boolean enableAutoColorChange = true;
\r
651 public void setAuthorEditConflictBgColor(Color authorEditConflictBgColor) {
\r
652 if (authorEditConflictBgColor == null) {
\r
653 throw new IllegalArgumentException();
\r
655 this.authorEditConflictBgColor = authorEditConflictBgColor;
\r
659 * パーツの作者編集時に複数作者を選択した場合のに入力ボックスの背景色
\r
663 public Color getAuthorEditConflictBgColor() {
\r
664 return authorEditConflictBgColor;
\r
667 Color authorEditConflictBgColor = Color.yellow;
\r
670 public void setMainFrameMaxWidth(int width) {
\r
671 this.mainFrameMaxWidth = width;
\r
675 * メインフレームの初期表示時の最大幅
\r
677 * @return メインフレームの初期表示時の最大幅
\r
679 public int getMainFrameMaxWidth() {
\r
680 return mainFrameMaxWidth;
\r
683 private int mainFrameMaxWidth = 800;
\r
685 public void setMainFrameMaxHeight(int height) {
\r
686 this.mainFrameMaxHeight = height;
\r
690 * メインフレームの初期表示時の最大高さ
\r
692 * @return メインフレームの初期表示時の最大高さ
\r
694 public int getMainFrameMaxHeight() {
\r
695 return mainFrameMaxHeight;
\r
698 private int mainFrameMaxHeight = 600;
\r
702 * カラーダイアログで存在しないレイヤーをディセーブルにしない.
\r
704 * @return ディセーブルにしない場合はtrue
\r
706 public boolean isNotDisableLayerTab() {
\r
707 return notDisableLayerTab;
\r
710 public void setNotDisableLayerTab(boolean notDisableLayerTab) {
\r
711 this.notDisableLayerTab = notDisableLayerTab;
\r
714 private boolean notDisableLayerTab;
\r
719 * この指定日を経過した古いログは削除される.<br>
\r
724 public long getPurgeLogDays() {
\r
725 return purgeLogDays;
\r
728 public void setPurgeLogDays(long purgeLogDays) {
\r
729 this.purgeLogDays = purgeLogDays;
\r
732 private long purgeLogDays = 10;
\r
734 public String getPartsColorGroupPattern() {
\r
735 return partsColorGroupPattern;
\r
738 public void setPartsColorGroupPattern(String pattern) {
\r
739 if (pattern != null && pattern.trim().length() > 0) {
\r
740 Pattern.compile(pattern);
\r
742 partsColorGroupPattern = pattern;
\r
745 private String partsColorGroupPattern = "^.*\\(@\\).*$";
\r
747 private Color selectPanelTitleColor = Color.BLUE;
\r
749 public Color getSelectPanelTitleColor() {
\r
750 return selectPanelTitleColor;
\r
753 public void setSelectPanelTitleColor(Color color) {
\r
754 if (color == null) {
\r
755 throw new IllegalArgumentException();
\r
757 selectPanelTitleColor = color;
\r
760 private boolean enableAutoShrinkPanel;
\r
762 public boolean isEnableAutoShrinkPanel() {
\r
763 return enableAutoShrinkPanel;
\r
766 public void setEnableAutoShrinkPanel(boolean enableAutoShrinkPanel) {
\r
767 this.enableAutoShrinkPanel = enableAutoShrinkPanel;
\r
770 public boolean isDisableWatchDirIfNotWritable() {
\r
771 return disableWatchDirIfNotWritable;
\r
774 public void setDisableWatchDirIfNotWritable(boolean disableWatchDirIfNotWritable) {
\r
775 this.disableWatchDirIfNotWritable = disableWatchDirIfNotWritable;
\r
778 private boolean disableWatchDirIfNotWritable = true;
\r
780 public void setEnablePNGSupportForWindows(boolean enablePNGSupportForWindows) {
\r
781 this.enablePNGSupportForWindows = enablePNGSupportForWindows;
\r
784 public boolean isEnablePNGSupportForWindows() {
\r
785 return enablePNGSupportForWindows;
\r
788 private boolean enablePNGSupportForWindows = true;
\r
791 * 画像表示(通常モード)でオプティマイズを有効にする最大倍率.
\r
793 private double renderingOptimizeThresholdForNormal = 2.;
\r
795 public void setRenderingOptimizeThresholdForNormal(
\r
796 double renderingOptimizeThresholdForNormal) {
\r
797 this.renderingOptimizeThresholdForNormal = renderingOptimizeThresholdForNormal;
\r
800 public double getRenderingOptimizeThresholdForNormal() {
\r
801 return renderingOptimizeThresholdForNormal;
\r
804 * 画像表示(チェックモード)でオプティマイズを有効にする最大倍率.
\r
806 private double renderingOptimizeThresholdForCheck = 0.;
\r
808 public void setRenderingOptimizeThresholdForCheck(
\r
809 double renderingOptimizeThresholdForCheck) {
\r
810 this.renderingOptimizeThresholdForCheck = renderingOptimizeThresholdForCheck;
\r
813 public double getRenderingOptimizeThresholdForCheck() {
\r
814 return renderingOptimizeThresholdForCheck;
\r
818 * バイキュービックをサポートする場合
\r
820 private boolean enableInterpolationBicubic = true;
\r
822 public void setEnableInterpolationBicubic(boolean enableInterpolationBicubic) {
\r
823 this.enableInterpolationBicubic = enableInterpolationBicubic;
\r
826 public boolean isEnableInterpolationBicubic() {
\r
827 return enableInterpolationBicubic;
\r
833 private String predefinedZoomRanges = "20, 50, 80, 100, 120, 150, 200, 300, 400, 800";
\r
835 public String getPredefinedZoomRanges() {
\r
836 return predefinedZoomRanges;
\r
839 public void setPredefinedZoomRanges(String predefinedZoomRanges) {
\r
840 this.predefinedZoomRanges = predefinedZoomRanges;
\r
844 * ズームパネルを初期状態で表示するか?
\r
846 private boolean enableZoomPanel = true;
\r
848 public boolean isEnableZoomPanel() {
\r
849 return enableZoomPanel;
\r
852 public void setEnableZoomPanel(boolean enableZoomPanel) {
\r
853 this.enableZoomPanel = enableZoomPanel;
\r
857 * ズームパネルをアクティブにする下部範囲
\r
859 private int zoomPanelActivationArea = 30;
\r
861 public int getZoomPanelActivationArea() {
\r
862 return zoomPanelActivationArea;
\r
865 public void setZoomPanelActivationArea(int zoomPanelActivationArea) {
\r
866 this.zoomPanelActivationArea = zoomPanelActivationArea;
\r
872 private boolean enableRenderingHints = true;
\r
874 public void setEnableRenderingHints(boolean enableRenderingHints) {
\r
875 this.enableRenderingHints = enableRenderingHints;
\r
878 public boolean isEnableRenderingHints() {
\r
879 return enableRenderingHints;
\r
885 private int drawGridMask = 2;
\r
887 public int getDrawGridMask() {
\r
888 return drawGridMask;
\r
891 public void setDrawGridMask(int drawGridMask) {
\r
892 this.drawGridMask = drawGridMask & 0x03;
\r
895 private int previewGridColor = 0x7f7f0000;
\r
897 public int getPreviewGridColor() {
\r
898 return previewGridColor;
\r
901 public void setPreviewGridColor(int previewGridColor) {
\r
902 this.previewGridColor = previewGridColor;
\r
905 private int previewGridSize = 20;
\r
907 public int getPreviewGridSize() {
\r
908 return previewGridSize;
\r
911 public void setPreviewGridSize(int previewGridSize) {
\r
912 this.previewGridSize = previewGridSize;
\r
916 * チェックモード時の余白サイズ(片側)
\r
918 private int previewUnfilledSpaceForCheckMode = 0;
\r
920 public int getPreviewUnfilledSpaceForCheckMode() {
\r
921 return previewUnfilledSpaceForCheckMode;
\r
924 public void setPreviewUnfilledSpaceForCheckMode(
\r
925 int previewUnfilledSpaceForCheckMode) {
\r
926 this.previewUnfilledSpaceForCheckMode = previewUnfilledSpaceForCheckMode;
\r
930 * チェックモードでツールチップを表示するか?
\r
932 private boolean enableCheckInfoTooltip = true;
\r
934 public boolean isEnableCheckInfoTooltip() {
\r
935 return enableCheckInfoTooltip;
\r
938 public void setEnableCheckInfoTooltip(boolean enableCheckInfoTooltip) {
\r
939 this.enableCheckInfoTooltip = enableCheckInfoTooltip;
\r
943 * ホイールによるスクロールの単位.<br>
\r
945 private int wheelScrollUnit = 10;
\r
947 public int getWheelScrollUnit() {
\r
948 return wheelScrollUnit;
\r
951 public void setWheelScrollUnit(int wheelScrollUnit) {
\r
952 this.wheelScrollUnit = wheelScrollUnit;
\r
956 * 壁紙にオフスクリーン描画を使用するか?.<br>
\r
957 * (あまり劇的なパフォーマンス効果はない.)
\r
959 private boolean enableOffscreenWallpaper = false;
\r
961 public boolean isEnableOffscreenWallpaper() {
\r
962 return enableOffscreenWallpaper;
\r
965 public void setEnableOffscreenWallpaper(boolean enableOffscreenWallpaper) {
\r
966 this.enableOffscreenWallpaper = enableOffscreenWallpaper;
\r
970 * 壁紙のオフスクリーンの既定サイズ.
\r
972 private int offscreenWallpaperSize = 300;
\r
974 public int getOffscreenWallpaperSize() {
\r
975 return offscreenWallpaperSize;
\r
978 public void setOffscreenWallpaperSize(int offscreenWallpaperSize) {
\r
979 this.offscreenWallpaperSize = offscreenWallpaperSize;
\r