Interface EntityLayout
- All Known Subinterfaces:
- NodeLayout,- SubgraphLayout
- All Known Implementing Classes:
- DefaultSubgraph,- FigureSubgraph,- LabelSubgraph,- TriangleSubgraph
public interface EntityLayout
- Since:
- 2.0
- 
Method SummaryModifier and TypeMethodDescriptionItem[]getItems()Returns all graph items that are represented using this single entity.Returns a point laying in the center of this entity.Returns all entities that are direct predecessors of this entity.doubleReturns aspect ratio that is preferred for this entity.getSize()Returns all entities that are direct successors of this entity.booleanbooleanvoidsetLocation(double x, double y) Sets the position of this entity.voidsetSize(double width, double height) 
- 
Method Details- 
getLocationDisplayIndependentPoint getLocation()Returns a point laying in the center of this entity. Any subsequent changes to the returned point won't affect this node.- Returns:
- position of the center of this node
 
- 
setLocationvoid setLocation(double x, double y) Sets the position of this entity. The node will be moved so that it's center is located in the given point.- Parameters:
- x- the x-position
- y- the y-position
 
- 
getSizeDisplayIndependentDimension getSize()
- 
setSizevoid setSize(double width, double height) 
- 
getPreferredAspectRatiodouble getPreferredAspectRatio()Returns aspect ratio that is preferred for this entity. Can be 0 if this node can't be resized anyway or it doesn't care about about its ratio.- Returns:
- aspect ratio (width / height)
 
- 
isResizableboolean isResizable()
- 
isMovableboolean isMovable()
- 
getSuccessingEntitiesEntityLayout[] getSuccessingEntities()Returns all entities that are direct successors of this entity. Successor entities of an unpruned node N are:- all unpruned successor nodes of node N
- all subgraphs that are GraphEntitiesand contain at least one successor node of node N
 GraphEntityare:- all unpruned nodes that are successor of at least one node from subgraph S
- all subgraphs that are GraphEntitiesand contain at least one node that is a successor of at least one node from subgraph S
 GraphEntitiesan empty array will be returned.
 Entities connected with this node by a bidirectional connection are considered both successors and predecessors. Any subsequent changes to the returned array do not affect this node.- Returns:
- array of successors of this node
 
- 
getPredecessingEntitiesEntityLayout[] getPredecessingEntities()Returns all entities that are direct predecessors of this entity. Predecessor entities of an unpruned node A are:- all unpruned predecessor nodes of node N
- all subgraphs that are GraphEntitiesand contain at least one predecessor node of node N
 GraphEntityare:- all unpruned nodes that are predecessor of at least one node from subgraph S
- all subgraphs that are GraphEntitiesand contain at least one node that is a predecessor of at least one node from subgraph S
 GraphEntitiesan empty array will be returned.
 Entities connected with this node by a bidirectional connection are considered both successors and predecessors. Any subsequent changes to the returned array do not affect this node.- Returns:
- array of predecessors of this node
 
- 
getItemsItem[] getItems()Returns all graph items that are represented using this single entity. They are useful when a layout would get information about the graph it draws.- Returns:
- an array of graph items
 
 
-