IlvSeeThroughInteractor を使用すると、現在のレイヤーの表示状態とは別に、地図の一部を一時的に見ることができます。これは、ユーザーはマウス・ボタンが押された状態で置かれているレイヤーの下にあるレイヤーをインタラクティブに見ることができるという意味です。
このインタラクターを使用して、ユーザーは地図上に正方形をドラッグし、このイテレーター用に登録されているレイヤーを表示することができます。 IlvSeeThroughConfigurationPanel が、レイヤーを Swing GUI でインタラクティブに選択できるようにデフォルトの設定ツールとして提供されています。
IlvSeeThroughInteractor seeThrough = new IlvSeeThroughInteractor(); // configure the interactor IlvSeeThroughConfigurationPanel panel = new IlvSeeThroughConfigurationPanel(manager, seeThrough); JOptionPane pane = new JOptionPane(); pane.setMessage(panel); JDialog dialog = pane.createDialog(view, title); panel.update(); dialog.setVisible(true); // attach to the view. view.setInteractor(seeThrough);
このインタラクターを作成して
IlvManagerView
に付加するために、以下のコードを使用することができます。