Browse Source

REPORT-18720 模板web属性里面采用服务器设置时 工具栏按钮应该是处于灰化且不可点击状态

feature/big-screen
Hades 5 years ago
parent
commit
a0204bc2f6
  1. 12
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java
  2. 2
      designer-realize/src/main/java/com/fr/design/webattr/WebSettingPane.java

12
designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java

@ -9,6 +9,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.ToolBar;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.report.web.Location; import com.fr.report.web.Location;
import com.fr.report.web.ToolBarManager; import com.fr.report.web.ToolBarManager;
@ -35,6 +36,7 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.image.ImageObserver; import java.awt.image.ImageObserver;
import java.util.List;
/** /**
* 新的拖拽ToolBar button以实现自定义工具栏 报表web设置那儿的.应该不叫ToolBarDragPane因为实际没有提供drag功能 * 新的拖拽ToolBar button以实现自定义工具栏 报表web设置那儿的.应该不叫ToolBarDragPane因为实际没有提供drag功能
@ -225,6 +227,16 @@ public class ToolBarDragPane extends WidgetToolBarPane {
public void setAllEnabled(boolean b) { public void setAllEnabled(boolean b) {
GUICoreUtils.setEnabled(this, b); GUICoreUtils.setEnabled(this, b);
isEnabled = b; isEnabled = b;
removeAllListener(northToolBar.getToolBarButtons());
}
private void removeAllListener(List<ToolBarButton> toolBarButtons) {
for (ToolBarButton button : toolBarButtons) {
button.setEnabled(isEnabled);
if (!isEnabled) {
button.removeMouseListener(button);
}
}
} }
/** /**

2
designer-realize/src/main/java/com/fr/design/webattr/WebSettingPane.java

@ -122,8 +122,8 @@ public abstract class WebSettingPane<T extends WebContent> extends BasicBeanPane
choseComboBox.removeItemListener(itemListener); choseComboBox.removeItemListener(itemListener);
choseComboBox.setSelectedIndex(SERVER_SET); choseComboBox.setSelectedIndex(SERVER_SET);
choseComboBox.addItemListener(itemListener); choseComboBox.addItemListener(itemListener);
checkEnabled(false);
populateServerSettings(); populateServerSettings();
checkEnabled(false);
return; return;
} }
// 模板设置 // 模板设置

Loading…
Cancel
Save