|
|
関連クラスの解説 (RectangleInsetsクラス) |
H.Kamifuji . |
RectangleInsetsクラスは上下左右の余白の量などを指定するために使用されるクラスです。 当ページでは、Linux CentOS7 の Gnome で動作テストしています。 現在(2023/04)では、JDK-20.0.1 にアップされています。一部、上位互換について、見直しを行っていきます。 |
|
RectangleInsetsクラスのクラス図は次のようになっています。 java.lang.Object | +- org.jfree.ui.RectangleInsets public class RectangleInsets extends java.lang.Object implements java.io.Serializable用意されているコンストラクタは次の3つです。
ではまず1番目のコンストラクタを見てみます。 RectangleInsets public RectangleInsets()Creates a new instance with all insets initialised to 1.0. 1番目のコンストラクタでは上下左右の大きさは1.0dに設定されます。 次に2番目のコンストラクタを見てみます。 RectangleInsets public RectangleInsets(double top, double left, double bottom, double right)Creates a new instance with the specified insets (as 'absolute' units). Parameters: top - the top insets. left - the left insets. bottom - the bottom insets. right - the right insets. 上左下右のそれぞれの大きさdouble型の値で指定します。 例えば次のように記述します。 RectangleInsets insets = new RectangleInsets(1d, 1d, 1d, 1d); |
|