|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.marvin.space.CellOrComponentId
public class CellOrComponentId
Class to identify cells and components. This class let us handle cells and components
uniformly, which is used during interactive selection.
A cell is identified by its cellIndex, and -1 as a componentIndex.
E.g. 3rd cell of the Scene: new CellOrComponentId(2, -1);
E.g. 2nd component of the 1st cell: new CellOrComponentId(0, 1);
Constructor Summary | |
---|---|
CellOrComponentId(int cellIndex)
Creates a cell id. |
|
CellOrComponentId(int cellIndex,
int componentIndex)
Creates an id. |
Method Summary | |
---|---|
int |
getCellIndex()
Returns the internal index of the cell either this is a cell id or a component id. |
int |
getComponentIndex()
Returns the internal index of the component or -1 if this is a cell id. |
boolean |
isCell()
Returns true if this id identifies a cell. |
boolean |
isComponent()
Returns true if this id identifies a component. |
void |
setCellIndex(int cellIndex)
Sets the internal index of the cell. |
void |
setComponentIndex(int componentIndex)
Warning: for internal use only. |
java.lang.String |
toString()
Returns the internal cell and component indices. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CellOrComponentId(int cellIndex)
setComponentIndex(int)
.
cellIndex
- internal index of the cellpublic CellOrComponentId(int cellIndex, int componentIndex)
cellIndex
- internal index of the cellcomponentIndex
- internal index of the component or -1Method Detail |
---|
public boolean isCell()
public boolean isComponent()
public int getCellIndex()
public int getComponentIndex()
public void setCellIndex(int cellIndex)
public void setComponentIndex(int componentIndex)
GraphicCell.removeComponent(GraphicComponent)
public java.lang.String toString()
toString
in class java.lang.Object
String
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |