java.lang.Object
org.gjt.sp.jedit.gui.ExtendedGridLayoutConstraints
Specifies constraints for components
that are laid out using the
ExtendedGridLayout
class.- Since:
- jEdit 4.3pre10
- Version:
- 1.0
- Author:
- Björn "Vampire" Kautler
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Specifies that this component is the last component in its column or row and takes up the remaining space. -
Constructor Summary
ConstructorDescriptionExtendedGridLayoutConstraints
(int row, int colspan, int rowspan, Component component) Creates anExtendedGridLayoutConstraints
object with all of its fields set to the passed-in arguments.ExtendedGridLayoutConstraints
(int row, Component component) Creates anExtendedGridLayoutConstraints
object with all of its fields set to their default value except of the row which is specified.ExtendedGridLayoutConstraints
(Component component) Creates anExtendedGridLayoutConstraints
object with all of its fields set to their default value. -
Method Summary
-
Field Details
-
REMAINDER
public static final int REMAINDERSpecifies that this component is the last component in its column or row and takes up the remaining space.- See Also:
-
-
Constructor Details
-
ExtendedGridLayoutConstraints
Creates anExtendedGridLayoutConstraints
object with all of its fields set to their default value. For further information about the default values seeExtendedGridLayoutConstraints(int, int, int, java.awt.Component)
.- Parameters:
component
- TheComponent
this constraints object describes
-
ExtendedGridLayoutConstraints
Creates anExtendedGridLayoutConstraints
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 seeExtendedGridLayoutConstraints(int, int, int, java.awt.Component)
.- Parameters:
row
- The row in which a component starts its display area. First row is 0component
- TheComponent
this constraints object d describes- Throws:
IllegalArgumentException
- If row < 0
-
ExtendedGridLayoutConstraints
Creates anExtendedGridLayoutConstraints
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. UseREMAINDER
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. UseREMAINDER
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
- TheComponent
this constraints object describes- Throws:
IllegalArgumentException
- If row < 0IllegalArgumentException
- If colspan < 1IllegalArgumentException
- If rowspan < 1
-
-
Method Details
-
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
Indicates whether some other object is "equal to" this one.The
equals
method implements an equivalence relation on non-null object references:- It is reflexive: for any non-null reference value
x
,x.equals(x)
returnstrue
. - It is symmetric: for any non-null reference values
x
andy
,x.equals(y)
returnstrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any non-null reference values
x
,y
, andz
, ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
returnstrue
. - It is consistent: for any non-null reference values
x
andy
, multiple invocations ofx.equals(y)
consistently returntrue
or consistently returnfalse
, provided no information used inequals
comparisons on the objects is modified. - For any non-null reference value
x
,x.equals(null)
returnsfalse
.
The
equals
method for classExtendedGridLayoutConstraints
returnstrue
if and only if the constraints objects describe the sameComponent
- It is reflexive: for any non-null reference value
-
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 byjava.util.Hashtable
.The general contract of
hashCode
is:- Whenever it is invoked on the same object more than once during
an execution of a Java application, the
hashCode
method must consistently return the same integer, provided no information used inequals
comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. - If two objects are equal according to the
equals(Object)
method, then calling thehashCode
method on each of the two objects must produce the same integer result. - It is not required that if two objects are unequal
according to the
java.lang.Object#equals(java.lang.Object)
method, then calling thehashCode
method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.
- Whenever it is invoked on the same object more than once during
an execution of a Java application, the
-
toString
Returns a string representation of the object. In general, thetoString
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.
-