Class ReadOnlyFlags
- java.lang.Object
-
- com.nomagic.magicdraw.dependencymatrix.datamodel.cell.ReadOnlyFlags
-
@OpenApiAll public final class ReadOnlyFlags extends java.lang.ObjectHolds readonly information about cell: whether relations can be created or deleted between two cell elements There are only six available choices: canCreate:true/false; canEdit:true/false deleteMulti:true/false and all are made static. No other instances should be created.
-
-
Field Summary
Fields Modifier and Type Field Description private booleancanCreateprivate booleancanDeletestatic ReadOnlyFlagsCREATE_DELETEstatic ReadOnlyFlagsCREATE_DELETE_MULTIstatic ReadOnlyFlagsCREATE_NOT_DELETEprivate booleandeleteMultistatic ReadOnlyFlagsNOT_CREATE_DELETEstatic ReadOnlyFlagsNOT_CREATE_DELETE_MULTIstatic ReadOnlyFlagsNOT_CREATE_NOT_DELETE
-
Constructor Summary
Constructors Modifier Constructor Description privateReadOnlyFlags(boolean canCreate, boolean canDelete)Creates new flags object for simple two variable caseprivateReadOnlyFlags(boolean canCreate, boolean canDelete, boolean deleteMulti)Carries information not only about canCreate/canDelete but also about delete count
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanCreate()Is it possible to create new dependencies for this cellbooleancanDelete()Is there any dependencies to delete herestatic ReadOnlyFlagsgetFlagObject(boolean canCreate, boolean canDelete)Returns required instance of this object according to provided flagsstatic ReadOnlyFlagsgetFlagObject(boolean canCreate, boolean canDelete, int deleteCount)returns flag object with additional info, if there are more than one delete action availablebooleanisDeleteMulti()Specific case, when it is required to know if there are one or more delete action for this cellbooleanisEditable()is this cell can create or can delete at least one dependency
-
-
-
Field Detail
-
CREATE_DELETE
public static final ReadOnlyFlags CREATE_DELETE
-
CREATE_DELETE_MULTI
public static final ReadOnlyFlags CREATE_DELETE_MULTI
-
NOT_CREATE_DELETE
public static final ReadOnlyFlags NOT_CREATE_DELETE
-
NOT_CREATE_DELETE_MULTI
public static final ReadOnlyFlags NOT_CREATE_DELETE_MULTI
-
CREATE_NOT_DELETE
public static final ReadOnlyFlags CREATE_NOT_DELETE
-
NOT_CREATE_NOT_DELETE
public static final ReadOnlyFlags NOT_CREATE_NOT_DELETE
-
canCreate
private boolean canCreate
-
canDelete
private boolean canDelete
-
deleteMulti
private boolean deleteMulti
-
-
Constructor Detail
-
ReadOnlyFlags
private ReadOnlyFlags(boolean canCreate, boolean canDelete)Creates new flags object for simple two variable case- Parameters:
canCreate- can new dependencies be created in this cellcanDelete- can delete existing dependencies
-
ReadOnlyFlags
private ReadOnlyFlags(boolean canCreate, boolean canDelete, boolean deleteMulti)Carries information not only about canCreate/canDelete but also about delete count- Parameters:
canCreate- can new dependencies be created in this cellcanDelete- can delete existing dependenciesdeleteMulti- carries information about how may delete action are availabe for this cell
-
-
Method Detail
-
canCreate
public boolean canCreate()
Is it possible to create new dependencies for this cell- Returns:
trueif it is possible to create at least one new dependency
-
canDelete
public boolean canDelete()
Is there any dependencies to delete here- Returns:
trueif it is possible to delete at least one dependency
-
isDeleteMulti
public boolean isDeleteMulti()
Specific case, when it is required to know if there are one or more delete action for this cell- Returns:
trueif there aer multiple delete actions
-
getFlagObject
public static ReadOnlyFlags getFlagObject(boolean canCreate, boolean canDelete)
Returns required instance of this object according to provided flags- Parameters:
canCreate- can relationship be createdcanDelete- can existing relationships be deleted- Returns:
- readonly flag instance
-
getFlagObject
public static ReadOnlyFlags getFlagObject(boolean canCreate, boolean canDelete, int deleteCount)
returns flag object with additional info, if there are more than one delete action available- Parameters:
canCreate- can relationship be createdcanDelete- can existing relationships be deleteddeleteCount- probable delete action count- Returns:
- readonly flag object instance
-
isEditable
public boolean isEditable()
is this cell can create or can delete at least one dependency- Returns:
trueif can create or can delete
-
-