当前位置: 首页>>代码示例>>Java>>正文


Java SWT.PASSWORD属性代码示例

本文整理汇总了Java中org.eclipse.swt.SWT.PASSWORD属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.PASSWORD属性的具体用法?Java SWT.PASSWORD怎么用?Java SWT.PASSWORD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.PASSWORD属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
  Composite container = (Composite) super.createDialogArea(parent);
  GridLayout layout = new GridLayout(2, false);
  layout.marginRight = 5;
  layout.marginLeft = 10;
  container.setLayout(layout);

  Label lblUser = new Label(container, SWT.NONE);
  lblUser.setText("User:");

  txtUser = new Text(container, SWT.BORDER);
  txtUser.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
  txtUser.setText(user);

  Label lblPassword = new Label(container, SWT.NONE);
  GridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
  gd_lblNewLabel.horizontalIndent = 1;
  lblPassword.setLayoutData(gd_lblNewLabel);
  lblPassword.setText("Password:");

  txtPassword = new Text(container, SWT.BORDER | SWT.SINGLE | SWT.PASSWORD);
  txtPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
  txtPassword.setText(password);
  return container;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:26,代码来源:PasswordDialog.java

示例2: createDialogArea

@Override
protected Control createDialogArea( Composite parent ) {
  Composite comp = (Composite) super.createDialogArea( parent );

  GridLayout layout = (GridLayout) comp.getLayout();
  layout.numColumns = 2;

  Label usernameLabel = new Label( comp, SWT.RIGHT );
  usernameLabel.setText( "Username: " );
  usernameText = new Text( comp, SWT.SINGLE | SWT.BORDER );
  usernameText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

  Label passwordLabel = new Label( comp, SWT.RIGHT );
  passwordLabel.setText( "Password: " );
  passwordText = new Text( comp, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD );
  passwordText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );

  return comp;
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:19,代码来源:UsernamePasswordDialog.java

示例3: updateContents

@Override
protected void updateContents(Object value) {
	Label labelCtrl = getDefaultLabel();
	if (labelCtrl == null)
		return;
	 String text = "";//$NON-NLS-1$
	 if (value != null) {
		 boolean isMasked = (getStyle() & SWT.PASSWORD) == 0;
		 String regexp = value instanceof String ? ".":"[^\\[\\]\\,]";
		 text = value.toString();
		 text = isMasked ? text:text.replaceAll(regexp, "*");
	 }
	 labelCtrl.setText(text);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:14,代码来源:AbstractDialogCellEditor.java

示例4: getColumnText

public String getColumnText(Object element, int columnIndex) {
	
	if (element instanceof Item) {
		element = ((Item) element).getData();
	}
	
	ArrayEditorRow row = (ArrayEditorRow) element;
	Object object = row.getValue(columnIndex);
	String text = object.toString();
	return (style & SWT.PASSWORD) == 0 ? text:text.replaceAll(".", "*");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:11,代码来源:ArrayEditorLabelProvider.java

示例5: createConvertigoGroup

/**
 * This method initializes convertigoGroup	
 *
 */
private void createConvertigoGroup() {
	convertigoGroup = new Group(this, SWT.FILL);
	convertigoGroup.setLayout(new GridLayout());
	convertigoGroup.setText("Convertigo server login");
	
	GridData gridData2 = new GridData();
	gridData2.horizontalAlignment = GridData.FILL;
	gridData2.verticalAlignment = GridData.FILL;
	gridData2.grabExcessHorizontalSpace = true;
	gridData2.verticalIndent = 10;
	convertigoGroup.setLayoutData(gridData2);
	
	GridData gridData3 = new GridData();
	gridData3.horizontalAlignment = GridData.FILL;
	gridData3.verticalAlignment = GridData.CENTER;
	gridData3.grabExcessHorizontalSpace = true;
	convertigoAdminLabel = new Label(convertigoGroup, SWT.NONE);
	convertigoAdminLabel.setText("Server administrator");
	convertigoAdmin = new Text(convertigoGroup, SWT.BORDER);
	convertigoAdmin.setLayoutData(gridData3);
	
	GridData gridData5 = new GridData();
	gridData5.horizontalAlignment = GridData.FILL;
	gridData5.verticalAlignment = GridData.CENTER;
	gridData5.grabExcessHorizontalSpace = true;
	convertigoAdminPassword = new Label(convertigoGroup, SWT.NONE);
	convertigoAdminPassword.setText("Password");
	convertigoPassword = new Text(convertigoGroup, SWT.BORDER | SWT.PASSWORD);
	convertigoPassword.setLayoutData(gridData5);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:34,代码来源:ProjectDeployDialogComposite.java

示例6: createUITextPassword

/**
 * 
 */
private void createUITextPassword() {
	// Create the text widget
	int style = SWT.PASSWORD | SWT.BORDER;
	fTextPassword = new Text(fCompositeLogin, style);
	// Configure layout data
	GridData data = new GridData(SWT.NONE, SWT.NONE, false, false);
	data.widthHint = F_TEXT_WIDTH_HINT;
	data.horizontalSpan = 2;
	fTextPassword.setLayoutData(data);		
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:13,代码来源:InteractiveSplashHandler.java

示例7: createDialogArea

/**
 * Create contents of the dialog.
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
	
	getShell().setText("Credentials Required");
	
	Composite container = (Composite) super.createDialogArea(parent);
	container.getLayout();

	
	Composite composite = new Composite(container, SWT.NONE);
	composite.setLayout(new GridLayout(4, false));
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	new Label(composite, SWT.NONE);
	new Label(composite, SWT.NONE);
	new Label(composite, SWT.NONE);
	new Label(composite, SWT.NONE);
	new Label(composite, SWT.NONE);
	
	Label lblUserName = new Label(composite, SWT.NONE);
	lblUserName.setText("User Name");
	new Label(composite, SWT.NONE);
	
	username = new Text(composite, SWT.BORDER);
	username.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	new Label(composite, SWT.NONE);
	
	Label lblPassword = new Label(composite, SWT.NONE);
	lblPassword.setText("Password");
	new Label(composite, SWT.NONE);
	
	password = new Text(composite, SWT.PASSWORD|SWT.BORDER);
	password.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	
	createErrorComposite(container);

	return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:41,代码来源:HiveInputExtractMetaStoreDialog.java

示例8: createInput

@Override
protected void createInput ( final DataBindingContext dbc, final Label label, final Composite composite )
{
    this.input = new Text ( composite, SWT.PASSWORD | SWT.BORDER );
    this.input.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:6,代码来源:PasswordWidgetFactory.java

示例9: addBasicAuthenticationComposite

/**
 * @param container
 * @return
 */
private Control addBasicAuthenticationComposite(Composite container) {
	Composite basicAuthComposite = new Composite(container, SWT.BORDER);
	basicAuthComposite.setLayout(new GridLayout(2, false));
	basicAuthComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	String label1Text = null;
	String label2Text = null;
	int textStyle = 0;
	if(StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
		label1Text = "Access Key ID";
		label2Text = "Secret Access Key";
		textStyle = SWT.BORDER;
	}else{
		label1Text = "User ID";
		label2Text = "Password";
		textStyle = SWT.PASSWORD | SWT.BORDER;
	}
	
	FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
	Label label1 = (Label) ftpWidgetUtility.createLabel(basicAuthComposite, label1Text);
	setPropertyHelpText(label1, "Used to provide the value for authentication");
	text1 = (Text) ftpWidgetUtility.createText(basicAuthComposite, "", SWT.BORDER);
	Utils.INSTANCE.addMouseMoveListener(text1, cursor);	
	
	Label label2 = (Label) ftpWidgetUtility.createLabel(basicAuthComposite, label2Text);
	setPropertyHelpText(label2, "Used to provide the value for authentication");
	text2 = (Text) ftpWidgetUtility.createText(basicAuthComposite, "", textStyle);
	Utils.INSTANCE.addMouseMoveListener(text2, cursor);	
	
	ControlDecoration text1ControlDecoration = WidgetUtility.addDecorator(text1,Messages.EMPTYFIELDMESSAGE);
	ControlDecoration text2ControlDecoration = WidgetUtility.addDecorator(text2,Messages.EMPTYFIELDMESSAGE);
	
	FTPWidgetUtility widgetUtility = new FTPWidgetUtility();
	widgetUtility.validateWidgetText(text1, propertyDialogButtonBar, cursor, text1ControlDecoration);
	widgetUtility.validateEmptyWidgetText(text2, propertyDialogButtonBar, cursor, text2ControlDecoration);
	
	addModifyListener(text1);
	addModifyListener(text2);
	
	return basicAuthComposite;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:45,代码来源:FTPAuthenticEditorDialog.java


注:本文中的org.eclipse.swt.SWT.PASSWORD属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。