IDiagramViewManager diagramViewManager = api.getViewManager().getDiagramViewManager();
IDiagram currentDiagram = diagramViewManager.getCurrentDiagram();
IDiagramViewManager diagramViewManager = api.getViewManager().getDiagramViewManager();
List<IPresentation> iPresentationList = Arrays.asList(diagramViewManager.getSelectedPresentations());
Example: imp is INodePresentation. I wonder if I can go if it is derived from IPresentation.
inp.setProperty(Key.FONT_COLOR, "#FF0000");
package xyz.astah.example;
import java.awt.Frame;
import java.awt.Insets;
import javax.swing.JDialog;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
public class TextDialog extends JDialog {
public TextDialog(String text, Frame frame, int width, int height, boolean modal) {
super(frame, "Text Dialog", modal);
JTextArea jTextArea = new JTextArea(text);
jTextArea.setMargin(new Insets(8, 8, 8, 8));
JScrollPane jScrollPane = new JScrollPane(jTextArea);
this.getContentPane().add(jScrollPane);
this.setBounds(frame.getX() + 100, frame.getY() + 100, width, height);
this.setVisible(true);
}
}
Example of use
TextDialog textDialog = new TextDialog(outputText.toString(), api.getViewManager().getMainFrame(), 300, 300, false);