public void setDistributionCnameField(NSTextField t) { this.distributionCnameField = t; notificationCenter.addObserver(this.id(), Foundation.selector("distributionApplyButtonClicked:"), NSControl.NSControlTextDidEndEditingNotification, t.id()); }
public void setFilterField(NSTextField t) { this.filterField = t; notificationCenter.addObserver(this.id(), Foundation.selector("filterFieldTextDidChange:"), NSControl.NSControlTextDidChangeNotification, t.id()); }
public void setOctalField(NSTextField t) { this.octalField = t; notificationCenter.addObserver(this.id(), Foundation.selector("octalPermissionsInputDidEndEditing:"), NSControl.NSControlTextDidEndEditingNotification, t.id()); }
public void setNicknameField(final NSTextField field) { this.nicknameField = field; notificationCenter.addObserver(this.id(), Foundation.selector("nicknameFieldDidChange:"), NSControl.NSControlTextDidChangeNotification, field.id()); this.addObserver(new BookmarkObserver() { @Override public void change(final Host bookmark) { updateField(nicknameField, BookmarkNameProvider.toString(bookmark)); } }); }
public void setUsernameField(final NSTextField field) { this.usernameField = field; this.notificationCenter.addObserver(this.id(), Foundation.selector("usernameInputDidChange:"), NSControl.NSControlTextDidChangeNotification, field.id()); this.addObserver(new BookmarkObserver() { @Override public void change(final Host bookmark) { updateField(usernameField, credentials.getUsername()); usernameField.cell().setPlaceholderString(bookmark.getProtocol().getUsernamePlaceholder()); usernameField.setEnabled(options.user && !credentials.isAnonymousLogin()); } }); }
public void setPortField(final NSTextField field) { this.portField = field; this.notificationCenter.addObserver(this.id(), Foundation.selector("portInputDidChange:"), NSControl.NSControlTextDidChangeNotification, field.id()); this.addObserver(new BookmarkObserver() { @Override public void change(final Host bookmark) { updateField(portField, String.valueOf(bookmark.getPort())); portField.setEnabled(bookmark.getProtocol().isPortConfigurable()); } }); }
public void setPathField(NSTextField field) { this.pathField = field; this.notificationCenter.addObserver(this.id(), Foundation.selector("pathInputDidChange:"), NSControl.NSControlTextDidChangeNotification, field.id()); this.addObserver(new BookmarkObserver() { @Override public void change(final Host bookmark) { updateField(pathField, bookmark.getDefaultPath()); pathField.setEnabled(bookmark.getProtocol().isPathConfigurable()); } }); }
public void setHostField(final NSTextField field) { this.hostField = field; this.notificationCenter.addObserver(this.id(), Foundation.selector("hostFieldDidChange:"), NSControl.NSControlTextDidChangeNotification, field.id()); this.addObserver(new BookmarkObserver() { @Override public void change(final Host bookmark) { updateField(hostField, bookmark.getHostname()); hostField.setEnabled(bookmark.getProtocol().isHostnameConfigurable()); hostField.cell().setPlaceholderString(bookmark.getProtocol().getDefaultHostname()); } }); }
public void setWebURLField(final NSTextField field) { this.webURLField = field; final NSTextFieldCell cell = this.webURLField.cell(); notificationCenter.addObserver(this.id(), Foundation.selector("webURLInputDidChange:"), NSControl.NSControlTextDidChangeNotification, field.id()); this.addObserver(new BookmarkObserver() { @Override public void change(Host bookmark) { updateField(webURLField, bookmark.getWebURL()); cell.setPlaceholderString(new WebUrlProvider(bookmark).toUrl().getUrl()); } }); }