protected void refreshVisuals() { ILabeledFigure figure = (ILabeledFigure) getFigure(); EditableLabel label = figure.getLabel(); NamedElement model = (NamedElement) getModel(); label.setText(model.getName()); label.setTooltipText(model.getDescription()); }
protected void performDirectEdit() { if (manager == null) { ILabeledFigure figure = (ILabeledFigure) getFigure(); manager = new LabelDirectEditManager( this, TextCellEditor.class, new LabelCellEditorLocator(figure.getLabel())); } manager.show(); }
private boolean directEditHitTest(Point requestLoc) { ILabeledFigure figure = (ILabeledFigure) getFigure(); EditableLabel nameLabel = figure.getLabel(); nameLabel.translateToRelative(requestLoc); return nameLabel.containsPoint(requestLoc); }