resultviewer.java
来自「自己用Java写的一个mp3文件改名的小工具」· Java 代码 · 共 63 行
JAVA
63 行
import java.util.Observable;
import java.util.Observer;
import java.awt.BorderLayout;
import javax.swing.JPanel;
/**
* Description of the Class
*
* @author kilo
* @created 2003年12月22日
*/
public abstract class ResultViewer
extends JPanel
implements Observer {
/**
* Description of the Field
*/
protected DataManager dataManager;
/**
* Constructor for the ResultViewer object
*
* @param d Description of the Parameter
* @exception NullPointerException Description of the Exception
*/
public ResultViewer( DataManager d )
throws NullPointerException {
super.setLayout( new BorderLayout() );
if ( d == null )
throw new NullPointerException();
dataManager = d;
dataManager.addObserver( this );
}
/**
* Gets the dataManager attribute of the ResultViewer object
*
* @return The dataManager value
*/
public final DataManager getDataManager() {
return dataManager;
}
/**
* Description of the Method
*
* @param observable Description of the Parameter
* @param object Description of the Parameter
*/
public final void update( Observable observable, Object object ) {
updateDisplay();
}
/**
* Description of the Method
*/
protected abstract void updateDisplay();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?