Browse Source

REPORT-6373 tab隐藏

kerry 7 years ago
parent
commit
6088af74c9
  1. 29
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java
  2. 2
      designer_form/src/com/fr/design/mainframe/FormArea.java

29
designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java

@ -28,7 +28,12 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.border.Border;
import java.awt.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Rectangle;
import java.beans.IntrospectionException;
@ -623,4 +628,26 @@ public class XWTabFitLayout extends XWFitLayout {
xCardSwitchButton.setPreferredSize(new Dimension(width, xCardSwitchButton.getHeight()));
}
private void checkVisible(){
WTabFitLayout wTabFitLayout = (WTabFitLayout)this.data;
CardSwitchButton cardSwitchButton = wTabFitLayout.getCurrentCard();
cardSwitchButton.setVisible(wTabFitLayout.isVisible());
}
/**
* 是否支持设置可见
* return boolean
*/
@Override
public boolean supportSetVisible(){
return true;
}
@Override
public void resetVisible(boolean visible){
checkVisible();
}
}

2
designer_form/src/com/fr/design/mainframe/FormArea.java

@ -488,7 +488,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
public void scrollPathToVisible(XCreator creator) {
creator.seleteRelatedComponent(creator);
if (!ComponentUtils.isComponentVisible(creator) && !designer.isRoot(creator) && (creator.toData()).isVisible()) {
if (!ComponentUtils.isComponentVisible(creator) && !designer.isRoot(creator)) {
designer.makeVisible(creator);
}

Loading…
Cancel
Save