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. 14
      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; package com.fr.design.mainframe;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import java.awt.*;
/** /**
* Created by plough on 2017/9/4. * Created by plough on 2017/9/4.
*/ */
@ -27,9 +24,4 @@ public class ReportHyperlinkGroupPaneNoPop extends ReportHyperlinkGroupPane{
protected boolean isNewStyle() { protected boolean isNewStyle() {
return false; 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 com.fr.design.mainframe.ElementCasePane;
import java.awt.*;
/** /**
* 没有悬浮弹窗的控件事件编辑面板 * 没有悬浮弹窗的控件事件编辑面板
* Created by plough on 2017/8/28. * Created by plough on 2017/8/28.
@ -17,9 +15,4 @@ public class WidgetEventPaneNoPop extends WidgetEventPane {
protected boolean isNewStyle() { protected boolean isNewStyle() {
return false; 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 { public abstract class UIControlPane extends BasicPane implements UnrepeatedNameHelper {
protected static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30 protected static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30
protected JPanel controlUpdatePane; protected JPanel controlUpdatePane;
private ShortCut4JControlPane[] shorts; private ShortCut4JControlPane[] shorts;
private NameableCreator[] creators; private NameableCreator[] creators;
private ToolBarDef toolbarDef; private ToolBarDef toolbarDef;
private UIToolbar toolBar; private UIToolbar toolBar;
private UIToolbar topToolBar; private UIToolbar topToolBar;
protected PopupEditDialog popupEditDialog; protected PopupEditDialog popupEditDialog;
// peter:这是整体的一个cardLayout Pane // peter:这是整体的一个cardLayout Pane
protected CardLayout cardLayout; protected CardLayout cardLayout;
protected JPanel cardPane; protected JPanel cardPane;
protected BasePlot plot; protected BasePlot plot;
public UIControlPane() { public UIControlPane() {
this.initComponentPane(); this.initComponentPane();
} }
@ -128,8 +123,15 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
this.add(getLeftPane(), BorderLayout.CENTER); this.add(getLeftPane(), BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 15, 15)); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 15, 15));
} else { } 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 // 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.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true); mainSplitPane.setOneTouchExpandable(true);
this.add(mainSplitPane, BorderLayout.CENTER); this.add(mainSplitPane, BorderLayout.CENTER);

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

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

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

Loading…
Cancel
Save