⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectionlistener.java

📁 具有不同语法高亮的编辑器实例
💻 JAVA
字号:
package org.fife.ui.rtextfilechooser;

import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;


/**
 * Listens for the user selecting files in both the list mode and details mode.
 * This class can be used by any subclass of <code>RTextFileChooserView</code>
 * as its list selection listener, if it implements a list.
 *
 * @author Robert Futrell
 * @version 1.0
 */
class SelectionListener implements ListSelectionListener {

	private RTextFileChooser chooser;


/*****************************************************************************/


	/**
	 * Constructor.
	 *
	 * @param chooser The file chooser.
	 */
	public SelectionListener(RTextFileChooser chooser) {
		this.chooser = chooser;
	}


/*****************************************************************************/


	/**
	 * Called when the list's selection changes.  This method udpates the
	 * file name and encoding text fields to be in-synch with the view's
	 * selection.
	 *
	 * @param e The selection event.
	 */
	public void valueChanged(ListSelectionEvent e) {
		if (!e.getValueIsAdjusting()) {
			chooser.synchronizeTextFieldWithView();
			chooser.updateSelectedEncoding();
		}
	}


/*****************************************************************************/

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -