T - The template of the classes that can be added to this Geometrypublic class Geometry<T extends Geometry> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
parallelChildrenCount |
protected int |
parallelPosition |
protected int |
serialChildrenCount |
protected int |
serialPosition |
| Constructor and Description |
|---|
Geometry(String name)
Create a new Geometry with no boundaries.
|
Geometry(String name,
int s,
int p)
Create a new Geometry given a width and a height.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildGeometry(T child,
int s,
int p)
Add a child to the grid to a given position.
|
protected void |
addGeometry(T child,
int x,
int y)
Add a Geometry to this Geometry at a given (x,y) location.
|
protected void |
addGeometryToGrid(T child,
int s,
int p) |
static void |
convertToExpandedView(Geometry<?> geometry,
boolean expandedView)
Convert this geometry to its expanded version.
|
Geometry |
findGeometry(String geometryUniqueId)
Find a Geometry by name.
|
Point |
getAbsolutePoint(Point p) |
T |
getChild(int s,
int p)
Get child at position (s,p).
|
List<T> |
getChildrenList()
Get the list of children for this Geometry.
|
Map<Geometry,Point> |
getChildrenWithAbsoluteCoordinates()
Get the children for this Geometry.
|
Dimension |
getDimension()
Get the Dimension of this Geometry.
|
Point |
getGeometryAbsolutePosition() |
Point |
getGeometryPoint(Geometry geometry)
Get the location Point of a component within its parent.
|
int |
getHeight()
Get the Geometry height;
|
String |
getName()
Get the Geometry name
|
int |
getNumberOfChildren()
Get the number of children in this Geometry.
|
int |
getParallelChildrenCount() |
int |
getParallelPosition() |
Geometry |
getParent()
Get the parent of this Geometry.
|
int |
getSerialChildrenCount() |
int |
getSerialPosition() |
String |
getUniqueId()
Get this Geometry unique id.
|
int |
getWidth()
Get the Geometry width.
|
boolean |
hasChildren()
Check if this Geometry has children.
|
boolean |
hasParent()
Check if this Geometry has a Parent.
|
protected void |
setDimension(int width,
int height)
Set a fixed dimension for this Geometry.
|
protected void |
setExpandedView(boolean expandedView) |
protected void |
setParent(Geometry parent) |
protected final int serialChildrenCount
protected final int parallelChildrenCount
protected int serialPosition
protected int parallelPosition
public Geometry(String name, int s, int p)
s - The number of allowed components in the serial directionp - The number of allowed components in the parallel direction.name - The name of this Geometrypublic Geometry(String name)
name - The name of this Geometryprotected void setDimension(int width,
int height)
width - The width of this Geometryheight - The height of this Geometrypublic String getName()
public int getWidth()
public int getHeight()
public Dimension getDimension()
public Geometry getParent()
public boolean hasParent()
protected final void setParent(Geometry parent)
protected void addGeometry(T child, int x, int y)
child - The Geometry to be addedx - The x coordinate of the child Geometry locationy - The y coordinate of the child Geometry locationpublic int getSerialChildrenCount()
public int getParallelChildrenCount()
public int getSerialPosition()
public int getParallelPosition()
public void addChildGeometry(T child, int s, int p)
child - The child to be addeds - The serial position to add it top - The parallel position to add it toprotected void addGeometryToGrid(T child, int s, int p)
public T getChild(int s, int p)
s - The serial position to add it top - The parallel position to add it topublic boolean hasChildren()
public final Map<Geometry,Point> getChildrenWithAbsoluteCoordinates()
public final List<T> getChildrenList()
public final String getUniqueId()
public final Geometry findGeometry(String geometryUniqueId)
geometryUniqueId - The unique id of the geometry to be found.public final int getNumberOfChildren()
public Point getGeometryAbsolutePosition()
public Point getGeometryPoint(Geometry geometry)
protected void setExpandedView(boolean expandedView)
public static void convertToExpandedView(Geometry<?> geometry, boolean expandedView)
Copyright © 2016 LSST. All rights reserved.