mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
cloud user management
This commit is contained in:
+15
-1
@@ -43,7 +43,7 @@ public interface ServiceAPI {
|
|||||||
* @return "Success" if the operation is successful or error message if it
|
* @return "Success" if the operation is successful or error message if it
|
||||||
* failed.
|
* failed.
|
||||||
*/
|
*/
|
||||||
String updateUser(@ParamName("username") String username,
|
String updateUserDetails(@ParamName("username") String username,
|
||||||
@ParamName("token") String token,
|
@ParamName("token") String token,
|
||||||
@ParamName("machineId") String machineId,
|
@ParamName("machineId") String machineId,
|
||||||
@ParamName("email") String email,
|
@ParamName("email") String email,
|
||||||
@@ -89,6 +89,20 @@ public interface ServiceAPI {
|
|||||||
@ParamName("token") String token,
|
@ParamName("token") String token,
|
||||||
@ParamName("machineId") String machineId);
|
@ParamName("machineId") String machineId);
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Updates password of the current user using token to authenticate.
|
||||||
|
*
|
||||||
|
* @param username
|
||||||
|
* @param token
|
||||||
|
* @param machineId
|
||||||
|
* @param password
|
||||||
|
* @return "Success" if the login is successful or error message if it
|
||||||
|
* failed.
|
||||||
|
*/
|
||||||
|
String updatePassword(@ParamName("username") String username,
|
||||||
|
@ParamName("oldPassword") String oldPassword,
|
||||||
|
@ParamName("newPassword") String newPassword);
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Searches for projects that meet the specified search criteria. Supports
|
* Searches for projects that meet the specified search criteria. Supports
|
||||||
* pagination.
|
* pagination.
|
||||||
|
|||||||
+33
@@ -179,6 +179,39 @@ public class CloudPresenter {
|
|||||||
+ res.getClass().getName());
|
+ res.getClass().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updatePassword(String oldPassword, String newPassword)
|
||||||
|
throws CloudException {
|
||||||
|
String username = ConfigurationManager.getInstance().readString(
|
||||||
|
USERNAME_KEY, null);
|
||||||
|
|
||||||
|
String res;
|
||||||
|
try {
|
||||||
|
res = service.updatePassword(username, oldPassword, newPassword);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new CloudException(e);
|
||||||
|
}
|
||||||
|
if (!res.equals(SUCCESS))
|
||||||
|
throw new CloudException(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateUserDetails(String email, String website, String bio)
|
||||||
|
throws CloudException {
|
||||||
|
String username = ConfigurationManager.getInstance().readString(
|
||||||
|
USERNAME_KEY, null);
|
||||||
|
String token = ConfigurationManager.getInstance().readString(TOKEN_KEY,
|
||||||
|
null);
|
||||||
|
|
||||||
|
String res;
|
||||||
|
try {
|
||||||
|
res = service.updateUserDetails(username, token, getMachineId(),
|
||||||
|
email, website, bio);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new CloudException(e);
|
||||||
|
}
|
||||||
|
if (!res.equals(SUCCESS))
|
||||||
|
throw new CloudException(res);
|
||||||
|
}
|
||||||
|
|
||||||
private String getMachineId() {
|
private String getMachineId() {
|
||||||
if (machineId == null) {
|
if (machineId == null) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
+6
@@ -15,6 +15,7 @@ import org.diylc.plugins.cloud.model.UserEntity;
|
|||||||
import org.diylc.plugins.cloud.presenter.CloudPresenter;
|
import org.diylc.plugins.cloud.presenter.CloudPresenter;
|
||||||
import org.diylc.swing.gui.components.OverwritePromptFileChooser;
|
import org.diylc.swing.gui.components.OverwritePromptFileChooser;
|
||||||
import org.diylc.swing.gui.editor.PropertyEditorDialog;
|
import org.diylc.swing.gui.editor.PropertyEditorDialog;
|
||||||
|
import org.diylc.swing.plugins.cloud.view.ChangePasswordDialog;
|
||||||
import org.diylc.swing.plugins.cloud.view.LoginDialog;
|
import org.diylc.swing.plugins.cloud.view.LoginDialog;
|
||||||
import org.diylc.swing.plugins.cloud.view.UserEditDialog;
|
import org.diylc.swing.plugins.cloud.view.UserEditDialog;
|
||||||
import org.diylc.swing.plugins.cloud.view.UploadDialog;
|
import org.diylc.swing.plugins.cloud.view.UploadDialog;
|
||||||
@@ -156,6 +157,11 @@ public class DialogFactory {
|
|||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ChangePasswordDialog createChangePasswordDialog() {
|
||||||
|
ChangePasswordDialog dialog = new ChangePasswordDialog(mainFrame);
|
||||||
|
return dialog;
|
||||||
|
}
|
||||||
|
|
||||||
public ProgressDialog createProgressDialog(String title,
|
public ProgressDialog createProgressDialog(String title,
|
||||||
String[] buttonCaptions, String description, boolean useProgress) {
|
String[] buttonCaptions, String description, boolean useProgress) {
|
||||||
ProgressDialog dialog = new ProgressDialog(mainFrame, title,
|
ProgressDialog dialog = new ProgressDialog(mainFrame, title,
|
||||||
|
|||||||
+84
-37
@@ -22,6 +22,7 @@ import org.diylc.presenter.Presenter;
|
|||||||
import org.diylc.swing.ISwingUI;
|
import org.diylc.swing.ISwingUI;
|
||||||
import org.diylc.swing.gui.DialogFactory;
|
import org.diylc.swing.gui.DialogFactory;
|
||||||
import org.diylc.swing.gui.DummyView;
|
import org.diylc.swing.gui.DummyView;
|
||||||
|
import org.diylc.swing.plugins.cloud.view.ChangePasswordDialog;
|
||||||
import org.diylc.swing.plugins.cloud.view.LoginDialog;
|
import org.diylc.swing.plugins.cloud.view.LoginDialog;
|
||||||
import org.diylc.swing.plugins.cloud.view.UserEditDialog;
|
import org.diylc.swing.plugins.cloud.view.UserEditDialog;
|
||||||
import org.diylc.swing.plugins.cloud.view.UploadDialog;
|
import org.diylc.swing.plugins.cloud.view.UploadDialog;
|
||||||
@@ -151,8 +152,7 @@ public class CloudPlugIn implements IPlugIn, CloudListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ChangePasswordAction getChangePasswordAction() {
|
public ChangePasswordAction getChangePasswordAction() {
|
||||||
if (changePasswordAction == null)
|
if (changePasswordAction == null) {
|
||||||
{
|
|
||||||
changePasswordAction = new ChangePasswordAction();
|
changePasswordAction = new ChangePasswordAction();
|
||||||
}
|
}
|
||||||
return changePasswordAction;
|
return changePasswordAction;
|
||||||
@@ -261,6 +261,31 @@ public class CloudPlugIn implements IPlugIn, CloudListener {
|
|||||||
UserEditDialog dialog = DialogFactory.getInstance()
|
UserEditDialog dialog = DialogFactory.getInstance()
|
||||||
.createUserEditDialog(null);
|
.createUserEditDialog(null);
|
||||||
dialog.setVisible(true);
|
dialog.setVisible(true);
|
||||||
|
if (ButtonDialog.OK.equals(dialog.getSelectedButtonCaption())) {
|
||||||
|
swingUI.executeBackgroundTask(new ITask<Void>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Void doInBackground() throws Exception {
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void failed(Exception e) {
|
||||||
|
swingUI.showMessage(
|
||||||
|
"Failed to create the account. Error: "
|
||||||
|
+ e.getMessage(), "Cloud Error",
|
||||||
|
IView.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void complete(Void result) {
|
||||||
|
swingUI.showMessage(
|
||||||
|
"Cloud account created successfully.", "Cloud",
|
||||||
|
IView.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,27 +301,42 @@ public class CloudPlugIn implements IPlugIn, CloudListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
swingUI.executeBackgroundTask(new ITask<UserEntity>() {
|
try {
|
||||||
|
final UserEditDialog dialog = DialogFactory.getInstance()
|
||||||
|
.createUserEditDialog(cloudPresenter.getUserDetails());
|
||||||
|
dialog.setVisible(true);
|
||||||
|
if (ButtonDialog.OK.equals(dialog.getSelectedButtonCaption())) {
|
||||||
|
swingUI.executeBackgroundTask(new ITask<Void>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserEntity doInBackground() throws Exception {
|
public Void doInBackground() throws Exception {
|
||||||
return cloudPresenter.getUserDetails();
|
cloudPresenter.updateUserDetails(dialog.getEmail(),
|
||||||
}
|
dialog.getWebsite(), dialog.getBio());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void failed(Exception e) {
|
public void failed(Exception e) {
|
||||||
swingUI.showMessage(
|
swingUI.showMessage(
|
||||||
"Failed to retreive user details from the server.",
|
"Failed to update the account. Error: "
|
||||||
"Cloud Error", IView.ERROR_MESSAGE);
|
+ e.getMessage(), "Cloud Error",
|
||||||
}
|
IView.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void complete(UserEntity result) {
|
public void complete(Void result) {
|
||||||
UserEditDialog dialog = DialogFactory.getInstance()
|
swingUI.showMessage(
|
||||||
.createUserEditDialog(result);
|
"Cloud account updated successfully.",
|
||||||
dialog.setVisible(true);
|
"Cloud", IView.INFORMATION_MESSAGE);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
} catch (CloudException e1) {
|
||||||
|
swingUI.showMessage(
|
||||||
|
"Failed to retreive user details from the server. Error: "
|
||||||
|
+ e1.getMessage(), "Cloud Error",
|
||||||
|
IView.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,27 +352,34 @@ public class CloudPlugIn implements IPlugIn, CloudListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
swingUI.executeBackgroundTask(new ITask<UserEntity>() {
|
final ChangePasswordDialog dialog = DialogFactory.getInstance()
|
||||||
|
.createChangePasswordDialog();
|
||||||
|
dialog.setVisible(true);
|
||||||
|
if (ButtonDialog.OK.equals(dialog.getSelectedButtonCaption())) {
|
||||||
|
swingUI.executeBackgroundTask(new ITask<Void>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserEntity doInBackground() throws Exception {
|
public Void doInBackground() throws Exception {
|
||||||
return cloudPresenter.getUserDetails();
|
cloudPresenter.updatePassword(dialog.getOldPassword(),
|
||||||
}
|
dialog.getNewPassword());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void failed(Exception e) {
|
public void failed(Exception e) {
|
||||||
swingUI.showMessage(
|
swingUI.showMessage(
|
||||||
"Failed to retreive user details from the server.",
|
"Failed to update the password. Error: "
|
||||||
"Cloud Error", IView.ERROR_MESSAGE);
|
+ e.getMessage(), "Cloud Error",
|
||||||
}
|
IView.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void complete(UserEntity result) {
|
public void complete(Void result) {
|
||||||
UserEditDialog dialog = DialogFactory.getInstance()
|
swingUI.showMessage("Password updated.", "Cloud",
|
||||||
.createUserEditDialog(result);
|
IView.INFORMATION_MESSAGE);
|
||||||
dialog.setVisible(true);
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+182
@@ -0,0 +1,182 @@
|
|||||||
|
package org.diylc.swing.plugins.cloud.view;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.GridBagConstraints;
|
||||||
|
import java.awt.GridBagLayout;
|
||||||
|
import java.awt.Insets;
|
||||||
|
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JPasswordField;
|
||||||
|
import javax.swing.event.DocumentEvent;
|
||||||
|
import javax.swing.event.DocumentListener;
|
||||||
|
|
||||||
|
import org.diylc.swingframework.ButtonDialog;
|
||||||
|
|
||||||
|
public class ChangePasswordDialog extends ButtonDialog {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private JPanel mainPanel;
|
||||||
|
|
||||||
|
private JPasswordField oldPasswordField;
|
||||||
|
private JPasswordField newPasswordField;
|
||||||
|
private JPasswordField confirmPasswordField;
|
||||||
|
|
||||||
|
private String oldPassword;
|
||||||
|
private String newPassword;
|
||||||
|
|
||||||
|
public ChangePasswordDialog(JFrame owner) {
|
||||||
|
super(owner, "Change Password", new String[] { OK, CANCEL });
|
||||||
|
|
||||||
|
setMinimumSize(new Dimension(240, 32));
|
||||||
|
layoutGui();
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewPassword() {
|
||||||
|
return newPassword;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOldPassword() {
|
||||||
|
return oldPassword;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected JComponent getMainComponent() {
|
||||||
|
if (mainPanel == null) {
|
||||||
|
mainPanel = new JPanel(new GridBagLayout());
|
||||||
|
mainPanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
|
||||||
|
|
||||||
|
GridBagConstraints gbc = new GridBagConstraints();
|
||||||
|
gbc.anchor = GridBagConstraints.NORTHWEST;
|
||||||
|
gbc.fill = GridBagConstraints.NONE;
|
||||||
|
gbc.insets = new Insets(4, 2, 2, 2);
|
||||||
|
|
||||||
|
gbc.gridx = 0;
|
||||||
|
|
||||||
|
gbc.gridy = 0;
|
||||||
|
mainPanel.add(new JLabel("Old Password:"), gbc);
|
||||||
|
|
||||||
|
gbc.gridy = 1;
|
||||||
|
mainPanel.add(new JLabel("New Password:"), gbc);
|
||||||
|
|
||||||
|
gbc.gridy = 2;
|
||||||
|
mainPanel.add(new JLabel("Confirm Password:"), gbc);
|
||||||
|
|
||||||
|
gbc.gridx = 1;
|
||||||
|
gbc.fill = GridBagConstraints.HORIZONTAL;
|
||||||
|
gbc.insets = new Insets(2, 2, 2, 2);
|
||||||
|
gbc.weightx = 1;
|
||||||
|
|
||||||
|
gbc.gridy = 0;
|
||||||
|
mainPanel.add(getOldPasswordField(), gbc);
|
||||||
|
|
||||||
|
gbc.gridy = 1;
|
||||||
|
mainPanel.add(getNewPasswordField(), gbc);
|
||||||
|
|
||||||
|
gbc.gridy = 2;
|
||||||
|
mainPanel.add(getConfirmPasswordField(), gbc);
|
||||||
|
|
||||||
|
}
|
||||||
|
return mainPanel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshState() {
|
||||||
|
this.oldPassword = new String(getOldPasswordField().getPassword());
|
||||||
|
|
||||||
|
String newPassword = new String(getNewPasswordField().getPassword());
|
||||||
|
String confirmPassword = new String(getConfirmPasswordField()
|
||||||
|
.getPassword());
|
||||||
|
if (newPassword.equals(confirmPassword)) {
|
||||||
|
this.newPassword = newPassword;
|
||||||
|
} else {
|
||||||
|
this.newPassword = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
JButton okButton = getButton(OK);
|
||||||
|
okButton.setEnabled((this.newPassword != null)
|
||||||
|
&& (this.newPassword.length() > 0)
|
||||||
|
&& (this.oldPassword != null)
|
||||||
|
&& (this.oldPassword.length() > 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPasswordField getOldPasswordField() {
|
||||||
|
if (oldPasswordField == null) {
|
||||||
|
oldPasswordField = new JPasswordField();
|
||||||
|
oldPasswordField.getDocument().addDocumentListener(
|
||||||
|
new DocumentListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void changedUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return oldPasswordField;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPasswordField getNewPasswordField() {
|
||||||
|
if (newPasswordField == null) {
|
||||||
|
newPasswordField = new JPasswordField();
|
||||||
|
newPasswordField.getDocument().addDocumentListener(
|
||||||
|
new DocumentListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void changedUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return newPasswordField;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPasswordField getConfirmPasswordField() {
|
||||||
|
if (confirmPasswordField == null) {
|
||||||
|
confirmPasswordField = new JPasswordField();
|
||||||
|
confirmPasswordField.getDocument().addDocumentListener(
|
||||||
|
new DocumentListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void changedUpdate(DocumentEvent e) {
|
||||||
|
refreshState();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return confirmPasswordField;
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
-4
@@ -268,14 +268,15 @@ public class UploadDialog extends ButtonDialog {
|
|||||||
.getWidth(), getThumbnailPanel().getHeight(),
|
.getWidth(), getThumbnailPanel().getHeight(),
|
||||||
BufferedImage.TYPE_INT_RGB);
|
BufferedImage.TYPE_INT_RGB);
|
||||||
Graphics2D cg = thumbnailImage.createGraphics();
|
Graphics2D cg = thumbnailImage.createGraphics();
|
||||||
paintThumbnail(cg, new Rectangle(thumbnailImage.getWidth(), thumbnailImage.getHeight()));
|
|
||||||
|
paintThumbnail(cg, new Rectangle(thumbnailImage.getWidth(),
|
||||||
|
thumbnailImage.getHeight()));
|
||||||
return thumbnailImage;
|
return thumbnailImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void paintThumbnail(Graphics g, Rectangle rect) {
|
private void paintThumbnail(Graphics g, Rectangle rect) {
|
||||||
Graphics2D g2d = (Graphics2D) g;
|
Graphics2D g2d = (Graphics2D) g;
|
||||||
Dimension d = UploadDialog.this.plugInPort
|
Dimension d = UploadDialog.this.plugInPort.getCanvasDimensions(false);
|
||||||
.getCanvasDimensions(false);
|
|
||||||
|
|
||||||
g2d.setColor(Color.white);
|
g2d.setColor(Color.white);
|
||||||
g2d.fill(rect);
|
g2d.fill(rect);
|
||||||
@@ -291,7 +292,7 @@ public class UploadDialog extends ButtonDialog {
|
|||||||
|
|
||||||
g2d.scale(zoomRatio, zoomRatio);
|
g2d.scale(zoomRatio, zoomRatio);
|
||||||
UploadDialog.this.plugInPort.draw(g2d,
|
UploadDialog.this.plugInPort.draw(g2d,
|
||||||
EnumSet.noneOf(DrawOption.class), null);
|
EnumSet.of(DrawOption.ANTIALIASING), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKeywords() {
|
public String getKeywords() {
|
||||||
|
|||||||
+4
-3
@@ -69,7 +69,7 @@ public class UserEditDialog extends ButtonDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getBio() {
|
public String getBio() {
|
||||||
return bio;
|
return bio.replace("\n", "<br>");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -148,7 +148,8 @@ public class UserEditDialog extends ButtonDialog {
|
|||||||
this.bio = getBioArea().getText();
|
this.bio = getBioArea().getText();
|
||||||
JButton okButton = getButton(OK);
|
JButton okButton = getButton(OK);
|
||||||
okButton.setEnabled((this.userName.length() > 0)
|
okButton.setEnabled((this.userName.length() > 0)
|
||||||
&& (this.password != null) && (this.password.length() > 0));
|
&& (this.existingEntity != null || ((this.password != null) && (this.password
|
||||||
|
.length() > 0))));
|
||||||
}
|
}
|
||||||
|
|
||||||
private JTextField getUserNameField() {
|
private JTextField getUserNameField() {
|
||||||
@@ -288,7 +289,7 @@ public class UserEditDialog extends ButtonDialog {
|
|||||||
if (bioArea == null) {
|
if (bioArea == null) {
|
||||||
bioArea = new JTextArea();
|
bioArea = new JTextArea();
|
||||||
if (existingEntity != null)
|
if (existingEntity != null)
|
||||||
bioArea.setText(existingEntity.getBio());
|
bioArea.setText(existingEntity.getBio().replace("<br>", "\n"));
|
||||||
bioArea.setFont(getUserNameField().getFont());
|
bioArea.setFont(getUserNameField().getFont());
|
||||||
bioArea.setBorder(getUserNameField().getBorder());
|
bioArea.setBorder(getUserNameField().getBorder());
|
||||||
bioArea.setPreferredSize(new Dimension(192, 69));
|
bioArea.setPreferredSize(new Dimension(192, 69));
|
||||||
|
|||||||
Reference in New Issue
Block a user