|
|
@ -10,6 +10,7 @@ import com.fr.design.designer.creator.XWAbsoluteLayout; |
|
|
|
import com.fr.design.designer.properties.items.Item; |
|
|
|
import com.fr.design.designer.properties.items.Item; |
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
|
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
|
|
|
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
@ -42,6 +43,7 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { |
|
|
|
private UIComboBox zoomOutComboBox;// 缩小逻辑下拉框
|
|
|
|
private UIComboBox zoomOutComboBox;// 缩小逻辑下拉框
|
|
|
|
private AttributeChangeListener changeListener; |
|
|
|
private AttributeChangeListener changeListener; |
|
|
|
private UILabel tipLabel; |
|
|
|
private UILabel tipLabel; |
|
|
|
|
|
|
|
private UICheckBox allowFullCheckBox;//允许全屏
|
|
|
|
|
|
|
|
|
|
|
|
public ChartEditorDefinePane(XCreator xCreator) { |
|
|
|
public ChartEditorDefinePane(XCreator xCreator) { |
|
|
|
this.xCreator = xCreator; |
|
|
|
this.xCreator = xCreator; |
|
|
@ -94,18 +96,20 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { |
|
|
|
tipLabel = new UILabel(); |
|
|
|
tipLabel = new UILabel(); |
|
|
|
tipLabel.setForeground(Color.gray); |
|
|
|
tipLabel.setForeground(Color.gray); |
|
|
|
updateTipLabel(); |
|
|
|
updateTipLabel(); |
|
|
|
|
|
|
|
allowFullCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Allow_Full_Screen")); |
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Zoom_In_Logic"), SwingConstants.LEFT), new UILabel(ChartMobileFitAttrState.PROPORTION.description())}, |
|
|
|
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Zoom_In_Logic"), SwingConstants.LEFT), new UILabel(ChartMobileFitAttrState.PROPORTION.description())}, |
|
|
|
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Zoom_Out_Logic"), SwingConstants.LEFT), zoomOutComboBox}, |
|
|
|
new Component[] {new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Zoom_Out_Logic"), SwingConstants.LEFT), zoomOutComboBox}, |
|
|
|
new Component[] {tipLabel, null} |
|
|
|
new Component[] {tipLabel, null}, |
|
|
|
|
|
|
|
new Component[] {allowFullCheckBox} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] rowSize = {p, p, p}; |
|
|
|
double[] rowSize = {p, p, p, p}; |
|
|
|
double[] columnSize = {p,f}; |
|
|
|
double[] columnSize = {p,f}; |
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; |
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; |
|
|
|
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 30, LayoutConstants.VGAP_LARGE); |
|
|
|
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 30, LayoutConstants.VGAP_LARGE); |
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
|
|
|
final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
@ -154,6 +158,8 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { |
|
|
|
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 完成后,再设置监听
|
|
|
|
// 数据 populate 完成后,再设置监听
|
|
|
|
this.bindListeners2Widgets(); |
|
|
|
this.bindListeners2Widgets(); |
|
|
@ -179,6 +185,7 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane { |
|
|
|
ChartMobileAttrProvider mobileAttr = ((BaseChartEditor)xCreator.toData()).getMobileAttr(); |
|
|
|
ChartMobileAttrProvider mobileAttr = ((BaseChartEditor)xCreator.toData()).getMobileAttr(); |
|
|
|
mobileAttr.setZoomInAttr(ChartMobileFitAttrState.PROPORTION); |
|
|
|
mobileAttr.setZoomInAttr(ChartMobileFitAttrState.PROPORTION); |
|
|
|
mobileAttr.setZoomOutAttr((ChartMobileFitAttrState)((Item)zoomOutComboBox.getSelectedItem()).getValue()); |
|
|
|
mobileAttr.setZoomOutAttr((ChartMobileFitAttrState)((Item)zoomOutComboBox.getSelectedItem()).getValue()); |
|
|
|
|
|
|
|
mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected()); |
|
|
|
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
|
|
|
|
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|