+ this.targetCd = current;
+ if (targetCd != null && !targetCd.getDocBase().getScheme().equals("file")) {
+ throw new IllegalArgumentException("ファイルベース以外のキャラクターデータにインポートできません");
+ }
+ if (targetCd != null && !targetCd.isValid()) {
+ throw new IllegalArgumentException("妥当でないキャラクターデータにはインポートできません");
+ }
+ initComponent();
+ }
+
+ /**
+ * インポート先のキャラクターデータを返す。新規の場合はnull
+ * @return インポート先、新規の場合はnull
+ */
+ public CharacterData getTargetCharacterData() {
+ if (targetCd != null && !targetCd.getDocBase().getScheme().equals("file")) {
+ throw new IllegalStateException("ファイルベース以外のキャラクターデータにインポートできません: " + targetCd);
+ }
+ return targetCd;