Search this API

y.layout.grid
Class PartitionCellId

java.lang.Object
  extended by y.layout.grid.PartitionCellId

public class PartitionCellId
extends java.lang.Object

PartitionCellId represents an identifier for partition cells of a partition grid structure.

See Also:
PartitionGrid
 

Nested Class Summary
static class PartitionCellId.Pair
          This class represents a single partition cell, i.e., a pair consisting of a row and a column.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares this PartitionCellId instance with a given other PartitionCellId instance.
 java.util.Collection getCells()
          Returns a collection of elements of type PartitionCellId.Pair.
 ColumnDescriptor getColumn()
          Returns the first column associated with this partition cell identifier.
 RowDescriptor getRow()
          Returns the first row associated with this partition cell identifier.
 int hashCode()
          Returns the hash code value for this PartitionCellId instance.
 boolean isSpanning()
          Returns whether or not this PartitionCellId represents a multi-cell, i.e., a cell spanning multiple rows/columns.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCells

public java.util.Collection getCells()
Returns a collection of elements of type PartitionCellId.Pair.

Each pair consists of a column and a row defining a single partition cell.

 
A partition cell identifier that covers more than one partition cell can only be assigned to group nodes.
Returns:
a Collection of elements of type PartitionCellId.Pair

isSpanning

public boolean isSpanning()
Returns whether or not this PartitionCellId represents a multi-cell, i.e., a cell spanning multiple rows/columns.

This means that it was created using PartitionGrid.createCellSpanId(Collection, Collection), PartitionGrid.createCellSpanId(RowDescriptor, ColumnDescriptor, RowDescriptor, ColumnDescriptor), PartitionGrid.createCellSpanId(int, int, int, int), PartitionGrid.createColumnSpanId(int) or PartitionGrid.createRowSpanId(int).

Returns:
true if this PartitionCellId represents a multi-cell, false otherwise

getRow

public RowDescriptor getRow()
Returns the first row associated with this partition cell identifier.

Returns:
the first row associated with this partition cell identifier

getColumn

public ColumnDescriptor getColumn()
Returns the first column associated with this partition cell identifier.

Returns:
the first column associated with this partition cell identifier

equals

public boolean equals(java.lang.Object o)
Compares this PartitionCellId instance with a given other PartitionCellId instance.

Overrides:
equals in class java.lang.Object
Parameters:
o - the given PartitionCellId instance
Returns:
true if the two objects are equal, false otherwise

hashCode

public int hashCode()
Returns the hash code value for this PartitionCellId instance.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code value for this PartitionCellId instance

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.