Package com.inductiveautomation.rm.shape
Class RMShapeTable
- java.lang.Object
-
- com.inductiveautomation.rm.shape.RMShapeTable
-
public class RMShapeTable extends java.lang.Object
Defines a region of coordinates along with a list of shapes that occupy that region.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
RMShapeTable.Cell
An inner class that represents a table cell.class
RMShapeTable.Column
An inner class representing rows.class
RMShapeTable.Row
An inner class representing rows.static class
RMShapeTable.Span
A class to represent an intervalstatic class
RMShapeTable.SpanList
A 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 void
addDouble(java.util.List<java.lang.Double> aDoubleList, java.lang.Double aDouble)
Adds a double to a list.boolean
contains(int aRow, int aColumn, int aRowMax, int aColumnMax, RMShape aShape)
Returns whether given range of cells contains given shape.boolean
equals(double aValue1, double aValue2)
Returns whether double values are equal to the precision of the table.RMShapeTable.Cell
getCell(int anIndex)
Returns the individual cell at the given index.RMShapeTable.Cell
getCell(int aRow, int aColumn)
Returns the individual cell at the given row and column.int
getCellCount()
Returns the number of cells.RMShapeTable.Cell[][]
getCells()
Returns the cells.RMShapeTable.Column
getColumn(int anIndex)
Returns the individual column at given index.int
getColumnCount()
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.Row
getRow(int anIndex)
Returns the individual row at given index.int
getRowCount()
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.Span
getSpanX(RMShape aShape)
Returns the horizontal span of a given shape.static RMShapeTable.Span
getSpanY(RMShape aShape)
Returns the vertical span of a given shape.boolean
isEmpty(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.
-
-