|
|
@ -1,12 +1,14 @@ |
|
|
|
package com.fr.design.mainframe.widget.ui; |
|
|
|
package com.fr.design.mainframe.widget.ui; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import java.awt.*; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Created by ibm on 2017/7/26. |
|
|
|
* Created by ibm on 2017/7/26. |
|
|
@ -14,20 +16,26 @@ import java.awt.*; |
|
|
|
public class FormBasicWidgetPropertyPane extends FormBasicPropertyPane { |
|
|
|
public class FormBasicWidgetPropertyPane extends FormBasicPropertyPane { |
|
|
|
private UICheckBox enableCheckBox; |
|
|
|
private UICheckBox enableCheckBox; |
|
|
|
private UICheckBox visibleCheckBox; |
|
|
|
private UICheckBox visibleCheckBox; |
|
|
|
|
|
|
|
private XCreator xCreator; |
|
|
|
|
|
|
|
|
|
|
|
public FormBasicWidgetPropertyPane (){ |
|
|
|
public FormBasicWidgetPropertyPane (XCreator xCreator){ |
|
|
|
|
|
|
|
this.xCreator = xCreator; |
|
|
|
initOtherPane(); |
|
|
|
initOtherPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void initOtherPane() { |
|
|
|
protected void initOtherPane() { |
|
|
|
JPanel pane2 = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
JPanel pane2 = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
pane2.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); |
|
|
|
pane2.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
|
|
|
|
|
|
|
if(xCreator.supportSetEnable()){ |
|
|
|
enableCheckBox = new UICheckBox(Inter.getLocText("Enabled"), true); |
|
|
|
enableCheckBox = new UICheckBox(Inter.getLocText("Enabled"), true); |
|
|
|
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
|
|
|
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); |
|
|
|
pane2.add(enableCheckBox); |
|
|
|
pane2.add(enableCheckBox); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(xCreator.supportSetVisible()){ |
|
|
|
visibleCheckBox = new UICheckBox(Inter.getLocText("Widget-Visible"), true); |
|
|
|
visibleCheckBox = new UICheckBox(Inter.getLocText("Widget-Visible"), true); |
|
|
|
visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
|
|
|
visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); |
|
|
|
pane2.add(visibleCheckBox); |
|
|
|
pane2.add(visibleCheckBox); |
|
|
|
|
|
|
|
} |
|
|
|
this.add(pane2, BorderLayout.CENTER); |
|
|
|
this.add(pane2, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -38,14 +46,22 @@ public class FormBasicWidgetPropertyPane extends FormBasicPropertyPane { |
|
|
|
|
|
|
|
|
|
|
|
public void populate(Widget widget) { |
|
|
|
public void populate(Widget widget) { |
|
|
|
super.populate(widget); |
|
|
|
super.populate(widget); |
|
|
|
|
|
|
|
if(xCreator.supportSetEnable()){ |
|
|
|
enableCheckBox.setSelected(widget.isEnabled()); |
|
|
|
enableCheckBox.setSelected(widget.isEnabled()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(xCreator.supportSetVisible()){ |
|
|
|
visibleCheckBox.setSelected(widget.isVisible()); |
|
|
|
visibleCheckBox.setSelected(widget.isVisible()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void update(Widget widget) { |
|
|
|
public void update(Widget widget) { |
|
|
|
super.update(widget); |
|
|
|
super.update(widget); |
|
|
|
|
|
|
|
if(xCreator.supportSetEnable()){ |
|
|
|
widget.setEnabled(enableCheckBox.isSelected()); |
|
|
|
widget.setEnabled(enableCheckBox.isSelected()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(xCreator.supportSetVisible()){ |
|
|
|
widget.setVisible(visibleCheckBox.isSelected()); |
|
|
|
widget.setVisible(visibleCheckBox.isSelected()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|