带s的java类_java.awt 类 Insets - Java 中文参考手册

java.lang.Object

c8e9f4e075d37a0af332e4af80182959.gifjava.awt.Insets

所有已实现的接口:Serializable, Cloneable

public class Insetsextends Objectimplements Cloneable, Serializable

Insets 对象是容器边界的表示形式。它指定容器必须在其各个边缘留出的空间。这个空间可以是边界、空白空间或标题。

从以下版本开始:

JDK1.0

另请参见:LayoutManager,

Container,

序列化表格

字段摘要

int

bottom

底部的 inset。

int

left

左边的 inset。

int

right

右边的 inset。

int

top

顶部的 inset。

构造方法摘要

Insets(inttop,

intleft,

intbottom,

intright)

创建并初始化具有指定顶部、左边、底部、右边 inset 的新 Insets 对象。

方法摘要

Object

clone()

创建此对象的副本。

boolean

equals(Objectobj)

检查两个 insets 对象是否等价。

int

hashCode()

返回此 Insets 的哈希码。

void

set(inttop,

intleft,

intbottom,

intright)

将顶部、底部、左边和右边设置为指定值

String

toString()

返回此 Insets 对象的字符串表示。

从类 java.lang.Object 继承的方法

finalize, getClass, notify, notifyAll, wait, wait, wait

字段详细信息

top

public int top

顶部的 inset。将此值添加到长方形的 Top,以产生一个新的 Top 位置。

另请参见:clone()

left

public int left

左边的 inset。将此值添加到长方形的 Left,以产生一个新的 Left 边缘位置。

另请参见:clone()

bottom

public int bottom

底部的 inset。从长方形的 Bottom 减去此值,以产生一个新的 Bottom 位置。

另请参见:clone()

right

public int right

右边的 inset。从长方形的 Right 减去此值,以产生一个新的 Right 边缘位置。

另请参见:clone()

构造方法详细信息

Insets

public Insets(inttop,

intleft,

intbottom,

intright)

创建并初始化具有指定顶部、左边、底部、右边 inset 的新 Insets 对象。

参数:top – 顶部的 inset。left – 左边的 inset。bottom – 底部的 inset。right – 右边的 inset。

方法详细信息

set

public void set(inttop,

intleft,

intbottom,

intright)

将顶部、底部、左边和右边设置为指定值

参数:top – 顶部的 inset。left – 左边的 inset。bottom – 底部的 inset。right – 右边的 inset。从以下版本开始:

1.5

equals

public boolean equals(Objectobj)

检查两个 insets 对象是否等价。如果两个 Insets 实例的字段 top、left、bottom 和 right 四个整数值都相等,则它们是等价的。

覆盖:类 Object 中的 equals

参数:obj – 要与之比较的引用对象。返回:如果两个 insets 等价,则返回 true;否则返回 false。从以下版本开始:

JDK1.1

另请参见:Object.hashCode(),

Hashtable

hashCode

public int hashCode()

返回此 Insets 的哈希码。

覆盖:类 Object 中的 hashCode

返回:此 Insets 的哈希码。另请参见:Object.equals(java.lang.Object),

Hashtable

toString

public String toString()

返回此 Insets 对象的字符串表示。此方法仅在进行调试的时候使用,对于不同的实现,返回的字符串的内容和格式可能有所不同。返回的字符串可能为空,但不可能为 null。

覆盖:类 Object 中的 toString

返回:此 Insets 对象的字符串表示。

clone

public Object clone()

创建此对象的副本。

覆盖:类 Object 中的 clone

返回:此 Insets 对象的副本。另请参见:Cloneable

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值