|
|
|
@ -144,7 +144,7 @@ public class RenameAction extends UpdateAction {
|
|
|
|
|
fnf.isDirectory() ? |
|
|
|
|
"Fine-Design_Basic_Enter_New_Folder_Name" : "Fine-Design_Basic_Enter_New_File_Name") |
|
|
|
|
); |
|
|
|
|
newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
|
|
|
|
newNameLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|
|
|
|
newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); |
|
|
|
|
//newNameLabel.setPreferredSize(new Dimension(118, 15));
|
|
|
|
|
|
|
|
|
@ -170,7 +170,7 @@ public class RenameAction extends UpdateAction {
|
|
|
|
|
nameField.selectAll(); |
|
|
|
|
nameField.setPreferredSize(new Dimension(170, 20)); |
|
|
|
|
|
|
|
|
|
JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5)); |
|
|
|
|
JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 5)); |
|
|
|
|
topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15)); |
|
|
|
|
topPanel.add(newNameLabel); |
|
|
|
|
topPanel.add(nameField); |
|
|
|
@ -180,14 +180,14 @@ public class RenameAction extends UpdateAction {
|
|
|
|
|
// 重名提示
|
|
|
|
|
warnLabel = new UILabel(); |
|
|
|
|
warnLabel.setPreferredSize(new Dimension(300, 50)); |
|
|
|
|
warnLabel.setHorizontalAlignment(SwingConstants.LEFT); |
|
|
|
|
warnLabel.setHorizontalAlignment(SwingConstants.LEADING); |
|
|
|
|
warnLabel.setVerticalAlignment(SwingConstants.TOP); |
|
|
|
|
warnLabel.setForeground(Color.RED); |
|
|
|
|
warnLabel.setVisible(false); |
|
|
|
|
|
|
|
|
|
JPanel midPanel = new JPanel(new BorderLayout()); |
|
|
|
|
midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); |
|
|
|
|
midPanel.add(warnLabel, BorderLayout.WEST); |
|
|
|
|
midPanel.add(warnLabel, BorderLayout.LINE_START); |
|
|
|
|
|
|
|
|
|
// 确认按钮
|
|
|
|
|
confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); |
|
|
|
@ -210,7 +210,7 @@ public class RenameAction extends UpdateAction {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); |
|
|
|
|
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.TRAILING, 10, 0)); |
|
|
|
|
buttonsPane.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10)); |
|
|
|
|
buttonsPane.add(confirmButton); |
|
|
|
|
buttonsPane.add(cancelButton); |
|
|
|
|