JavaScript is disabled on your browser.
Field Summary
Fields
Modifier and Type
Field
Description
int
bottom
The inset from the bottom.
int
left
The inset from the left.
int
right
The inset from the right.
int
top
The inset from the top.
Constructor Summary
Constructors
Constructor
Description
Insets (int top,
int left,
int bottom,
int right)
Creates and initializes a new Insets
object with the
specified top, left, bottom, and right insets.
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method
Description
Object
clone ()
Create a copy of this object.
boolean
equals (Object obj)
Checks whether two insets objects are equal.
int
hashCode ()
Returns the hash code for this Insets.
void
set (int top,
int left,
int bottom,
int right)
Set top, left, bottom, and right to the specified values
String
toString ()
Returns a string representation of this Insets
object.
Constructor Detail
Insets
public Insets(int top,
int left,
int bottom,
int right)
Creates and initializes a new Insets
object with the
specified top, left, bottom, and right insets.
Parameters:
top
- the inset from the top.
left
- the inset from the left.
bottom
- the inset from the bottom.
right
- the inset from the right.
Method Detail
set
public void set(int top,
int left,
int bottom,
int right)
Set top, left, bottom, and right to the specified values
Parameters:
top
- the inset from the top.
left
- the inset from the left.
bottom
- the inset from the bottom.
right
- the inset from the right.
Since:
1.5
equals
public boolean equals(Object obj)
Checks whether two insets objects are equal. Two instances
of Insets
are equal if the four integer values
of the fields top
, left
,
bottom
, and right
are all equal.
Overrides:
equals
in class Object
Parameters:
obj
- the reference object with which to compare.
Returns:
true
if the two insets are equal;
otherwise false
.
Since:
1.1
See Also:
Object.hashCode()
,
HashMap
Report a bug or suggest an enhancement For further API reference and developer documentation see the Java SE Documentation , which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries. Copyright © 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA. All rights reserved. Use is subject to license terms and the documentation redistribution policy .
Scripting on this page tracks web page traffic, but does not change the content in any way.