Browse Source

REPORT-1096 取色板=》将取色框改为模态对话框;修改鼠标事件响应方法

master
plough 8 years ago
parent
commit
874d88ca75
  1. 6
      designer/src/com/fr/design/actions/report/ReportBackgroundAction.java
  2. 3
      designer_base/src/com/fr/design/style/color/ColorPicker.java
  3. 2
      designer_base/src/com/fr/design/style/color/ColorSelectDialog.java
  4. 10
      designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java

6
designer/src/com/fr/design/actions/report/ReportBackgroundAction.java

@ -37,16 +37,14 @@ public class ReportBackgroundAction extends ReportComponentAction<ReportComponen
}
final ReportBackgroundPane bPane = new ReportBackgroundPane();
bPane.populate(ReportUtils.getReportSettings(reportPane.getTemplateReport()));
BasicDialog bDialog = bPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
bPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
bPane.update(reportPane.getTemplateReport().getReportSettings());
reportPane.fireTargetModified();
}
});
bDialog.setModal(false);
bDialog.setVisible(true);
}).setVisible(true);
return false;
}
}

3
designer_base/src/com/fr/design/style/color/ColorPicker.java

@ -49,7 +49,10 @@ public class ColorPicker extends JDialog implements ActionListener
updateSize(colorPickerSize);
this.colorSelectable = colorSelectable;
this.setColorRealTime = setColorRealTime;
start();
this.setModal(true);
this.setAlwaysOnTop(true);
updateLocation();
this.setVisible(true);
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
}

2
designer_base/src/com/fr/design/style/color/ColorSelectDialog.java

@ -137,7 +137,7 @@ public class ColorSelectDialog extends MiddleChartDialog{
public static void showDialog(Frame owner,ColorSelectDetailPane pane,Color initialColor,ColorSelectable selectePane){
ColorTracker okListener = new ColorTracker(pane);
ColorSelectDialog dialog = new ColorSelectDialog(owner,pane,initialColor,okListener,selectePane);
// dialog.setModal(true);
dialog.setModal(true);
dialog.show();
}

10
designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java

@ -4,8 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.design.gui.ibutton.UIButton;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.*;
/**
* Created by plough on 2016/12/22.
@ -28,11 +27,10 @@ public class PickColorButtonFactory {
}
pickColorButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
pickColorButton.addActionListener(new ActionListener() {
pickColorButton.addMouseListener(new MouseAdapter() {
@Override
public void actionPerformed(ActionEvent e) {
ColorPicker colorPicker = new ColorPicker(colorSelectable, setColorRealTime);
colorPicker.start();
public void mousePressed(MouseEvent e) {
new ColorPicker(colorSelectable, setColorRealTime);
}
});

Loading…
Cancel
Save