daniel 8 years ago
parent
commit
baefefbd27
  1. 2
      designer/src/com/fr/design/mainframe/bbs/LoginDialog.java
  2. 8
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  3. 2
      designer_base/build.gradle
  4. 2
      designer_base/build.gradle.bak
  5. 74
      designer_base/src/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
  6. 6
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  7. 1
      designer_base/src/com/fr/design/fun/MenuHandler.java
  8. 3
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  9. 2
      designer_chart/build.gradle
  10. 2
      designer_chart/build.gradle.bak
  11. 2
      designer_form/build.gradle
  12. 4
      designer_form/build.gradle.bak

2
designer/src/com/fr/design/mainframe/bbs/LoginDialog.java

@ -15,7 +15,7 @@ import java.awt.*;
* Created by zhaohehe on 16/7/26.
*/
public class LoginDialog extends UIDialog {
private static final Dimension DEFAULT_SHOP = new Dimension(404, 204);
private static final Dimension DEFAULT_SHOP = new Dimension(401, 201);
public LoginDialog(Frame frame, BasicPane pane) {
super(frame);

8
designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -87,6 +87,7 @@ public class UserInfoLabel extends UILabel{
LoginCheckContext.addLoginCheckListener(new LoginCheckListener() {
@Override
public void loginChecked() {
/*
if (bbsLoginDialog == null) {
bbsLoginDialog = new BBSLoginDialog(DesignerContext.getDesignerFrame(), UserInfoLabel.this);
}
@ -94,6 +95,7 @@ public class UserInfoLabel extends UILabel{
bbsLoginDialog.showTipForDownloadPluginWithoutLogin();
bbsLoginDialog.setModal(true);
bbsLoginDialog.showWindow();
*/
}
});
@ -282,7 +284,11 @@ public class UserInfoLabel extends UILabel{
public void mousePressed(MouseEvent e) {
if(StringUtils.isNotEmpty(userName)){
try {
Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.default")));
String loginUrl = SiteCenter.getInstance().acquireUrlByKind("bbs.default") +
"&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=" +
"&username=" + DesignerEnvManager.getEnvManager().getBBSName() +
"&password=" + DesignerEnvManager.getEnvManager().getBBSPassword();
Desktop.getDesktop().browse(new URI(loginUrl));
} catch (Exception exp) {
FRContext.getLogger().info(exp.getMessage());
}

2
designer_base/build.gradle

@ -32,7 +32,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'

2
designer_base/build.gradle.bak

@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar")
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'
}

74
designer_base/src/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java

@ -1,16 +1,23 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.Parameter;
import com.fr.data.impl.ClassTableData;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.formula.JavaEditorPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableEditorPane;
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;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider;
import com.fr.stable.project.ProjectConstants;
import javax.swing.*;
@ -21,6 +28,7 @@ import java.io.File;
public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
private UITextField classNameTextField;
private UITableEditorPane<ParameterProvider> editorPane;
public ClassTableDataPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -89,13 +97,62 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
};
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.add(northPane, BorderLayout.NORTH);
// TODO alex_ENV
// northPane.add(flowTableLayoutHelper.createLabelFlowPane(
// " ", new UILabel(Inter.getLocText("Example") + ":" +
// BaseCoreUtils.pathJoin(new String[] {FRContext.getCurrentEnv().getPath(), "classes"}))));
this.add(initSouthPanel(), BorderLayout.SOUTH);
}
private JPanel initSouthPanel() {
JPanel jpanel = new JPanel();
jpanel.setPreferredSize(new Dimension(-1, 150));
jpanel.setLayout(new BorderLayout());
editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel() {
@Override
public UITableEditAction[] createAction() {
return new UITableEditAction[]{
new AddParaAction(),
new RemoveParaAction()
};
}
}, " " + Inter.getLocText("FR-Designer_TableData-Default-Para"));
jpanel.add(editorPane, BorderLayout.CENTER);
return jpanel;
}
public class AddParaAction extends UITableEditAction {
public AddParaAction() {
this.setName(Inter.getLocText("FR-Designer_Add"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
}
public void actionPerformed(ActionEvent e) {
java.util.List<ParameterProvider> oldParas = editorPane.update();
oldParas.add(new Parameter());
editorPane.populate(oldParas.toArray(new ParameterProvider[oldParas.size()]));
}
@Override
public void checkEnabled() {
}
}
private class RemoveParaAction extends UITableEditAction {
public RemoveParaAction() {
this.setName(Inter.getLocText("FR-Designer_Remove"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/remove.png"));
}
public void actionPerformed(ActionEvent e) {
ParameterProvider selectedPara = editorPane.getTableModel().getSelectedValue();
java.util.List<ParameterProvider> oldParas = editorPane.update();
oldParas.remove(selectedPara);
editorPane.populate(oldParas.toArray(new ParameterProvider[oldParas.size()]));
}
@Override
public void checkEnabled() {
}
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText("DS-Class_TableData");
@ -103,12 +160,17 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
@Override
public void populateBean(ClassTableData ob) {
this.editorPane.populate(ob.getParameters(Calculator.createCalculator()));
this.classNameTextField.setText(ob.getClassName());
}
@Override
public ClassTableData updateBean() {
return new ClassTableData(this.classNameTextField.getText());
ClassTableData tableData = new ClassTableData(this.classNameTextField.getText());
java.util.List<ParameterProvider> paras = this.editorPane.update();
tableData.setParameters(paras.toArray(new ParameterProvider[paras.size()]));
return tableData;
}

6
designer_base/src/com/fr/design/extra/PluginWebBridge.java

@ -379,7 +379,11 @@ public class PluginWebBridge {
*/
public void getPriviteMessage() {
try {
Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.default")));
String loginUrl = SiteCenter.getInstance().acquireUrlByKind("bbs.default") +
"&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=" +
"&username=" + DesignerEnvManager.getEnvManager().getBBSName() +
"&password=" + DesignerEnvManager.getEnvManager().getBBSPassword();
Desktop.getDesktop().browse(new URI(loginUrl));
}catch (Exception exp) {
FRContext.getLogger().info(exp.getMessage());
}

1
designer_base/src/com/fr/design/fun/MenuHandler.java

@ -18,6 +18,7 @@ public interface MenuHandler extends Mutable {
int LAST = -1;
int HIDE =-2;
String HELP = "help";
String SERVER = "server";

3
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -525,6 +525,9 @@ public abstract class ToolBarMenuDock {
for (MenuHandler handler : target) {
int insertPosition = handler.insertPosition(menuDef.getShortCutCount());
if (insertPosition == MenuHandler.HIDE) {
return;
}
ShortCut shortCut = action.methodAction(handler);
if (shortCut == null) {
continue;

2
designer_chart/build.gradle

@ -30,7 +30,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'

2
designer_chart/build.gradle.bak

@ -31,7 +31,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar")
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'
}

2
designer_form/build.gradle

@ -32,7 +32,7 @@ buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'

4
designer_form/build.gradle.bak

@ -32,8 +32,8 @@ buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar")
compile fileTree(dir:"../../../finereport-lib-stable${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'
}

Loading…
Cancel
Save