Package com.inductiveautomation.rm.shape
Class RMShapeTable
- java.lang.Object
-
- com.inductiveautomation.rm.shape.RMShapeTable
-
public class RMShapeTable extends java.lang.ObjectDefines a region of coordinates along with a list of shapes that occupy that region.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRMShapeTable.CellAn inner class that represents a table cell.classRMShapeTable.ColumnAn inner class representing rows.classRMShapeTable.RowAn inner class representing rows.static classRMShapeTable.SpanA class to represent an intervalstatic classRMShapeTable.SpanListA class to represent a list of spans.
-
Constructor Summary
Constructors Constructor Description RMShapeTable(java.util.List<RMShape> theShapes)Creates a table from a list of shapes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDouble(java.util.List<java.lang.Double> aDoubleList, java.lang.Double aDouble)Adds a double to a list.booleancontains(int aRow, int aColumn, int aRowMax, int aColumnMax, RMShape aShape)Returns whether given range of cells contains given shape.booleanequals(double aValue1, double aValue2)Returns whether double values are equal to the precision of the table.RMShapeTable.CellgetCell(int anIndex)Returns the individual cell at the given index.RMShapeTable.CellgetCell(int aRow, int aColumn)Returns the individual cell at the given row and column.intgetCellCount()Returns the number of cells.RMShapeTable.Cell[][]getCells()Returns the cells.RMShapeTable.ColumngetColumn(int anIndex)Returns the individual column at given index.intgetColumnCount()Returns the number of columns.java.util.List<java.lang.Double>getColumnDividers()Returns the list of column dividers.java.util.List<RMShapeTable.Column>getColumns()Returns a list of columns.RMShapeTable.RowgetRow(int anIndex)Returns the individual row at given index.intgetRowCount()Returns the number of rows.java.util.List<java.lang.Double>getRowDividers()Returns the list of row dividers.java.util.List<RMShapeTable.Row>getRows()Returns a list of rows.java.util.List<RMShape>getShapes()Returns the list of table shapes.java.util.List<RMShape>getShapes(int aRow, int aColumn, int aRowMax, int aColumnMax)Returns the list of shapes from given rows and columns.static RMShapeTable.SpangetSpanX(RMShape aShape)Returns the horizontal span of a given shape.static RMShapeTable.SpangetSpanY(RMShape aShape)Returns the vertical span of a given shape.booleanisEmpty(int aRow, int aColumn, int aRowMax, int aColumnMax)Returns whether given range of cells is empty.
-
-
-
Constructor Detail
-
RMShapeTable
public RMShapeTable(java.util.List<RMShape> theShapes)
Creates a table from a list of shapes.
-
-
Method Detail
-
getShapes
public java.util.List<RMShape> getShapes()
Returns the list of table shapes.
-
getRowCount
public int getRowCount()
Returns the number of rows.
-
getRow
public RMShapeTable.Row getRow(int anIndex)
Returns the individual row at given index.
-
getRows
public java.util.List<RMShapeTable.Row> getRows()
Returns a list of rows.
-
getColumn
public RMShapeTable.Column getColumn(int anIndex)
Returns the individual column at given index.
-
getColumnCount
public int getColumnCount()
Returns the number of columns.
-
getColumns
public java.util.List<RMShapeTable.Column> getColumns()
Returns a list of columns.
-
getRowDividers
public java.util.List<java.lang.Double> getRowDividers()
Returns the list of row dividers.
-
getColumnDividers
public java.util.List<java.lang.Double> getColumnDividers()
Returns the list of column dividers.
-
getCellCount
public int getCellCount()
Returns the number of cells.
-
getCell
public RMShapeTable.Cell getCell(int anIndex)
Returns the individual cell at the given index.
-
getCell
public RMShapeTable.Cell getCell(int aRow, int aColumn)
Returns the individual cell at the given row and column.
-
getCells
public RMShapeTable.Cell[][] getCells()
Returns the cells.
-
getShapes
public java.util.List<RMShape> getShapes(int aRow, int aColumn, int aRowMax, int aColumnMax)
Returns the list of shapes from given rows and columns.
-
isEmpty
public boolean isEmpty(int aRow, int aColumn, int aRowMax, int aColumnMax)Returns whether given range of cells is empty.
-
contains
public boolean contains(int aRow, int aColumn, int aRowMax, int aColumnMax, RMShape aShape)Returns whether given range of cells contains given shape.
-
getSpanX
public static RMShapeTable.Span getSpanX(RMShape aShape)
Returns the horizontal span of a given shape.
-
getSpanY
public static RMShapeTable.Span getSpanY(RMShape aShape)
Returns the vertical span of a given shape.
-
addDouble
public void addDouble(java.util.List<java.lang.Double> aDoubleList, java.lang.Double aDouble)Adds a double to a list.
-
equals
public boolean equals(double aValue1, double aValue2)Returns whether double values are equal to the precision of the table.
-
-