Browse Source

Merge branch 'release/9.0' of http://www.finedevelop.com:2015/scm/~plough/design into release/9.0

master
plough 7 years ago
parent
commit
65c46b6b94
  1. 8
      designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java
  2. 4
      designer/src/com/fr/design/widget/WidgetPane.java
  3. 4
      designer/src/com/fr/design/widget/ui/ButtonDefinePane.java
  4. 60
      designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java
  5. 18
      designer/src/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java
  6. 4
      designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java
  7. 2
      designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java
  8. 3
      designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java

8
designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -75,8 +75,8 @@ public class CellWidgetPropertyPane extends BasicPane {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }
} }
cellEditorDefPane.populate(cellWidget);
cellEditorDefPane.populate(cellWidget);
} }
@ -122,10 +122,16 @@ public class CellWidgetPropertyPane extends BasicPane {
} }
} }
}); });
if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
} }
}
public void reInitAllListener(){
cellEditorDefPane.registerListener();
}
private Widget upDateWidgetAuthority(TemplateCellElement cellElement, Widget newWidget) { private Widget upDateWidgetAuthority(TemplateCellElement cellElement, Widget newWidget) {
try { try {
Widget oldWidget = (Widget) cellElement.getWidget().clone(); Widget oldWidget = (Widget) cellElement.getWidget().clone();

4
designer/src/com/fr/design/widget/WidgetPane.java

@ -163,6 +163,10 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
} }
public void registerListener(){
initAllListeners();
}
private static class EditorTypeComboBox extends UIComboBox { private static class EditorTypeComboBox extends UIComboBox {
private Item item = new Item(Inter.getLocText("Widget-User_Defined"), private Item item = new Item(Inter.getLocText("Widget-User_Defined"),

4
designer/src/com/fr/design/widget/ui/ButtonDefinePane.java

@ -1,10 +1,12 @@
package com.fr.design.widget.ui; package com.fr.design.widget.ui;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.CellWidgetPropertyPane;
import com.fr.design.widget.ui.btn.ButtonDetailPaneFactory; import com.fr.design.widget.ui.btn.ButtonDetailPaneFactory;
import com.fr.form.ui.Button; import com.fr.form.ui.Button;
import com.fr.form.ui.FreeButton; import com.fr.form.ui.FreeButton;
import com.fr.design.widget.btn.ButtonDetailPane; import com.fr.design.widget.btn.ButtonDetailPane;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.*;
@ -38,6 +40,8 @@ public class ButtonDefinePane extends AbstractDataModify<Button> {
} }
}); });
this.updateUI(); this.updateUI();
CellWidgetPropertyPane.getInstance().reInitAllListener();
CellWidgetPropertyPane.getInstance().update();
} }
@Override @Override

60
designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java

@ -11,7 +11,6 @@ import com.fr.base.background.ColorBackground;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.border.TitledBorder;
import com.fr.base.background.ImageBackground; import com.fr.base.background.ImageBackground;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -19,22 +18,18 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.widget.accessibles.AccessibleBackgroundEditor;
import com.fr.design.style.background.BackgroundButtonPane; import com.fr.design.style.background.BackgroundButtonPane;
import com.fr.form.ui.FreeButton; import com.fr.form.ui.FreeButton;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.Inter; import com.fr.general.Inter;
public class ButtonSytleDefinedPane extends BasicPane { public class ButtonSytleDefinedPane extends BasicPane {
protected AccessibleBackgroundEditor initBackgroundPane;
// private UIComboBox buttonStyleComboBox; protected AccessibleBackgroundEditor overBackgroundPane;
// private JPanel card; protected AccessibleBackgroundEditor clickBackgroundPane;
// private CardLayout cardLayout;
private BackgroundPane initBackgroundPane;
private BackgroundPane overBackgroundPane;
private BackgroundPane clickBackgroundPane;
private Background initBackground;
private Background overBackground;
private Background clickBackground;
public ButtonSytleDefinedPane() { public ButtonSytleDefinedPane() {
this.initComponents(); this.initComponents();
@ -42,21 +37,22 @@ public class ButtonSytleDefinedPane extends BasicPane {
protected void initComponents() { protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
initBackgroundPane = new AccessibleBackgroundEditor();
JPanel buttonStylePane = new JPanel(); overBackgroundPane = new AccessibleBackgroundEditor();
buttonStylePane.setLayout(new BorderLayout()); clickBackgroundPane = new AccessibleBackgroundEditor();
initBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Initial") + ":", Inter.getLocText("FR-Designer_Initial_Background_Tips")); double f = TableLayout.FILL;
overBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Over") + ":", Inter.getLocText("FR-Designer_Mouse_Move_Tips")); final double p = TableLayout.PREFERRED;
clickBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Click") + ":", Inter.getLocText("FR-Designer_Mouse_Click_Tips")); double[] rowSize = {p, p, p};
double[] columnSize = {p, f};
JPanel table = FRGUIPaneFactory.createYBoxEmptyBorderPane(); int[][] rowCount = {{1, 1},{1, 1},{1, 1}};
table.setBorder(new TitledBorder(Inter.getLocText(new String[]{"Custom", "Form-Button", "Style"}))); Component[][] components = new Component[][]{
table.add(initBackgroundPane); new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Initial")), initBackgroundPane},
table.add(overBackgroundPane); new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Over")), overBackgroundPane},
table.add(clickBackgroundPane); new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Click")), clickBackgroundPane},
buttonStylePane.add(table, BorderLayout.WEST); };
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 7, 7);
this.add(buttonStylePane, BorderLayout.CENTER); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
this.add(panel, BorderLayout.CENTER);
} }
@ -64,16 +60,16 @@ public class ButtonSytleDefinedPane extends BasicPane {
if (button == null) { if (button == null) {
return; return;
} }
initBackgroundPane.populate(button.getInitialBackground()); initBackgroundPane.setValue(button.getInitialBackground());
overBackgroundPane.populate(button.getOverBackground()); overBackgroundPane.setValue(button.getOverBackground());
clickBackgroundPane.populate(button.getClickBackground()); clickBackgroundPane.setValue(button.getClickBackground());
} }
public FreeButton update(FreeButton button) { public FreeButton update(FreeButton button) {
button.setCustomStyle(true); button.setCustomStyle(true);
button.setInitialBackground(initBackgroundPane.update()); button.setInitialBackground((Background) initBackgroundPane.getValue());
button.setOverBackground(overBackgroundPane.update()); button.setOverBackground((Background) overBackgroundPane.getValue());
button.setClickBackground(clickBackgroundPane.update()); button.setClickBackground((Background) clickBackgroundPane.getValue());
return button; return button;
} }

18
designer/src/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java

@ -1,25 +1,17 @@
package com.fr.design.widget.ui.btn; package com.fr.design.widget.ui.btn;
import java.awt.Component; import java.awt.Component;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.component.ButtonBackgroundPane;
import com.fr.form.ui.FreeButton; import com.fr.form.ui.FreeButton;
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane; import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane;
import com.fr.general.Inter;
import javax.swing.*;
public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton> { public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton> {
private ButtonBackgroundPane backgroundCompPane; private ButtonSytleDefinedPane buttonSytleDefinedPane;
@Override @Override
protected Component createCenterPane() { protected Component createCenterPane() {
backgroundCompPane = new ButtonBackgroundPane(); buttonSytleDefinedPane = new ButtonSytleDefinedPane();
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background") + ":"), backgroundCompPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); return buttonSytleDefinedPane;
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
return jPanel;
} }
@Override @Override
@ -29,13 +21,13 @@ public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton
public void populate(FreeButton button) { public void populate(FreeButton button) {
super.populate(button); super.populate(button);
backgroundCompPane.populate(button); buttonSytleDefinedPane.populate(button);
} }
@Override @Override
public FreeButton update() { public FreeButton update() {
FreeButton button = super.update(); FreeButton button = super.update();
backgroundCompPane.update(button); buttonSytleDefinedPane.update(button);
return button; return button;
} }

4
designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java

@ -26,7 +26,7 @@ import java.util.List;
/** /**
* Created by shine on 2017/8/21. * Created by shine on 2017/8/21.
*/ */
public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent{ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent {
// 定义加载窗口大小 // 定义加载窗口大小
private static final int LOAD_WIDTH = 455; private static final int LOAD_WIDTH = 455;
private static final int INCIDENT_HEIGHT = 15; private static final int INCIDENT_HEIGHT = 15;
@ -190,7 +190,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent{
private void setProgress(double current) { private void setProgress(double current) {
progressbar.setValue((int) current); progressbar.setValue((int) current);
progressbar.setString(current / totalBytes * PERCENT + "%"); progressbar.setString((int) (current / totalBytes * PERCENT) + "%");
progressbar.paintImmediately(new Rectangle(0, 0, LOAD_WIDTH, INCIDENT_HEIGHT * 2)); progressbar.paintImmediately(new Rectangle(0, 0, LOAD_WIDTH, INCIDENT_HEIGHT * 2));
} }

2
designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java

@ -62,6 +62,7 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
text.setText(check.getText()); text.setText(check.getText());
fontSizePane.setValue(check.getFontSize()); fontSizePane.setValue(check.getFontSize());
formWidgetValuePane.populate(check); formWidgetValuePane.populate(check);
labelNameTextField.setText(check.getLabelName());
} }
@Override @Override
@ -70,6 +71,7 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
box.setText(text.getText()); box.setText(text.getText());
box.setFontSize((int)fontSizePane.getValue()); box.setFontSize((int)fontSizePane.getValue());
formWidgetValuePane.update(box); formWidgetValuePane.update(box);
box.setLabelName(labelNameTextField.getText());
return box; return box;
} }
} }

3
designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java

@ -9,7 +9,6 @@ import com.fr.design.gui.ibutton.UIHeadGroup;
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.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -39,7 +38,6 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
private UIComboBox currentFormatComboBox; private UIComboBox currentFormatComboBox;
private UILabel currentSamplelabel; private UILabel currentSamplelabel;
private UIHeadGroup fomatHeadGroup; private UIHeadGroup fomatHeadGroup;
protected UITextField labelNameTextField;
public DateEditorDefinePane(XCreator xCreator) { public DateEditorDefinePane(XCreator xCreator) {
super(xCreator); super(xCreator);
@ -60,7 +58,6 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
returnTypePane.add(new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type") + ":"), BorderLayout.WEST); returnTypePane.add(new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type") + ":"), BorderLayout.WEST);
returnTypeComboBox = new UIButtonGroup<>(new String[] {Inter.getLocText("Date") , Inter.getLocText("String")}); returnTypeComboBox = new UIButtonGroup<>(new String[] {Inter.getLocText("Date") , Inter.getLocText("String")});
JPanel formatHead = createFormatHead(); JPanel formatHead = createFormatHead();
labelNameTextField = new UITextField();
startDv = new DateValuePane(); startDv = new DateValuePane();
endDv = new DateValuePane(); endDv = new DateValuePane();
double f = TableLayout.FILL; double f = TableLayout.FILL;

Loading…
Cancel
Save