public NodeFigure(boolean hasImage, DiagramResourceCache resourceCache) {
this.hasImage = hasImage;
this.resourceCache = resourceCache;
this.setForegroundColor(resourceCache.getColor(DEFAULT_NODE_FOREGROUND));
setLayoutManager(new XYLayout());
labelFigure = new Label();
labelFigure.setForegroundColor(resourceCache.getColor(DEFAULT_TEXT_FOREGROUND));
labelFigure.setLabelAlignment(PositionConstants.CENTER);
labelFigure.setFont(resourceCache.getDefaultFont());