@Override protected void createContentStructure() { TextContent textContent = new TextContent(text); textContent.setMinHeight(DEFAULT_HEIGHT); textContent.setMinWidth(DEFAULT_WIDTH); ContentInsideShape contentInsideShape = new ContentInsideCustomShape(textContent, new ContentInsideCustomShape.ShapeCreator() { @Override public Shape createShape(double contentWidth, double contentHeight) { GeneralPath path = new GeneralPath(); path.moveTo(0, 0); path.lineTo(contentWidth - FOLD_X, 0); path.lineTo(contentWidth, FOLD_Y); path.lineTo(contentWidth, contentHeight); path.lineTo(0, contentHeight); path.closePath(); return path; } }); setBorder(new ContentBorder(contentInsideShape, getBorderColor())); setBackground(new ContentBackground(getBorder(), getBackgroundColor())); setContent(getBackground()); setBackgroundColor(ColorToolsBarPanel.PASTEL_YELLOW_ORANCE.getBackgroundColor()); setBorderColor(ColorToolsBarPanel.PASTEL_YELLOW_ORANCE.getBorderColor()); setTextColor(ColorToolsBarPanel.PASTEL_YELLOW_ORANCE.getTextColor()); }