Browse Source

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

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

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

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

Loading…
Cancel
Save