ch.cyberduck.core.Protocol.getUsernamePlaceholder()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中ch.cyberduck.core.Protocol.getUsernamePlaceholder()方法的一些代码示例,展示了Protocol.getUsernamePlaceholder()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Protocol.getUsernamePlaceholder()方法的具体详情如下:
包路径:ch.cyberduck.core.Protocol
类名称:Protocol
方法名:getUsernamePlaceholder

Protocol.getUsernamePlaceholder介绍

暂无

代码示例

代码示例来源:origin: iterate-ch/cyberduck

@Override
  public void change(final Host bookmark) {
    usernameLabel.setAttributedStringValue(NSAttributedString.attributedStringWithAttributes(
      StringUtils.isNotBlank(bookmark.getProtocol().getUsernamePlaceholder()) ? String.format("%s:",
        bookmark.getProtocol().getUsernamePlaceholder()) : StringUtils.EMPTY,
      TRUNCATE_TAIL_ATTRIBUTES
    ));
  }
});

代码示例来源:origin: iterate-ch/cyberduck

@Override
public String getUsernamePlaceholder() {
  final String v = this.value("Username Placeholder");
  if(StringUtils.isBlank(v)) {
    return parent.getUsernamePlaceholder();
  }
  return LocaleFactory.localizedString(v, "Credentials");
}

代码示例来源:origin: iterate-ch/cyberduck

@Override
  public void change(final Host bookmark) {
    updateField(usernameField, credentials.getUsername());
    usernameField.cell().setPlaceholderString(bookmark.getProtocol().getUsernamePlaceholder());
    usernameField.setEnabled(options.user && !credentials.isAnonymousLogin());
  }
});

代码示例来源:origin: iterate-ch/cyberduck

public void configure(final Protocol protocol) {
  publickey = protocol.isPrivateKeyConfigurable();
  certificate = protocol.isCertificateConfigurable();
  anonymous = protocol.isAnonymousConfigurable();
  user = protocol.isUsernameConfigurable();
  password = protocol.isPasswordConfigurable();
  token = protocol.isTokenConfigurable();
  oauth = protocol.isOAuthConfigurable();
  icon = protocol.disk();
  usernamePlaceholder = protocol.getUsernamePlaceholder();
  passwordPlaceholder = protocol.getPasswordPlaceholder();
}

相关文章