|
|
@ -87,6 +87,8 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { |
|
|
|
unavailableTipLabel.setText("<html>" + tipText + "<html>"); |
|
|
|
unavailableTipLabel.setText("<html>" + tipText + "<html>"); |
|
|
|
unavailableTipLabel.setForeground(Color.gray); |
|
|
|
unavailableTipLabel.setForeground(Color.gray); |
|
|
|
panel.add(unavailableTipLabel, BorderLayout.NORTH); |
|
|
|
panel.add(unavailableTipLabel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Allow_Full_Screen")); |
|
|
|
|
|
|
|
panel.add(allowFullCheckBox); |
|
|
|
return panel; |
|
|
|
return panel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -150,19 +152,20 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { |
|
|
|
public void populate(FormDesigner designer) { |
|
|
|
public void populate(FormDesigner designer) { |
|
|
|
this.designer = designer; |
|
|
|
this.designer = designer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BaseChartEditor chartEditor = (BaseChartEditor)xCreator.toData(); |
|
|
|
|
|
|
|
boolean allowFullScreen = chartEditor.getMobileAttr().isAllowFullScreen(); |
|
|
|
|
|
|
|
this.allowFullCheckBox.setSelected(allowFullScreen); |
|
|
|
|
|
|
|
this.bindListeners2Widgets(); |
|
|
|
|
|
|
|
this.addAttributeChangeListener(changeListener); |
|
|
|
|
|
|
|
|
|
|
|
if (!isAppRelayout() || isInAbsoluteLayout()) { |
|
|
|
if (!isAppRelayout() || isInAbsoluteLayout()) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BaseChartEditor chartEditor = (BaseChartEditor)xCreator.toData(); |
|
|
|
|
|
|
|
ChartMobileFitAttrStateProvider zoomOutAttr = chartEditor.getMobileAttr().getZoomOutAttr(); |
|
|
|
ChartMobileFitAttrStateProvider zoomOutAttr = chartEditor.getMobileAttr().getZoomOutAttr(); |
|
|
|
this.zoomOutComboBox.setSelectedItem(new Item(zoomOutAttr.description(), zoomOutAttr)); |
|
|
|
this.zoomOutComboBox.setSelectedItem(new Item(zoomOutAttr.description(), zoomOutAttr)); |
|
|
|
updateTipLabel(); |
|
|
|
updateTipLabel(); |
|
|
|
boolean allowFullScreen = chartEditor.getMobileAttr().isAllowFullScreen(); |
|
|
|
|
|
|
|
this.allowFullCheckBox.setSelected(allowFullScreen); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 数据 populate 完成后,再设置监听
|
|
|
|
|
|
|
|
this.bindListeners2Widgets(); |
|
|
|
|
|
|
|
this.zoomOutComboBox.addItemListener(new ItemListener() { |
|
|
|
this.zoomOutComboBox.addItemListener(new ItemListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
@ -171,21 +174,24 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
updateTipLabel(); |
|
|
|
updateTipLabel(); |
|
|
|
ChartMobileFitAttrState selectedAttr = (ChartMobileFitAttrState)((Item)e.getItem()).getValue(); |
|
|
|
ChartMobileFitAttrState selectedAttr = (ChartMobileFitAttrState) ((Item) e.getItem()).getValue(); |
|
|
|
if (selectedAttr.getState() != ChartMobileFitAttrState.AUTO.getState()) { |
|
|
|
if (selectedAttr.getState() != ChartMobileFitAttrState.AUTO.getState()) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.addAttributeChangeListener(changeListener); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void update() { |
|
|
|
public void update() { |
|
|
|
ChartMobileAttrProvider mobileAttr = ((BaseChartEditor)xCreator.toData()).getMobileAttr(); |
|
|
|
ChartMobileAttrProvider mobileAttr = ((BaseChartEditor)xCreator.toData()).getMobileAttr(); |
|
|
|
mobileAttr.setZoomInAttr(ChartMobileFitAttrState.PROPORTION); |
|
|
|
if(zoomOutComboBox != null) { |
|
|
|
mobileAttr.setZoomOutAttr((ChartMobileFitAttrState)((Item)zoomOutComboBox.getSelectedItem()).getValue()); |
|
|
|
mobileAttr.setZoomInAttr(ChartMobileFitAttrState.PROPORTION); |
|
|
|
mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected()); |
|
|
|
mobileAttr.setZoomOutAttr((ChartMobileFitAttrState) ((Item) zoomOutComboBox.getSelectedItem()).getValue()); |
|
|
|
|
|
|
|
mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected()); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected()); |
|
|
|
|
|
|
|
} |
|
|
|
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
|
|
|
|
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|