List of usage examples for com.vaadin.ui RichTextArea setCaption
public void setCaption(String caption);
From source file:de.unioninvestment.portal.explorer.view.vfs.HelpView.java
License:Apache License
public HelpView() { final RichTextArea rtarea = new RichTextArea(); rtarea.setCaption("VFSFileExplorerPortlet"); rtarea.setValue("<h1>Configuration Example</h1>\n" + "<h2>File access</h2>\n" + "windows : file:///C:/Temp\n" + "unix: file:///home/someuser/somedir\n" + "\n" + "<h2>FTP access</h2>\n" + "ftp://hostname[: port]\n " + "plus username and password\n" + "\n" + "<h2>SFTP access</h2>\n" + "sftp://hostname[: port][ absolute-path]\n " + "plus username and password \n" + "and / or\n " + "path to keyfile like /home/user/keyfile/id_rsa "); rtarea.setReadOnly(true);//from w ww.j a v a 2 s . c o m addComponent(rtarea); }
From source file:org.processbase.ui.core.template.PbFieldFactory.java
License:Open Source License
public Field createField(Item item, Object propertyId, Component uiContext) { String pid = (String) propertyId; if (pid.equals("sectionName")) { TextField tf = new TextField(messages.getString("sectionName")); tf.setNullRepresentation(""); tf.setWidth("300px"); tf.setRequired(true);//from ww w . j ava 2 s . c o m tf.setRequiredError(messages.getString("requiredField")); return tf; } else if (pid.equals("sectionDesc")) { TextField tf = new TextField(messages.getString("sectionDesc")); tf.setNullRepresentation(""); tf.setWidth("150px"); tf.setRequired(true); tf.setRequiredError(messages.getString("requiredField")); return tf; } else if (pid.equals("taskName") || pid.equals("name")) { TextField tf = new TextField(("taskName")); tf.setNullRepresentation(""); tf.setSizeFull(); tf.setRequired(true); tf.setRequiredError("? !"); return tf; } else if (pid.equals("dataXml")) { RichTextArea ra = new RichTextArea(); ra.setCaption(("taskText")); ra.setNullRepresentation(""); ra.setRequired(true); ra.setRequiredError("? !"); return ra; } else if (pid.equals("startDate") || pid.equals("expireDate") || pid.equals("endDate")) { PopupDateField df = new PopupDateField((pid)); df.setResolution(DateField.RESOLUTION_MIN); df.setValue(new Date()); df.setRequired(true); df.setRequiredError("? !"); return df; } else if (pid.equals("nxuserId")) { TextField tf = new TextField(("author")); tf.setNullRepresentation(""); tf.setSizeFull(); tf.setRequired(true); tf.setReadOnly(true); return tf; } else if (pid.equals("assignedTo")) { TextField tf = new TextField(("assignedTo")); tf.setNullRepresentation(""); tf.setSizeFull(); tf.setRequired(true); tf.setReadOnly(true); return tf; } else if (pid.equals("status")) { TextField tf = new TextField(("status")); tf.setNullRepresentation(""); tf.setReadOnly(true); return tf; } else if (pid.equals("id")) { TextField tf = new TextField("ID"); tf.setNullRepresentation(""); tf.setReadOnly(true); return tf; } return null; }