Browse Source

REPORT-4364 条件属性>控件、超级链接弹窗=>界面调整,优化代码

master
plough 7 years ago
parent
commit
44a4f91bb4
  1. 8
      designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPaneNoPop.java
  2. 7
      designer/src/com/fr/design/widget/WidgetEventPaneNoPop.java
  3. 14
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  4. 4
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  5. 7
      designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPaneNoPop.java

8
designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPaneNoPop.java

@ -1,10 +1,7 @@
package com.fr.design.mainframe;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import java.awt.*;
/**
* Created by plough on 2017/9/4.
*/
@ -27,9 +24,4 @@ public class ReportHyperlinkGroupPaneNoPop extends ReportHyperlinkGroupPane{
protected boolean isNewStyle() {
return false;
}
@Override
protected void popupEditDialog(Point mousePos) {
// no pop, do nothing
}
}

7
designer/src/com/fr/design/widget/WidgetEventPaneNoPop.java

@ -2,8 +2,6 @@ package com.fr.design.widget;
import com.fr.design.mainframe.ElementCasePane;
import java.awt.*;
/**
* 没有悬浮弹窗的控件事件编辑面板
* Created by plough on 2017/8/28.
@ -17,9 +15,4 @@ public class WidgetEventPaneNoPop extends WidgetEventPane {
protected boolean isNewStyle() {
return false;
}
@Override
protected void popupEditDialog(Point mousePos) {
// no pop, do nothing
}
}

14
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -27,22 +27,17 @@ import java.awt.event.WindowEvent;
public abstract class UIControlPane extends BasicPane implements UnrepeatedNameHelper {
protected static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30
protected JPanel controlUpdatePane;
private ShortCut4JControlPane[] shorts;
private NameableCreator[] creators;
private ToolBarDef toolbarDef;
private UIToolbar toolBar;
private UIToolbar topToolBar;
protected PopupEditDialog popupEditDialog;
// peter:这是整体的一个cardLayout Pane
protected CardLayout cardLayout;
protected JPanel cardPane;
protected BasePlot plot;
public UIControlPane() {
this.initComponentPane();
}
@ -128,8 +123,15 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
this.add(getLeftPane(), BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 15, 15));
} else {
// 增加边框
JPanel leftPaneWrapper = new JPanel(new BorderLayout());
leftPaneWrapper.add(getLeftPane(), BorderLayout.CENTER);
leftPaneWrapper.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6));
JPanel rightPaneWrapper = new JPanel(new BorderLayout());
rightPaneWrapper.add(cardPane, BorderLayout.CENTER);
rightPaneWrapper.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6));
// SplitPane
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane);
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftPaneWrapper, rightPaneWrapper);
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true);
this.add(mainSplitPane, BorderLayout.CENTER);

4
designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

@ -390,7 +390,8 @@ public abstract class UIListControlPane extends UIControlPane {
}
}
protected void popupEditDialog(Point mousePos) {
private void popupEditDialog(Point mousePos) {
if (isNewStyle()) {
Rectangle currentCellBounds = nameableList.getCellBounds(editingIndex, editingIndex);
if (editingIndex < 0 || !currentCellBounds.contains(mousePos)) {
return;
@ -398,6 +399,7 @@ public abstract class UIListControlPane extends UIControlPane {
popupEditDialog.setLocation(getPopupDialogLocation());
popupEditDialog.setVisible(true);
}
}
private Point getPopupDialogLocation() {
Point resultPos = new Point(0, 0);

7
designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPaneNoPop.java

@ -2,8 +2,6 @@ package com.fr.design.gui.xpane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import java.awt.*;
/**
* Created by plough on 2017/9/5.
*/
@ -25,9 +23,4 @@ public class FormHyperlinkGroupPaneNoPop extends FormHyperlinkGroupPane{
protected boolean isNewStyle() {
return false;
}
@Override
protected void popupEditDialog(Point mousePos) {
// no pop, do nothing
}
}

Loading…
Cancel
Save