added japanese translation of java external object.
[scilab.git] / scilab / modules / external_objects_java / help / ja_JP / jimport.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 *
5 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6 * Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
7 *
8 * This file must be used under the terms of the CeCILL.
9 * This source file is licensed as described in the file COPYING, which
10 * you should have received as part of this distribution.  The terms
11 * are also available at
12 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
13 *
14 *
15 -->
16
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="ja" xml:id="jimport">
18     
19     <refnamediv>
20         
21         <refname>jimport</refname>
22         
23         <refpurpose>Javaクラスをインポートする</refpurpose>
24         
25     </refnamediv>
26     
27     <refsynopsisdiv>
28         
29         <title>呼び出し手順</title>
30         
31         <synopsis>
32             
33             jimport(className)
34             
35             cl = jimport(className, isAClassReturned)
36             
37         </synopsis>
38         
39     </refsynopsisdiv>
40     
41     <refsection>
42         
43         <title>パラメータ</title>
44         
45         <variablelist>
46             
47             <varlistentry>
48                 
49                 <term>className</term>
50                 
51                 <listitem>
52                     
53                     <para>クラス名を指定する文字列</para>
54                     
55                 </listitem>
56                 
57             </varlistentry>
58             
59             <varlistentry>
60                 
61                 <term>isAClassReturned</term>
62                 
63                 <listitem>
64                     
65                     <para>
66                         
67                         クラスオブジェクトを返すかどうかを示す論理値
68                         
69                     </para>
70                     
71                 </listitem>
72                 
73             </varlistentry>
74             
75         </variablelist>
76         
77     </refsection>
78     
79     <refsection>
80         
81         <title>説明</title>
82         
83         <para>
84             
85             クラスはclasspathにある必要があります
86             
87             (パッケージまたはディレクトリをJava classpathに追加するには,
88             
89             <link type="scilab" linkend="scilab.help/javaclasspath">javaclasspath</link>を使用してください).
90             
91         </para>
92         
93         <para>
94             
95             <literal>jimport("java.lang.String")</literal>の時, 
96             
97             Stringという名前のmlistがScilabスタック上に作成されます.
98             
99             作成されたmlistは_JClassに等価な型を有し,
100             
101             <literal>str = String.new("A Scilab String");</literal>のように
102             
103             新規オブジェクトをインスタンス化する際に使用されます.
104             
105             クラスの静的メソッドをコールすることが可能です.
106             
107         </para>
108         
109         <programlisting role="example"><![CDATA[
110                jimport java.lang.Math;
111                x=Math.random();
112                disp(x);
113                jremove Math x;
114       ]]></programlisting>
115         
116         <para>
117             
118             既存のScilab変数との混用を避けるため,
119             
120             第2引数 isAClassReturned を使用できます
121             
122         </para>
123         
124         <programlisting role="example"><![CDATA[
125                  String = "Hello";
126                  foo = jimport("java.lang.String", %f);
127                  obj = foo.new("A string...")
128                  jremove(obj);
129         ]]></programlisting>
130         
131         <para>
132             
133             <literal>jallowReloadClass</literal>関数で許可された場合,
134             
135             クラスをリロードできます.
136             
137         </para>
138         
139     </refsection>
140     
141     <refsection>
142         
143         <title>例</title>
144         
145         <programlisting role="example"><![CDATA[
146                jimport javax.swing.JFrame;
147                jimport javax.swing.JLabel;
148
149                jframe = JFrame.new("Hello World !! Window");
150                jlabel = JLabel.new("A JLabel containing ""Hello Wolrd""");
151                cp = jframe.getContentPane();
152                cp.add(jlabel);
153                jframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
154                jframe.pack();
155                jframe.setVisible(%t);
156                jremove jlabel cp jframe;
157       ]]></programlisting>
158         
159     </refsection>
160     
161     <refsection role="see also">
162         
163         <title>参照</title>
164         
165         <simplelist type="inline">
166             
167             <member>
168                 
169                 <link type="scilab" linkend="scilab.help/javaclasspath">javaclasspath</link>
170                 
171             </member>
172             
173             <member>
174                 
175                 <link linkend="jallowClassReloading">jallowClassReloading</link>
176                 
177             </member>
178             
179             <member>
180                 
181                 <link linkend="jremove">jremove</link>
182                 
183             </member>
184             
185         </simplelist>
186         
187     </refsection>
188     
189     <refsection>
190         
191         <title>履歴</title>
192         
193         <revhistory>
194             
195             <revision>
196                 
197                 <revnumber>5.5.0</revnumber>
198                 
199                 <revremark>
200                     
201                     関数が導入されました. 'JIMS'モジュールに基づきます.
202                     
203                     JIMSモジュールとの動作上の主な違いは,
204                     
205                     <link linkend="jautoUnwrap">jautoUnwrap</link>がデフォルトで
206                     
207                     有効になっていることです.
208                     
209                 </revremark>
210                 
211             </revision>
212             
213         </revhistory>
214         
215     </refsection>
216     
217 </refentry>
218