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. 10
      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

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

@ -75,8 +75,8 @@ public class CellWidgetPropertyPane extends BasicPane {
FRContext.getLogger().error(e.getMessage(), e);
}
}
cellEditorDefPane.populate(cellWidget);
cellEditorDefPane.populate(cellWidget);
}
@ -122,10 +122,16 @@ public class CellWidgetPropertyPane extends BasicPane {
}
}
});
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
}
public void reInitAllListener(){
cellEditorDefPane.registerListener();
}
private Widget upDateWidgetAuthority(TemplateCellElement cellElement, Widget newWidget) {
try {
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 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;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.CellWidgetPropertyPane;
import com.fr.design.widget.ui.btn.ButtonDetailPaneFactory;
import com.fr.form.ui.Button;
import com.fr.form.ui.FreeButton;
import com.fr.design.widget.btn.ButtonDetailPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
@ -38,6 +40,8 @@ public class ButtonDefinePane extends AbstractDataModify<Button> {
}
});
this.updateUI();
CellWidgetPropertyPane.getInstance().reInitAllListener();
CellWidgetPropertyPane.getInstance().update();
}
@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 javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.border.TitledBorder;
import com.fr.base.background.ImageBackground;
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.BasicPane;
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.form.ui.FreeButton;
import com.fr.general.Background;
import com.fr.general.Inter;
public class ButtonSytleDefinedPane extends BasicPane {
// private UIComboBox buttonStyleComboBox;
// private JPanel card;
// private CardLayout cardLayout;
private BackgroundPane initBackgroundPane;
private BackgroundPane overBackgroundPane;
private BackgroundPane clickBackgroundPane;
private Background initBackground;
private Background overBackground;
private Background clickBackground;
protected AccessibleBackgroundEditor initBackgroundPane;
protected AccessibleBackgroundEditor overBackgroundPane;
protected AccessibleBackgroundEditor clickBackgroundPane;
public ButtonSytleDefinedPane() {
this.initComponents();
@ -42,21 +37,22 @@ public class ButtonSytleDefinedPane extends BasicPane {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel buttonStylePane = new JPanel();
buttonStylePane.setLayout(new BorderLayout());
initBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Initial") + ":", Inter.getLocText("FR-Designer_Initial_Background_Tips"));
overBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Over") + ":", Inter.getLocText("FR-Designer_Mouse_Move_Tips"));
clickBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Click") + ":", Inter.getLocText("FR-Designer_Mouse_Click_Tips"));
JPanel table = FRGUIPaneFactory.createYBoxEmptyBorderPane();
table.setBorder(new TitledBorder(Inter.getLocText(new String[]{"Custom", "Form-Button", "Style"})));
table.add(initBackgroundPane);
table.add(overBackgroundPane);
table.add(clickBackgroundPane);
buttonStylePane.add(table, BorderLayout.WEST);
this.add(buttonStylePane, BorderLayout.CENTER);
initBackgroundPane = new AccessibleBackgroundEditor();
overBackgroundPane = new AccessibleBackgroundEditor();
clickBackgroundPane = new AccessibleBackgroundEditor();
double f = TableLayout.FILL;
final double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1},{1, 1},{1, 1}};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Initial")), initBackgroundPane},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Over")), overBackgroundPane},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Click")), clickBackgroundPane},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 7, 7);
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) {
return;
}
initBackgroundPane.populate(button.getInitialBackground());
overBackgroundPane.populate(button.getOverBackground());
clickBackgroundPane.populate(button.getClickBackground());
initBackgroundPane.setValue(button.getInitialBackground());
overBackgroundPane.setValue(button.getOverBackground());
clickBackgroundPane.setValue(button.getClickBackground());
}
public FreeButton update(FreeButton button) {
button.setCustomStyle(true);
button.setInitialBackground(initBackgroundPane.update());
button.setOverBackground(overBackgroundPane.update());
button.setClickBackground(clickBackgroundPane.update());
button.setInitialBackground((Background) initBackgroundPane.getValue());
button.setOverBackground((Background) overBackgroundPane.getValue());
button.setClickBackground((Background) clickBackgroundPane.getValue());
return button;
}

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

@ -1,25 +1,17 @@
package com.fr.design.widget.ui.btn;
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.design.widget.btn.ButtonWithHotkeysDetailPane;
import com.fr.general.Inter;
import javax.swing.*;
public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton> {
private ButtonBackgroundPane backgroundCompPane;
private ButtonSytleDefinedPane buttonSytleDefinedPane;
@Override
protected Component createCenterPane() {
backgroundCompPane = new ButtonBackgroundPane();
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background") + ":"), backgroundCompPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
return jPanel;
buttonSytleDefinedPane = new ButtonSytleDefinedPane();
return buttonSytleDefinedPane;
}
@Override
@ -29,13 +21,13 @@ public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton
public void populate(FreeButton button) {
super.populate(button);
backgroundCompPane.populate(button);
buttonSytleDefinedPane.populate(button);
}
@Override
public FreeButton update() {
FreeButton button = super.update();
backgroundCompPane.update(button);
buttonSytleDefinedPane.update(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.
*/
public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent{
public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent {
// 定义加载窗口大小
private static final int LOAD_WIDTH = 455;
private static final int INCIDENT_HEIGHT = 15;
@ -190,7 +190,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent{
private void setProgress(double 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));
}

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());
fontSizePane.setValue(check.getFontSize());
formWidgetValuePane.populate(check);
labelNameTextField.setText(check.getLabelName());
}
@Override
@ -70,6 +71,7 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
box.setText(text.getText());
box.setFontSize((int)fontSizePane.getValue());
formWidgetValuePane.update(box);
box.setLabelName(labelNameTextField.getText());
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.ilable.UILabel;
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.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -39,7 +38,6 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
private UIComboBox currentFormatComboBox;
private UILabel currentSamplelabel;
private UIHeadGroup fomatHeadGroup;
protected UITextField labelNameTextField;
public DateEditorDefinePane(XCreator 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);
returnTypeComboBox = new UIButtonGroup<>(new String[] {Inter.getLocText("Date") , Inter.getLocText("String")});
JPanel formatHead = createFormatHead();
labelNameTextField = new UITextField();
startDv = new DateValuePane();
endDv = new DateValuePane();
double f = TableLayout.FILL;

Loading…
Cancel
Save