Tabnine Logo
NSTabView.selectedTabViewItem
Code IndexAdd Tabnine to your IDE (free)

How to use
selectedTabViewItem
method
in
ch.cyberduck.binding.application.NSTabView

Best Java code snippets using ch.cyberduck.binding.application.NSTabView.selectedTabViewItem (Showing top 5 results out of 315)

origin: iterate-ch/cyberduck

public BrowserTab getSelectedTabView() {
  return BrowserTab.byPosition(browserTabView.indexOfTabViewItem(browserTabView.selectedTabViewItem()));
}
origin: iterate-ch/cyberduck

public void setFiles(List<Path> files) {
  if(files.isEmpty()) {
    return;
  }
  this.files = files;
  this.initializePanel(this.getSelectedTab());
  this.setTitle(this.getTitle(tabView.selectedTabViewItem()));
}
origin: iterate-ch/cyberduck

  /**
   * @return Minimum size to fit content view of currently selected tab.
   */
  private NSRect getContentRect() {
    NSRect contentRect = new NSRect(0, 0);
    final NSView view = tabView.selectedTabViewItem().view();
    final NSEnumerator enumerator = view.subviews().objectEnumerator();
    NSObject next;
    while(null != (next = enumerator.nextObject())) {
      final NSView subview = Rococoa.cast(next, NSView.class);
      contentRect = FoundationKitFunctionsLibrary.NSUnionRect(contentRect, subview.frame());
    }
    return contentRect;
  }
}
origin: iterate-ch/cyberduck

@Override
public void awakeFromNib() {
  // Reset
  NSEnumerator items = this.tabView.tabViewItems().objectEnumerator();
  NSObject object;
  while(((object = items.nextObject()) != null)) {
    this.tabView.removeTabViewItem(Rococoa.cast(object, NSTabViewItem.class));
  }
  // Insert all panels into tab view
  for(Map.Entry<Label, NSView> tab : this.getPanels().entrySet()) {
    final NSTabViewItem item = NSTabViewItem.itemWithIdentifier(tab.getKey().identifier);
    item.setView(tab.getValue());
    item.setLabel(tab.getKey().label);
    this.tabView.addTabViewItem(item);
  }
  // Set up toolbar properties: Allow customization, give a default display mode, and remember state in user defaults
  toolbar.setAllowsUserCustomization(false);
  toolbar.setSizeMode(this.getToolbarSize());
  toolbar.setDisplayMode(this.getToolbarMode());
  toolbar.setDelegate(this.id());
  window.setToolbar(toolbar);
  // Change selection to last selected item in preferences
  final int index = preferences.getInteger(String.format("%s.selected", this.getToolbarName()));
  this.setSelectedPanel(index < this.getPanels().size() ? index : 0);
  this.setTitle(this.getTitle(tabView.selectedTabViewItem()));
  super.awakeFromNib();
}
origin: iterate-ch/cyberduck

/**
 * Change the toolbar selection and display the tab index.
 *
 * @param selected The index of the tab to be selected
 */
protected void setSelectedPanel(final int selected) {
  int tab = selected;
  if(-1 == tab) {
    tab = 0;
  }
  String identifier = tabView.tabViewItemAtIndex(tab).identifier();
  if(!this.validateTabWithIdentifier(identifier)) {
    tab = 0;
    identifier = tabView.tabViewItemAtIndex(tab).identifier();
  }
  tabView.selectTabViewItemAtIndex(tab);
  NSTabViewItem page = tabView.selectedTabViewItem();
  if(page == null) {
    page = tabView.tabViewItemAtIndex(0);
  }
  toolbar.setSelectedItemIdentifier(page.identifier());
  this.initializePanel(identifier);
}
ch.cyberduck.binding.applicationNSTabViewselectedTabViewItem

Javadoc

Original signature : NSTabViewItem* selectedTabViewItem()
return nil if none are selected
native declaration : :88

Popular methods of NSTabView

  • indexOfTabViewItem
    Original signature : NSInteger indexOfTabViewItem(NSTabViewItem*) NSNotFound if not found native dec
  • selectTabViewItemAtIndex
    Original signature : void selectTabViewItemAtIndex(NSInteger) May raise an NSRangeException native d
  • addTabViewItem
    Original signature : void addTabViewItem(NSTabViewItem*) Add tab at the end. native declaration : :1
  • indexOfTabViewItemWithIdentifier
    Original signature : NSInteger indexOfTabViewItemWithIdentifier(id) NSNotFound if not found native d
  • removeTabViewItem
    Original signature : void removeTabViewItem(NSTabViewItem*) tabViewItem must be an existing tabViewI
  • setAutoresizingMask
  • setDelegate
    Original signature : void setDelegate(id) native declaration : :115
  • tabViewItemAtIndex
    Original signature : NSTabViewItem* tabViewItemAtIndex(NSInteger) May raise an NSRangeException nati
  • tabViewItems
    Original signature : NSArray* tabViewItems() native declaration : :91

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JTextField (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now