/** generate the notation for the modelelement and stuff it into the text Fig */ protected void updateNameText() { if (getOwner() == null) { return; } if (notationProviderName != null) { String nameStr = notationProviderName.toString(); nameFig.setText(nameStr); calcBounds(); setBounds(getBounds()); } }
/** * This method is called when the user doubleclicked on the text field, and starts editing. * Subclasses should overrule this field to e.g. supply help to the user about the used format. * * <p>It is also possible to alter the text to be edited already here, e.g. by adding the * stereotype in front of the name, but that seems not user-friendly. * * @param ft the FigText that will be edited and contains the start-text */ protected void textEditStarted(FigText ft) { if (ft == getNameFig()) { showHelp(notationProviderName.getParsingHelp()); ft.setText(notationProviderName.toString()); } }