public class hiSDropTargetAdapter extends DropTargetAdapter
ファイルをテキスト要素にドラッグ&ドロップすると、
ファイルパスがセットされるようにするための補助クラス
です。
主に
L.set()
で属性として要素に与えるために使用します。
hiSwingのset属性設定時もこのクラスを使用しています。
// tfがTextField変数 // _testがイベントを受け取るActionListenerだとして L.set(tf=new JTextField(""),new Dimension(400,20), new hiSDropTargetAdapter(_test),_test)
修飾子とタイプ | フィールドと説明 |
---|---|
ActionListener |
actionListener |
static String |
protocol |
JComponent |
target |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
drop(DropTargetDropEvent e) |
static void |
setProtocol(String protcol_) |
dragEnter, dragExit, dragOver, dropActionChanged
public static String protocol
public JComponent target
public ActionListener actionListener
public static void setProtocol(String protcol_)
public void drop(DropTargetDropEvent e)