Package org.tinyuml.umldraw.shared

Examples of org.tinyuml.umldraw.shared.GeneralDiagram


   * Opens a new structure editor and displays it in the editor area.
   * @param umlModel the UmlModel the diagram belongs to
   * @return the editor panel
   */
  public EditorPanel openNewStructureEditor(UmlModel umlModel) {
    GeneralDiagram diagram = new StructureDiagram(umlModel);
    diagram.setLabelText(ApplicationResources.getInstance().getString(
      "stdcaption.structurediagram") + " " + (structureCounter++));
    umlModel.addDiagram(diagram);
    return createEditorPanel(new StructureDiagramEditor(
      shell.getShellComponent(), diagram),
      new StaticStructureEditorToolbarManager());
View Full Code Here


   * @return the StructureEditor panel
   */
  private EditorPanel createEditorPanel(DiagramEditor diagramEditor,
    ToolbarManager toolbarManager) {
    EditorPanel editor = new EditorPanel(diagramEditor, toolbarManager);
    GeneralDiagram diagram = diagramEditor.getDiagram();
    final Component comp = tabbedPane.add(diagram.getLabelText(), editor);
    final int index = tabbedPane.indexOfComponent(comp);
    tabbedPane.setToolTipTextAt(index, diagram.getLabelText());
    diagram.addNameChangeListener(new NameChangeListener() {
      /** {@inheritDoc} */
      public void nameChanged(NamedElement element) {
        tabbedPane.setTitleAt(index, element.getName());
        tabbedPane.setToolTipTextAt(index, element.getName());
      }
View Full Code Here

   * Creates a new Sequence editor.
   * @param umlModel the UmlModel
   * @return the editor panel
   */
  public EditorPanel openNewSequenceEditor(UmlModel umlModel) {
    GeneralDiagram diagram = new SequenceDiagram(umlModel);
    diagram.setLabelText(ApplicationResources.getInstance().getString(
      "stdcaption.sequencediagram") + " " + (sequenceCounter++));
    umlModel.addDiagram(diagram);
    return createEditorPanel(new SequenceDiagramEditor(
      shell.getShellComponent(), diagram),
      new SequenceEditorToolbarManager());
View Full Code Here

TOP

Related Classes of org.tinyuml.umldraw.shared.GeneralDiagram

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.