站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ViewInsets (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor.view.spi
Class ViewInsets

java.lang.Object
  extended by org.netbeans.editor.view.spi.ViewInsets
All Implemented Interfaces:
Serializable

public final class ViewInsets
extends Object
implements Serializable

Immutable analogy of the Insets based on floats.
Any view implementation may benefit from presence of this class.

As the views of a same type should possibly use the same insets there is a potential for sharing of ViewInsets instances.

See Also:
Serialized Form

Field Summary
static ViewInsets ZERO_INSETS
           
 
Constructor Summary
ViewInsets(float top, float left, float bottom, float right)
          Creates and initializes a new ViewInsets object with the specified top, left, bottom, and right insets.
 
Method Summary
 boolean equals(Object obj)
          Checks whether two float insets objects are equal.
 float getBottom()
           
 float getLeft()
           
 float getLeftRight()
           
 float getRight()
           
 float getTop()
           
 float getTopBottom()
           
 int hashCode()
          Returns the hash code for this Insets.
 String toString()
          Returns a string representation of this Insets object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO_INSETS

public static final ViewInsets ZERO_INSETS
Constructor Detail

ViewInsets

public ViewInsets(float top,
                  float left,
                  float bottom,
                  float right)
Creates and initializes a new ViewInsets 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

getTop

public float getTop()

getLeft

public float getLeft()

getBottom

public float getBottom()

getRight

public float getRight()

getLeftRight

public float getLeftRight()

getTopBottom

public float getTopBottom()

equals

public boolean equals(Object obj)
Checks whether two float insets objects are equal. Two instances of ViewInsets are equal if the four float values of the fields top, left, bottom, and right are all equal.

Overrides:
equals in class Object
Returns:
true if the two float insets are equal; otherwise false.

hashCode

public int hashCode()
Returns the hash code for this Insets.

Overrides:
hashCode in class Object
Returns:
a hash code for this Insets.

toString

public String toString()
Returns a string representation of this Insets object. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
toString in class Object
Returns:
a string representation of this Insets object.

org.netbeans.modules.editor.lib/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.