Search in sources :

Example 1 with TabTitle

use of com.igormaznitsa.sciareto.ui.tabs.TabTitle in project netbeans-mmd-plugin by raydac.

the class MainFrame method showFindTextPane.

@Override
public void showFindTextPane(@Nullable final String text) {
    final TabTitle current = getFocusedTab();
    if (current != null && this.tabPane.getCurrentTitle().getProvider().doesSupportPatternSearch()) {
        FindTextPanel panel = this.currentFindTextPanel.get();
        if (panel == null) {
            panel = new FindTextPanel(this, text);
            panel.updateUI(current);
            this.mainPanel.add(panel, BorderLayout.SOUTH);
        }
        this.currentFindTextPanel.set(panel);
        this.mainPanel.revalidate();
        this.mainPanel.repaint();
        panel.requestFocus();
    }
}
Also used : TabTitle(com.igormaznitsa.sciareto.ui.tabs.TabTitle)

Example 2 with TabTitle

use of com.igormaznitsa.sciareto.ui.tabs.TabTitle in project netbeans-mmd-plugin by raydac.

the class MainFrame method menuEditCutActionPerformed.

// GEN-LAST:event_menuEditPasteActionPerformed
private void menuEditCutActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_menuEditCutActionPerformed
    final TabTitle title = this.getFocusedTab();
    if (title != null && title.getProvider().doesSupportCutCopyPaste()) {
        title.getProvider().doCut();
    }
    updateMenuItemsForProvider(title == null ? null : title.getProvider());
}
Also used : TabTitle(com.igormaznitsa.sciareto.ui.tabs.TabTitle)

Example 3 with TabTitle

use of com.igormaznitsa.sciareto.ui.tabs.TabTitle in project netbeans-mmd-plugin by raydac.

the class MainFrame method menuEditPasteActionPerformed.

// GEN-LAST:event_menuEditCopyActionPerformed
private void menuEditPasteActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_menuEditPasteActionPerformed
    final TabTitle title = this.getFocusedTab();
    if (title != null && title.getProvider().doesSupportCutCopyPaste()) {
        title.getProvider().doPaste();
    }
    updateMenuItemsForProvider(title == null ? null : title.getProvider());
}
Also used : TabTitle(com.igormaznitsa.sciareto.ui.tabs.TabTitle)

Example 4 with TabTitle

use of com.igormaznitsa.sciareto.ui.tabs.TabTitle in project netbeans-mmd-plugin by raydac.

the class MainFrame method menuRedoActionPerformed.

// GEN-LAST:event_menuUndoActionPerformed
private void menuRedoActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_menuRedoActionPerformed
    final TabTitle title = this.getFocusedTab();
    if (title != null) {
        this.menuRedo.setEnabled(title.getProvider().redo());
        this.menuUndo.setEnabled(title.getProvider().isUndo());
    }
}
Also used : TabTitle(com.igormaznitsa.sciareto.ui.tabs.TabTitle)

Example 5 with TabTitle

use of com.igormaznitsa.sciareto.ui.tabs.TabTitle in project netbeans-mmd-plugin by raydac.

the class MainFrame method menuUndoActionPerformed.

// GEN-LAST:event_menuGoToFileActionPerformed
private void menuUndoActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_menuUndoActionPerformed
    final TabTitle title = this.getFocusedTab();
    if (title != null) {
        this.menuUndo.setEnabled(title.getProvider().undo());
        this.menuRedo.setEnabled(title.getProvider().isRedo());
    }
}
Also used : TabTitle(com.igormaznitsa.sciareto.ui.tabs.TabTitle)

Aggregations

TabTitle (com.igormaznitsa.sciareto.ui.tabs.TabTitle)16 File (java.io.File)3 NodeProject (com.igormaznitsa.sciareto.ui.tree.NodeProject)2 ExtraFile (com.igormaznitsa.mindmap.model.ExtraFile)1 PreferencesPanel (com.igormaznitsa.sciareto.preferences.PreferencesPanel)1 FindFilesForTextPanel (com.igormaznitsa.sciareto.ui.FindFilesForTextPanel)1 FindUsagesPanel (com.igormaznitsa.sciareto.ui.FindUsagesPanel)1 NodeFileOrFolder (com.igormaznitsa.sciareto.ui.tree.NodeFileOrFolder)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 IOException (java.io.IOException)1 Path (java.nio.file.Path)1 ArrayList (java.util.ArrayList)1 Nonnull (javax.annotation.Nonnull)1 JMenu (javax.swing.JMenu)1 JMenuItem (javax.swing.JMenuItem)1 JPopupMenu (javax.swing.JPopupMenu)1 JSeparator (javax.swing.JSeparator)1