Browse Source

Merge remote-tracking branch 'origin/dev' into dev

master
mengao 7 years ago
parent
commit
b70af41d1b
  1. 12
      designer_base/src/com/fr/design/extra/PluginHelper.java
  2. 29
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java
  3. 21
      designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java

12
designer_base/src/com/fr/design/extra/PluginHelper.java

@ -8,7 +8,6 @@ import com.fr.general.*;
import com.fr.general.http.HttpClient;
import com.fr.plugin.Plugin;
import com.fr.plugin.PluginConfigManager;
import com.fr.stable.plugin.PluginConstants;
import com.fr.plugin.PluginLoader;
import com.fr.plugin.PluginManagerHelper;
import com.fr.plugin.dependence.PluginDependence;
@ -18,11 +17,15 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.plugin.PluginConstants;
import com.fr.stable.project.ProjectConstants;
import com.fr.stable.xml.XMLTools;
import javax.swing.*;
import java.io.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URLDecoder;
import java.util.ArrayList;
@ -43,6 +46,7 @@ public class PluginHelper {
public static final String TEMP_FILE = "temp.zip";
public static final String CONNECTION_404 = "404";
/**
* 下载插件
*
@ -337,9 +341,11 @@ public class PluginHelper {
* @return 当前插件比老的插件版本高则返回true否则返回false
*/
public static boolean isNewThan(Plugin plugin, Plugin oldPlugin) {
return ComparatorUtils.compare(plugin.getVersion(), oldPlugin.getVersion()) >= 0;
return plugin.versionCompareTo(oldPlugin) >= 0;
}
private static String sendInstalledPluginInfo(final Plugin plugin) {
if (StableUtils.isDebug()) {
return "debug status";

29
designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java

@ -96,7 +96,7 @@ public class DataLabelPane extends TooltipContentsPane {
}
delimiterBox.setPreferredSize(new Dimension(70, 20));
JPanel boxPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
boxPane.add(new UILabel(Inter.getLocText("Form-Delimiter") + ":"));
boxPane.add(new UILabel(Inter.getLocText("FR-Designer_Dismenber") + ":"));
boxPane.add(delimiterBox);
return boxPane;
}
@ -111,34 +111,9 @@ public class DataLabelPane extends TooltipContentsPane {
}
protected JPanel createJPanel4Position() {
// 标签位置:上下左右中.
bottomButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Bottom"));
leftButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Left"));
rigtButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Right"));
topButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Top"));
centerButton = new UIRadioButton(Inter.getLocText("Center"));
ButtonGroup bg = new ButtonGroup();
bg.add(bottomButton);
bg.add(leftButton);
bg.add(rigtButton);
bg.add(topButton);
bg.add(centerButton);
topButton.setSelected(true);
JPanel buttonPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
buttonPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "Layout"}) + ":"));
buttonPane.add(bottomButton);
buttonPane.add(leftButton);
buttonPane.add(rigtButton);
buttonPane.add(topButton);
buttonPane.add(centerButton);
return buttonPane;
return null;
}
public void populate(AttrContents seriesAttrContents) {
super.populate(seriesAttrContents);
String dataLabel = seriesAttrContents.getSeriesLabel();

21
designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java

@ -26,6 +26,7 @@ import com.fr.general.ComparatorUtils;
public class WidgetPropertyTable extends AbstractPropertyTable {
private FormDesigner designer;
private static final int LEFT_COLUMN_WIDTH = 97; // "属性名"列的宽度
public WidgetPropertyTable(FormDesigner designer) {
super();
@ -84,12 +85,21 @@ public class WidgetPropertyTable extends AbstractPropertyTable {
}
TableModel model = new BeanTableModel();
setModel(model);
this.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
this.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
TableColumn tc = this.getColumn(this.getColumnName(0));
tc.setPreferredWidth(30);
tc.setMinWidth(LEFT_COLUMN_WIDTH);
tc.setMaxWidth(LEFT_COLUMN_WIDTH);
this.repaint();
}
private void setRightColumnWidth(boolean automode) {
int rightColumnWidth = this.getWidth() - LEFT_COLUMN_WIDTH;
TableColumn tcRight = this.getColumn(this.getColumnName(1));
tcRight.setMinWidth(automode ? 0 : rightColumnWidth);
tcRight.setMaxWidth(automode ? this.getWidth() : rightColumnWidth);
}
private void setDesigner(FormDesigner designer) {
this.designer = designer;
}
@ -111,6 +121,13 @@ public class WidgetPropertyTable extends AbstractPropertyTable {
return null;
}
@Override
public void columnMarginChanged(javax.swing.event.ChangeEvent e) {
setRightColumnWidth(false);
super.columnMarginChanged(e);
setRightColumnWidth(true);
}
/**
* 待说明
*/

Loading…
Cancel
Save