TITLE:JDK 7 - Javadoc
#navi(../)
RIGHT:Posted by &author(aterai); at 2012-06-29

* JDK 7 [#aaef0394]
#contents

* 概要 [#z7536f0d]
- Java SE 7 API のドキュメント翻訳プロジェクトについて
-- [http://yoshio3.com/2012/04/11/new-link-of-javase-api-reference/ 続:旧 Java SE API リファレンスへの新しいリンク先変更について « 寺田 佳央 – Yoshio Terada]から引用
 また、Java SE 7 API のドキュメント翻訳プロジェクトにつきましては、諸事情がございまして、5月中旬位まで御待ち頂けませんでしょうか。5月中旬移行に本件についてのアップデートをさせて頂きたいと考えております。

-- 重箱の隅:「5月中旬%%移行%%以降」

上の翻訳プロジェクトはどうなるのか不明だし、個人的に興味があるというか必要なのは Swing 関係だけなので、「諸事情」などは無視して勝手(自分用だし)に翻訳することにしました。誤訳や、用語の一貫性などはあまり気にしていません。おかしな訳が気になる場合は、右上の「このページを編集する」から自由(適当)に修正してください。

- Java SE 7 API 日本語版提供開始
-- [http://yoshio3.com/2013/05/14/ Java SE7API日本語版提供開始 | 寺田 佳央 - Yoshio Terada]から引用
 2013 年 5 月 14 日、日本オラクルより新しい発表を行います。本日 5 月 14 日に日本語版 Java SE API ドキュメントを正式公開しました。

-- 「5月中旬移行」の5月とは、一年後のことだったのか…。
-- 翻訳されているクラスと英語のままのクラスの違いが分からない。

* クラス [#w1bf0b2c]
** JLayer [#gce3ad95]
[http://docs.oracle.com/javase/7/docs/api/javax/swing/JLayer.html JLayer (Java Platform SE 7 )]

- JLayer is a universal decorator for Swing components which enables you to implement various advanced painting effects as well as receive notifications of all AWTEvents generated within its borders.
- JLayerは、Swingコンポーネントのための普遍的なデコレータであり、様々な高度なペイント効果を実装するだけでなく、その境界内に生成されたすべてのAWTEventsの通知を受け取ることができます。

- JLayer delegates the handling of painting and input events to a LayerUI object, which performs the actual decoration.
- JLayerは描画と入力イベントの処理をLayerUIオブジェクトに移譲し、そしてそれが実際の装飾を実行します。

- The custom painting implemented in the LayerUI and events notification work for the JLayer itself and all its subcomponents.
- LayerUIで実装されるカスタム描画とイベント通知は、JLayer自体とそのすべての下位コンポーネントのために働きます。

- This combination enables you to enrich existing components by adding new advanced functionality such as temporary locking of a hierarchy, data tips for compound components, enhanced mouse scrolling etc and so on.
- この組み合わせは、新しい先進的な機能、例えば階層の一時ロックや、複合コンポーネント用のデータヒント、強化されたマウスのスクロールなどを、既存のコンポーネントに追加して豊かにすることができます。

- JLayer is a good solution if you only need to do custom painting over compound component or catch input events from its subcomponents.
- 複合コンポーネント上にカスタム描画を行ったり、そのサブコンポーネントからの入力イベントをキャッチする必要があるだけなら、JLayerは良いソリューションです。

- Note: JLayer doesn't support the following methods:
- 注: JLayerは、以下のメソッドをサポートしません:

- using any of of them will cause UnsupportedOperationException to be thrown, to add a component to JLayer use setView(Component) or setGlassPane(JPanel).
-- typo: any of of them
- それらを使用すると、UnsupportedOperationExceptionが発生します。JLayerにコンポーネントを追加する場合は setView(Component) か setGlassPane(JPanel) を使用します。

** LayerUI [#a013ac39]
[http://docs.oracle.com/javase/7/docs/api/javax/swing/plaf/LayerUI.html LayerUI (Java Platform SE 7 )]

- The base class for all JLayer's UI delegates.
- すべてのJLayerのUI委譲の基本クラスです。

- paint(java.awt.Graphics, javax.swing.JComponent) method performs the painting of the JLayer and eventDispatched(AWTEvent, JLayer) method is notified about any AWTEvents which have been generated by a JLayer or any of its subcomponents.
- paint(java.awt.Graphics, javax.swing.JComponent)メソッドは、JLayerの描画を実行し、eventDispatched(AWTEvent, JLayer)メソッドは、JLayer、またはそのサブコンポーネントによって生成された任意のAWTEventsの通知を受け取ります。

- The LayerUI differs from the UI delegates of the other components, because it is LookAndFeel independent and is not updated by default when the system LookAndFeel is changed.
- LayerUIは、他のコンポーネントのUI委譲とは異なり、LookAndFeelから独立であり、システムのLook&Feelが変更されてもデフォルトでは更新されません。

- The subclasses of LayerUI can either be stateless and shareable by multiple JLayers or not shareable.
- LayerUIのサブクラスをステートレスにして複数JLayersで共有することも可能ですが、共有しなくても構いません。

** SecondaryLoop [#nfd0cb3f]
[http://docs.oracle.com/javase/7/docs/api/java/awt/SecondaryLoop.html SecondaryLoop (Java Platform SE 7 )]

- A helper interface to run the nested event loop.
- 入れ子になったイベントループを実行するヘルパーインターフェースです。

- Objects that implement this interface are created with the EventQueue.createSecondaryLoop() method.
- このインターフェイスを実装するオブジェクトは、EventQueue.createSecondaryLoop()メソッドを使用して作成されます。

- The interface provides two methods, enter() and exit(), which can be used to start and stop the event loop.
- このインタフェースは、enter() と exit() の2つのメソッドを提供し、イベントループを起動、停止するために使用することができます。

- When the enter() method is called, the current thread is blocked until the loop is terminated by the exit() method.
- enter() メソッドが呼び出されると、ループが exit() メソッドによって終了されるまで現在のスレッドはブロックされます。

- Also, a new event loop is started on the event dispatch thread, which may or may not be the current thread.
- また、新しいイベントループがイベントディスパッチスレッド上で開始されます(それがカレントスレッドかどうかは不明)。

- The loop can be terminated on any thread by calling its exit() method.
- ループは、exit() メソッドを呼び出すことによって、任意のスレッド上から終了することができます。

- After the loop is terminated, the SecondaryLoop object can be reused to run a new nested event loop.
- ループが終了した後、SecondaryLoop オブジェクトは新しい入れ子になったイベントループを実行するために再利用することが可能です。

- A typical use case of applying this interface is AWT and Swing modal dialogs.
- このインターフェースの典型的な使用例は、AWTとSwingのモーダルダイアログです。

- When a modal dialog is shown on the event dispatch thread, it enters a new secondary loop.
- モーダルダイアログがイベントディスパッチスレッド上で表示されたら、それは新しい二次ループに入ります。

- Later, when the dialog is hidden or disposed, it exits the loop, and the thread continues its execution.
- その後、ダイアログが非表示または破棄されると、ループを終了し、スレッドは実行を継続します。

- The following example illustrates a simple use case of secondary loops:
- 以下の例は、第二のループの単純な使用例を示しています:

** StrokeBorder [#t74328b1]
[http://docs.oracle.com/javase/7/docs/api/javax/swing/border/StrokeBorder.html StrokeBorder (Java Platform SE 7 )]

- A class which implements a border of an arbitrary stroke.
- 任意のストロークのボーダーを実装するクラスです。

* コメント [#cd808963]
#comment