Browse Source

REPORT-134842 & REPORT-134740 fix:存储过程命名交互问题 & 日期下拉框问题

fbp/merge
Levy.Xie-解安森 3 months ago
parent
commit
b37b7415c7
  1. 10
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  2. 51
      designer-base/src/main/java/com/fr/design/gui/date/UIDatePicker.java

10
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -81,7 +81,6 @@ import javax.swing.JScrollBar;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.ToolTipManager;
import javax.swing.border.EmptyBorder;
import javax.swing.tree.TreePath;
import java.awt.BorderLayout;
import java.awt.Color;
@ -509,11 +508,10 @@ public class TableDataTreePane extends BasicTableDataTreePane {
} else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName)) {
nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table_Data_Duplicate_Name_Tips", tempName));
dg.setButtonEnabled(false);
} else if (oldName.length() >= PROCEDURE_NAME_INDEX && tableDataPane.updateBean() instanceof MultiResultTableData) {
if (isIncludeUnderline(tempName)) {
nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Result_Table_Data_Name_Tips"));
dg.setButtonEnabled(false);
}
} else if (oldName.length() >= PROCEDURE_NAME_INDEX && tableDataPane.updateBean() instanceof MultiResultTableData
&& isIncludeUnderline(tempName)) {
nPanel.setShowText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Result_Table_Data_Name_Tips"));
dg.setButtonEnabled(false);
} else if (!BasicTableDataUtils.checkName(tempName)) {
dg.setButtonEnabled(false);
} else {

51
designer-base/src/main/java/com/fr/design/gui/date/UIDatePicker.java

@ -1,10 +1,7 @@
package com.fr.design.gui.date;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIStyle;
import com.fr.design.gui.ibutton.UIButton;
import com.fine.theme.light.ui.FineComboBoxUI;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxUI;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
@ -13,6 +10,7 @@ import com.fr.stable.StringUtils;
import com.fr.design.carton.FeedbackToolboxDialog;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
@ -26,6 +24,7 @@ import javax.swing.plaf.basic.ComboPopup;
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.LayoutManager;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.Serializable;
import java.text.ParseException;
@ -292,40 +291,44 @@ public class UIDatePicker extends UIComboBox implements Serializable {
@Override
protected ComboBoxUI getUIComboBoxUI() {
return new UIComboBoxUI() {
return new FineComboBoxUI() {
@Override
protected UIButton createArrowButton() {
arrowButton = new UIButton(new LazyIcon("down_arrow")) {
public boolean shouldResponseChangeListener() {
return false;
}
};
arrowButton.addMouseListener(this);
comboBox.addMouseListener(this);
FineUIStyle.setStyle(arrowButton, FineUIStyle.PLAIN_BUTTON);
return (UIButton) arrowButton;
protected JButton createArrowButton() {
JButton button = super.createArrowButton();
button.addMouseListener(getPopupMouseAdapter());
return button;
}
@Override
protected ComboPopup createPopup() {
return new DatePopup(comboBox);
}
@Override
public void mousePressed(MouseEvent e) {
if (UIDatePicker.this.isPopupVisible()) {
willHide = true;
UIDatePicker.this.hidePopup();
} else {
willHide = false;
UIDatePicker.this.showPopup();
}
protected void installListeners() {
super.installListeners();
comboBox.addMouseListener(getPopupMouseAdapter());
}
MouseAdapter getPopupMouseAdapter() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (UIDatePicker.this.isPopupVisible()) {
willHide = true;
UIDatePicker.this.hidePopup();
} else {
willHide = false;
UIDatePicker.this.showPopup();
}
}
};
}
};
}
//设置dataFormat
public void setDateFormat(SimpleDateFormat format){
this.dateFormat = format;

Loading…
Cancel
Save