Browse Source

REPORT-14057 10.0日文国际化问题处理=>50 图表->数据集面板显示不全

bugfix/10.0
plough 6 years ago
parent
commit
88b2d74a3c
  1. 19
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java
  2. 10
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

19
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java

@ -12,10 +12,12 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.UIComponentUtils;
import javax.swing.*; import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.LineBorder; import javax.swing.border.LineBorder;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
@ -29,19 +31,24 @@ public class DatabaseTableDataPane extends BasicPane{
private Object lastSelectObject; private Object lastSelectObject;
public DatabaseTableDataPane(UILabel label) { public DatabaseTableDataPane(UILabel label) {
initComponents(label);
}
private void initComponents(UILabel label) {
initTableCombox(); initTableCombox();
initReviewButton(); initReviewButton();
this.setLayout(new BorderLayout(0,0)); this.setLayout(new BorderLayout(0,0));
if(label != null) { if (label != null) {
this.add(label, BorderLayout.WEST); this.add(label, BorderLayout.WEST);
} }
JPanel pane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); JPanel pane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0));
pane.add(tableNameCombox,BorderLayout.CENTER); pane.add(tableNameCombox,BorderLayout.CENTER);
pane.add(reviewButton,BorderLayout.EAST); pane.add(reviewButton,BorderLayout.EAST);
this.add(pane,BorderLayout.CENTER);
setBorder (); this.add(UIComponentUtils.wrapWithBorderLayoutPane(pane),BorderLayout.CENTER);
setBorder();
} }
protected void setBorder () { protected void setBorder () {

10
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

@ -13,6 +13,7 @@ import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.utils.gui.UIComponentUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -21,6 +22,8 @@ import java.awt.Dimension;
public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
private static final long serialVersionUID = 4740461028440155147L; private static final long serialVersionUID = 4740461028440155147L;
private static final int TOP = -5; private static final int TOP = -5;
private static final int TABLE_DATA_LABEL_LINE_WRAP_WIDTH = 65;
private static final int TABLE_DATA_PANE_WIDTH = 246;
private DatabaseTableDataPane tableDataPane; private DatabaseTableDataPane tableDataPane;
private AbstractTableDataContentPane dataContentPane; private AbstractTableDataContentPane dataContentPane;
@ -36,8 +39,9 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
} }
private void initDataPane() { private void initDataPane() {
UILabel label = new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TableData")) ; UILabel label = new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TableData"));
label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); UIComponentUtils.setLineWrap(label, TABLE_DATA_LABEL_LINE_WRAP_WIDTH);
tableDataPane = new DatabaseTableDataPane(label) { tableDataPane = new DatabaseTableDataPane(label) {
@Override @Override
protected void userEvent() { protected void userEvent() {
@ -46,7 +50,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
} }
}; };
tableDataPane.setPreferredSize(new Dimension(246 , 20)); tableDataPane.setPreferredSize(new Dimension(TABLE_DATA_PANE_WIDTH , tableDataPane.getPreferredSize().height));
this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0)); this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0));
this.add(tableDataPane, BorderLayout.NORTH); this.add(tableDataPane, BorderLayout.NORTH);
} }

Loading…
Cancel
Save