org.gjt.sp.jedit.gui
Class ExtendedGridLayoutConstraints

java.lang.Object
  extended by org.gjt.sp.jedit.gui.ExtendedGridLayoutConstraints

public class ExtendedGridLayoutConstraints
extends java.lang.Object

Specifies constraints for components that are laid out using the ExtendedGridLayout class.

Since:
jEdit 4.3pre10
See Also:
ExtendedGridLayout

Field Summary
static int REMAINDER
          Specifies that this component is the last component in its column or row and takes up the remaining space.
 
Constructor Summary
ExtendedGridLayoutConstraints(java.awt.Component component)
          Creates an ExtendedGridLayoutConstraints object with all of its fields set to their default value.
ExtendedGridLayoutConstraints(int row, java.awt.Component component)
          Creates an ExtendedGridLayoutConstraints object with all of its fields set to their default value except of the row which is specified.
ExtendedGridLayoutConstraints(int row, int colspan, int rowspan, java.awt.Component component)
          Creates an ExtendedGridLayoutConstraints object with all of its fields set to the passed-in arguments.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 int getCol()
           
 int getColspan()
           
 int getRow()
           
 int getRowspan()
           
 int hashCode()
          Returns a hash code value for the object.
 boolean isPlaceholder()
           
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REMAINDER

public static final int REMAINDER
Specifies that this component is the last component in its column or row and takes up the remaining space.

See Also:
Constant Field Values
Constructor Detail

ExtendedGridLayoutConstraints

public ExtendedGridLayoutConstraints(java.awt.Component component)
Creates an ExtendedGridLayoutConstraints object with all of its fields set to their default value. For further information about the default values see ExtendedGridLayoutConstraints(int, int, int, java.awt.Component).

Parameters:
component - The Component this constraints object describes

ExtendedGridLayoutConstraints

public ExtendedGridLayoutConstraints(int row,
                                     java.awt.Component component)
Creates an ExtendedGridLayoutConstraints object with all of its fields set to their default value except of the row which is specified. For further information about the default values see ExtendedGridLayoutConstraints(int, int, int, java.awt.Component).

Parameters:
row - The row in which a component starts its display area. First row is 0
component - The Component this constraints object d describes
Throws:
java.lang.IllegalArgumentException - If row < 0

ExtendedGridLayoutConstraints

public ExtendedGridLayoutConstraints(int row,
                                     int colspan,
                                     int rowspan,
                                     java.awt.Component component)
Creates an ExtendedGridLayoutConstraints object with all of its fields set to the passed-in arguments.

Parameters:
row - The row in which a component starts its display area. First row is 0. Default value is 0.
colspan - The number of cells in a row for the component's display area. Use REMAINDER to specify that the component's display area will be from its grid position to the last cell in the row. Default value is 1.
rowspan - The number of cells in a column for the component's display area. Use REMAINDER to specify that the component's display area will be from its grid position to the last cell in the column. Default value is 1.
component - The Component this constraints object describes
Throws:
java.lang.IllegalArgumentException - If row < 0
java.lang.IllegalArgumentException - If colspan < 1
java.lang.IllegalArgumentException - If rowspan < 1
Method Detail

getRow

public int getRow()
Returns:
The row in which the component starts its display area.

getCol

public int getCol()
Returns:
The column in which the component starts its display area.

getColspan

public int getColspan()
Returns:
The number of cells in a row for the component's display area or REMAINDER if the component's display area will be from its grid position to the last cell in the row.

getRowspan

public int getRowspan()
Returns:
The number of cells in a column for the component's display area or REMAINDER if the component's display area will be from its grid position to the last cell in the column.

isPlaceholder

public boolean isPlaceholder()
Returns:
Whether this constraints object is a placeholder or not

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

The equals method for class ExtendedGridLayoutConstraints returns true if and only if the constraints objects describe the same Component

Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the o argument; false otherwise.
See Also:
hashCode(), java.util.Hashtable

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.
See Also:
equals(java.lang.Object), java.util.Hashtable

toString

public java.lang.String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.