use of org.osate.ge.graphics.internal.Label in project osate2 by osate.
the class DiagramElementPredicates method isMoveableShape.
/**
* Returns true if the specified diagram element is a shape that can be moved. This includes regular shapes and secondary labels for
* connections and flow indicators.
* @param de the diagram element to check
* @return true if the specified diagram element is a shape that can be moved.
*/
public static boolean isMoveableShape(final DiagramElement de) {
final Graphic graphic = de.getGraphic();
final boolean shapeSecondaryLabel = graphic instanceof Label && de.getParent() instanceof DiagramElement && ((DiagramElement) de.getParent()).getGraphic() instanceof AgeShape;
return graphic instanceof AgeShape && !shapeSecondaryLabel;
}
Aggregations