protected LabeledLineEdge(LabeledLineEdge cloned) { super(cloned); this.startLabel = cloned.startLabel.clone(); this.centerLabel = cloned.centerLabel.clone(); this.endLabel = cloned.endLabel.clone(); startTextContent = new TextContent(startLabel); centerTextContent = new TextContent(centerLabel); endTextContent = new TextContent(endLabel); }
public LabeledLineEdge() { super(); startLabel = new SingleLineText(); centerLabel = new SingleLineText(); endLabel = new SingleLineText(); startTextContent = new TextContent(startLabel); centerTextContent = new TextContent(centerLabel); endTextContent = new TextContent(endLabel); }
@Override protected void createContentStructure() { super.createContentStructure(); startTextContent = new TextContent(startLabel); centerTextContent = new TextContent(centerLabel); endTextContent = new TextContent(endLabel); startLabel.reconstruction(); centerLabel.reconstruction(); endLabel.reconstruction(); }
@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()); }