Next:
はじめに
Up:
Java BeansとJDK1.1
Previous:
Java BeansとJDK1.1
Contents
はじめに
classからbeanへ
beanを特徴づけるもの
本書で学ぶこと
JDK1.1のイベント・モデル
これまでのモデル
上位のContainerでまとめて処理
個々のComponentでイベント処理
これまでのモデルのまとめ
Listener の導入
イベントの「受け手」--- Listener
イベントの「送り手」 --- Listenerの登録
新しいイベント・クラス
Adapterの利用
無名のListener
Naming rulesのまとめ
イベントの送り出しとメソッドの呼び出し
java.awt.AWTEventMulticaster クラス
Buttonクラスでの利用例
変数のInterface宣言の意味
オブジェクトの表記(dot notation)
ButtonクラスでのAddActionListener
ButtonクラスでのActionイベント処理
ActionEvent以外のイベント処理
ButtonクラスでのremoveActionListener
Bean's PropertyとPropertyChangeEvent
二つのProperty概念
java.beansパッケージとProperty
PropertyChangeEvent
イベントの名前を決める
イベント・オブジェクトを作る
Listenerを定義する
Supportクラスを作る
イベントの送り出し
Adapter --- イベントの受け手
Reflection
reflection と introspection
Reflectionの三つの働き
Field、Method, Constructorの獲得
getField,getMethod, getConstructor
引数の型の指定
フィールドの値の獲得と設定
メソッドの呼び出しと引数の指定
コンストラクタの呼び出し
サンプル
BeanInfo
様々のDescriptor
PropertyDescriptor
PropertyDescriptorとIntrospection
Propertyを定義するには?
EventSetDescriptor
EventSetDescriptorとIntrospection
MethodDescriptor
BeanInfoからの情報の獲得
クラスとBeans
BeanInfoはどう探されるのか?
BeanInfoクラスの利用
OurButtonとExplicitButton
Propertyの記述
customizerの指定
イベントの記述
アイコンの指定
Bound Property と Constrained Property
プロパティをbindする
二つのボタンの背景色を同じにする
BeanBoxでのProperty Bind
doBindメソッド
PropertyNameDialog
PropertyHookupクラス
propertyChangeメソッドの呼び出し
Constrained Property
VetoableChangeSupport
イベントの送り直し
PropertyVetoExceptionとVoterサンプル
JellyBeanのsetPriceInCents
BeanBoxの動的なイベント処理
Jugglerにstopボタンをつける
BeanBox Eventsメニューの構成
メソッドの選択とwiring
hookupメソッドの呼び出し
単純でstaticなモデル
staticなAdapterクラスの利用
プログラム中でのプログラムの生成
reflection
hookupメソッドの動的な働き
クラスとインスタンスの動的な生成
メソッドの動的な起動 --- invokeメソッド
Property Editor
PropertySheetは、どのように作られるか?
PropertyEditorSupport
PropertyEditorManager
BeanInfoとエディタの設定
Serialization
簡単なサンプル
オブジェクトを「保存」「復元」するとは?
プリミティブ・タイプの場合
フィールドの値の保存・復元
ObjectStreamClass
writeObjectメソッド
readObjectメソッド
自前のメソッド
BeanBoxでのSerファイルの利用
copy
cut
paste
save
load
Class LoaderとJar Fileの利用
基本的なクラスの生成
ClassLoaderクラス
defineClass()
resolveClass()
findSystemClass()
loadClass()
実行例
BeanBoxのSimpleClassLoader
applyDefinition
JarLoaderのloadJar
applyDefinitionsのside effect
JARファイル
AppletでのJARファイルの利用
Jar コマンド
Manifest ファイル
Digest
beansとmanifestファイル
BeanBoxでのJARファイルの利用
JDK1.1での日本語処理
Java String
Cの文字列とJava Stringクラス
Javaでのbyteとcharの区別
Converterクラス
Default Encoding
Stringとchar[],byte[]
Readerクラス と Writerクラス
開発済みのアプリケーションの日本語対応への移行
変更の必要のない例
DataInputStreamとPrintStreamを置き換える
StreamTokenizerの日本語対応
プラットフォームに依存しない日本語対応
ソース・ファイルとデータ・ファイル
Unicodeをめぐって
サンプル
StreamTokenizer サンプル
Converterを作る
Beans 作成サンプル
何が必要か
MyButtonサンプル
MultiBeans サンプル
NotVisible サンプル
BeanInfo サンプル
MyViewerサンプル
MyViewerBeanInfo
実習環境について
UNIX環境
PC環境
ログインとパスワード登録
ネットワークへの接続
JavaBeans開発環境の構築
いくつかの留意事項
About this document ...
maruyama@wakhok.ac.jp