Browse Source

REPORT-64506 && REPORT-64457 && REPORT-64456 && REPORT-64425 && REPORT-64422

feature/x
Henry.Wang 3 years ago
parent
commit
ff8805aec1
  1. 6
      designer-realize/src/main/java/com/fr/design/mainframe/AbstractAttrPane.java
  2. 7
      designer-realize/src/main/java/com/fr/design/mainframe/cell/AbstractDSCellEditorPane.java
  3. 2
      designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortItemPane.java
  4. 1
      designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java
  5. 26
      designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java

6
designer-realize/src/main/java/com/fr/design/mainframe/AbstractAttrPane.java

@ -66,6 +66,10 @@ public abstract class AbstractAttrPane extends AbstractAttrNoScrollPane {
}); });
} }
protected int getMaxHeight(){
return CellElementPropertyPane.getInstance().getHeight() - TITLE_HEIGHT;
}
/** /**
* 属性面板的滚动条和内容区域的布局管理类 * 属性面板的滚动条和内容区域的布局管理类
*/ */
@ -93,7 +97,7 @@ public abstract class AbstractAttrPane extends AbstractAttrNoScrollPane {
@Override @Override
public void layoutContainer(Container parent) { public void layoutContainer(Container parent) {
maxHeight = CellElementPropertyPane.getInstance().getHeight() - TITLE_HEIGHT; maxHeight = getMaxHeight();
if ((MAXVALUE - scrollBar.getVisibleAmount()) == 0) { if ((MAXVALUE - scrollBar.getVisibleAmount()) == 0) {
beginY = 0; beginY = 0;
} else { } else {

7
designer-realize/src/main/java/com/fr/design/mainframe/cell/AbstractDSCellEditorPane.java

@ -12,6 +12,7 @@ import com.fr.design.mainframe.AbstractAttrPane;
*/ */
public abstract class AbstractDSCellEditorPane extends AbstractAttrPane { public abstract class AbstractDSCellEditorPane extends AbstractAttrPane {
private static final int FIXED_HEIGHT = 200;
/** /**
* 从面板拿数据保存 * 从面板拿数据保存
@ -31,7 +32,11 @@ public abstract class AbstractDSCellEditorPane extends AbstractAttrPane {
protected abstract AttributeChangeListener getAttributeChangeListener(); protected abstract AttributeChangeListener getAttributeChangeListener();
public void addAttributeChangeListener(){ public void addAttributeChangeListener() {
this.addAttributeChangeListener(getAttributeChangeListener()); this.addAttributeChangeListener(getAttributeChangeListener());
} }
protected int getMaxHeight() {
return Math.max(super.getMaxHeight() - FIXED_HEIGHT, 0);
}
} }

2
designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortItemPane.java

@ -31,7 +31,7 @@ public class CellDSColumnSortItemPane extends AbstractSortItemPane {
public SortExpression updateBean() { public SortExpression updateBean() {
SortExpression sortExpression = super.updateBean(); SortExpression sortExpression = super.updateBean();
if (sortExpression != null) { if (sortExpression != null && sortAreaUiComboBox.getSelectedItem() != null) {
sortExpression.setSortArea(sortAreaUiComboBox.getSelectedItem().toString()); sortExpression.setSortArea(sortAreaUiComboBox.getSelectedItem().toString());
} }
return sortExpression; return sortExpression;

1
designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java

@ -113,6 +113,7 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
} else { } else {
selectButton.setIcon(DISABLED_ICON); selectButton.setIcon(DISABLED_ICON);
} }
selectButton.setEnabled(false);
refresh(); refresh();
} }

26
designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java

@ -2,6 +2,8 @@ package com.fr.design.sort.common;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -29,7 +31,7 @@ public class SortUIExpandablePane extends JPanel {
this.sortGroupPane = sortGroupPane; this.sortGroupPane = sortGroupPane;
this.contentPane = contentPane; this.contentPane = contentPane;
initComponents(); initComponents();
wrapPane.setBorder(BorderFactory.createLineBorder(Color.gray, 1)); wrapPane.setBorder(BorderFactory.createLineBorder(new Color(217, 218, 221), 1));
wrapPane.setBackground(Color.WHITE); wrapPane.setBackground(Color.WHITE);
this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 5)); this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 5));
} }
@ -45,7 +47,7 @@ public class SortUIExpandablePane extends JPanel {
setContentPanelShow(!contentPane.isVisible()); setContentPanelShow(!contentPane.isVisible());
} }
}); });
headerPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.gray)); headerPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(217, 218, 221)));
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
wrapPane.add(headerPane, BorderLayout.NORTH); wrapPane.add(headerPane, BorderLayout.NORTH);
wrapPane.add(contentPane, BorderLayout.CENTER); wrapPane.add(contentPane, BorderLayout.CENTER);
@ -59,14 +61,15 @@ public class SortUIExpandablePane extends JPanel {
headerPane.setShow(show); headerPane.setShow(show);
} }
class HeaderPane extends JPanel { class HeaderPane extends JPanel implements UIObserver {
UILabel iconUiLabel; UILabel iconUiLabel;
UILabel closeButton; UILabel closeButton;
AbstractSortGroupPane sortGroupPane; AbstractSortGroupPane sortGroupPane;
UIObserverListener uiObserverListener;
HeaderPane(AbstractSortGroupPane sortGroupPane) { HeaderPane(AbstractSortGroupPane sortGroupPane) {
this.sortGroupPane = sortGroupPane; this.sortGroupPane = sortGroupPane;
this.setLayout(new FlowLayout(FlowLayout.LEFT, 3, 3)); this.setLayout(new FlowLayout(FlowLayout.LEFT, 3, 0));
initComponents(); initComponents();
} }
@ -75,14 +78,18 @@ public class SortUIExpandablePane extends JPanel {
this.add(iconUiLabel); this.add(iconUiLabel);
UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Second_Sort")); UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Second_Sort"));
this.add(uiLabel); this.add(uiLabel);
this.add(AbstractSortPane.createIntervalUILabel(114)); this.add(AbstractSortPane.createIntervalUILabel(108));
closeButton = new UILabel(IconUtils.readIcon("/com/fr/design/images/control/close.png")); closeButton = new UILabel(IconUtils.readIcon("/com/fr/design/images/control/close.png"));
closeButton.setPreferredSize(new Dimension(16, 20));
this.add(closeButton); this.add(closeButton);
closeButton.addMouseListener(new MouseAdapter() { closeButton.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
sortGroupPane.removeSortItem(1); sortGroupPane.removeSortItem(1);
if (uiObserverListener != null) {
uiObserverListener.doChange();
}
} }
}); });
this.setPreferredSize(new Dimension(contentPane.sortItemPaneWidth + 7, AbstractSortPane.PANE_COMPONENT_HEIGHT)); this.setPreferredSize(new Dimension(contentPane.sortItemPaneWidth + 7, AbstractSortPane.PANE_COMPONENT_HEIGHT));
@ -96,6 +103,15 @@ public class SortUIExpandablePane extends JPanel {
} }
} }
@Override
public void registerChangeListener(UIObserverListener uiObserverListener) {
this.uiObserverListener = uiObserverListener;
}
@Override
public boolean shouldResponseChangeListener() {
return true;
}
} }
} }
Loading…
Cancel
Save