Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomEditorPresenter"/> class.
 /// </summary>
 /// <param name="undo">The undo. It's optional.</param>
 /// <param name="noSelectionText">The custom text to disaply when no object is selected. Default is No selection.</param>
 public CustomEditorPresenter(Undo undo, string noSelectionText = null)
 {
     Undo   = undo;
     Panel  = new PresenterPanel(this);
     Editor = new RootEditor(noSelectionText);
     Editor.Initialize(this, this, null);
 }
Exemple #2
0
        // ========================================
        // constructor
        // ========================================
        public SelectionManager(RootEditor root)
        {
            _root            = root;
            _selectedEditors = new List <IEditor>();
            _currentParent   = null;
            _multiSelect     = true;

            _inDeselectAll = false;
        }
 protected internal virtual void updateRootEditorEnabled(RootEditor editor)
 {
   int num = editor.isEnabled() ? 1 : 0;
   for (int index = 0; index < this.tabbedPane.getTabCount(); ++index)
   {
     if (this.tabbedPane.getComponentAt(index) == editor.getMainPanel())
     {
       this.tabbedPane.setEnabledAt(index, num != 0);
       break;
     }
   }
 }
 public virtual void addRootEditor(RootEditor rootPanel)
 {
   this.rootEditors.add((object) rootPanel);
   this.tabbedPane.add(rootPanel.getEditorName(), (Component) rootPanel.getMainPanel());
   rootPanel.addPropertyChangeListener("enabled", (PropertyChangeListener) new AbstractTabbedUI.TabEnableChangeListener(this));
   this.updateRootEditorEnabled(rootPanel);
   if (this.getRootEditorCount() == 1)
   {
     this.setSelectedEditor(0);
   }
   else
   {
     if (!this.isGlobalMenu())
       return;
     this.setJMenuBar(this.updateGlobalMenubar());
   }
 }
Exemple #5
0
 // ========================================
 // constructor
 // ========================================
 public FocusManager(RootEditor root)
 {
     _root = root;
 }