Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Draw2d
3.3

org.eclipse.draw2d.geometry
Class Insets

java.lang.Object
  extended by
org.eclipse.draw2d.geometry.Insets
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
IFigure.NoInsets

public class Insets
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Stores four integers for top, left, bottom, and right measurements.

See Also:
Serialized Form

Field Summary
 int bottom
          distance from bottom
 int left
          distance from left
 int right
          distance from right
 int top
          distance from top
 
Constructor Summary
Insets ()
          Constructs an Insets with all zeroes.
Insets ( Insets i)
          Constructs a new Insets with initial values the same as the provided Insets.
Insets (int i)
          Constructs a new Insets with all the sides set to the speicifed value.
Insets (int top, int left, int bottom, int right)
          Creates a new Insets with the specified top, left, bottom, and right values.
 
Method Summary
  Insets add ( Insets insets)
          Adds the values of the specified Insets to this Insets' values.
 boolean equals (java.lang.Object o)
          Test for equality.
  Insets getAdded ( Insets insets)
          Creates an Insets representing the sum of this Insets with the specified Insets.
 int getHeight ()
          Returns the height for this Insets, equal to top + bottom.
  Insets getTransposed ()
          Creates a new Insets with transposed values.
 int getWidth ()
          Returns the width for this Insets, equal to left + right.
 int hashCode ()
           
 boolean isEmpty ()
          Returns true if all values are 0.
 java.lang.String toString ()
           
  Insets transpose ()
          Transposes this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

left

public int left
distance from left


top

public int top
distance from top


bottom

public int bottom
distance from bottom


right

public int right
distance from right

Constructor Detail

Insets

public Insets()
Constructs an Insets with all zeroes.

Since:
2.0

Insets

public Insets(
Insets i)
Constructs a new Insets with initial values the same as the provided Insets.

Parameters:
i - The insets to copy.
Since:
2.0

Insets

public Insets(int i)
Constructs a new Insets with all the sides set to the speicifed value.

Parameters:
i - Value applied to all sides of new Insets.
Since:
2.0

Insets

public Insets(int top,
              int left,
              int bottom,
              int right)
Creates a new Insets with the specified top, left, bottom, and right values.

Parameters:
top - Value of the top space.
left - Value of the left space.
bottom - Value of the bottom space.
right - Value of the right space.
Since:
2.0
Method Detail

add

public 
Insets add(
Insets insets)
Adds the values of the specified Insets to this Insets' values.

Parameters:
insets - the Insets being added
Returns:
this for convenience
Since:
2.0

equals

public boolean equals(java.lang.Object o)
Test for equality. The Insets are equal if their top, left, bottom, and right values are equivalent.

Parameters:
o - Object being tested for equality.
Returns:
true if all values are the same.
Since:
2.0

getAdded

public 
Insets getAdded(
Insets insets)
Creates an Insets representing the sum of this Insets with the specified Insets.

Parameters:
insets - Insets to be added
Returns:
A new Insets
Since:
2.0

getHeight

public int getHeight()
Returns the height for this Insets, equal to top + bottom.

Returns:
The sum of top + bottom
Since:
2.0
See Also:
getWidth()

getTransposed

public 
Insets getTransposed()
Creates a new Insets with transposed values. Top and Left are transposed. Bottom and Right are transposed.

Returns:
New Insets with the transposed values.
Since:
2.0

getWidth

public int getWidth()
Returns the width for this Insets, equal to left + right.

Returns:
The sum of left + right
Since:
2.0
See Also:
getHeight()

hashCode

public int hashCode()
See Also:
Object.hashCode()

isEmpty

public boolean isEmpty()
Returns true if all values are 0.

Returns:
true if all values are 0
Since:
2.0

toString

public java.lang.String toString()
Returns:
String representation.
Since:
2.0

transpose

public 
Insets transpose()
Transposes this object. Top and Left are exchanged. Bottom and Right are exchanged. Can be used in orientation changes.

Returns:
this for convenience
Since:
2.0

Eclipse Draw2d
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire