* commit 'c86c59b2c770accc876719786e196ff26ab2a034': REPORT-51103 改个日志方便定位问题 REPORT-51103 优化界面显示 REPORT-51103 加上遗漏的mysql另一种驱动;优化展示效果 REPORT-49055 设计器数据连接配置界面优化 REPORT-49055 设计器数据连接配置界面优化 REPORT-49055 设计器数据连接配置界面优化 KERNEL-7376 优化设计器上一些性能问题 REPORT-49067 导出缺失字体提示 REPORT-49686 决策报表自适应布局,添加参数面板后,无法通过右侧设置面板调整绝对画布块的大小 【问题原因】这里绝对画布块的高度调整要分为两种方式,一种是拖拽改变,另一种是在右侧面板中改变高度数值,问题的原因是此前REPORT-7588中,拖拽时会走到FormSelection#fixCreator(),这里面为绝对画布块做特殊处理时,漏算了参数面板的高度,然后在REPORT-34739中,FRFitLayoutAdapter#fix()方法中处理了一下参数面板造成的偏移,所以拖拽的逻辑都正常;但是如果在右侧面板中改变高度时,会直接走到FRFitLayoutAdapter#fix()中,此时是没有漏算参数面板高度的,因此经过处理之后,反而组件的backupBound会多了个参数面板高度,这样会造成每次改变都加上这个高度,就出现了bug现象 【改动思路】把判断参数面板是否漏算的逻辑放到FormSelection#fixCreator()中 CHART-18881 单元格图表有时候无法点出图表属性面板 REPORT-50809 frm模版与cpt模版在设计器内预览图标大小不一致research/11.0
@ -0,0 +1,118 @@
|
||||
package com.fr.design.data.datapane.connect; |
||||
|
||||
import com.fr.data.impl.JDBCDatabaseConnection; |
||||
import com.fr.data.pool.DBCPConnectionPoolAttr; |
||||
import com.fr.design.constants.UIConstants; |
||||
import com.fr.design.dialog.BasicPane; |
||||
import com.fr.design.editor.editor.IntegerEditor; |
||||
import com.fr.design.gui.icombobox.UIComboBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Component; |
||||
import javax.swing.BorderFactory; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.SwingConstants; |
||||
|
||||
public class DBCPAttrPane extends BasicPane { |
||||
public static final int TIME_MULTIPLE = 1000; |
||||
// carl:DBCP的一些属性
|
||||
private IntegerEditor DBCP_INITIAL_SIZE = new IntegerEditor(); |
||||
private IntegerEditor DBCP_MAX_ACTIVE = new IntegerEditor(); |
||||
private IntegerEditor DBCP_MAX_IDLE = new IntegerEditor(); |
||||
private IntegerEditor DBCP_MIN_IDLE = new IntegerEditor(); |
||||
private IntegerEditor DBCP_MAX_WAIT = new IntegerEditor(); |
||||
private UITextField DBCP_VALIDATION_QUERY = new UITextField(); |
||||
|
||||
private UIComboBox DBCP_TESTONBORROW = new UIComboBox(new String[]{Toolkit.i18nText("Fine-Design_Basic_No"), Toolkit.i18nText("Fine-Design_Basic_Yes")}); |
||||
private UIComboBox DBCP_TESTONRETURN = new UIComboBox(new String[]{Toolkit.i18nText("Fine-Design_Basic_No"), Toolkit.i18nText("Fine-Design_Basic_Yes")}); |
||||
private UIComboBox DBCP_TESTWHILEIDLE = new UIComboBox(new String[]{Toolkit.i18nText("Fine-Design_Basic_No"), Toolkit.i18nText("Fine-Design_Basic_Yes")}); |
||||
|
||||
private IntegerEditor DBCP_TIMEBETWEENEVICTIONRUNSMILLS = new IntegerEditor(); |
||||
private IntegerEditor DBCP_NUMTESTSPEREVICTIONRUN = new IntegerEditor(); |
||||
private IntegerEditor DBCP_MINEVICTABLEIDLETIMEMILLIS = new IntegerEditor(); |
||||
|
||||
public DBCPAttrPane() { |
||||
JPanel defaultPane = this; |
||||
|
||||
// JPanel northFlowPane
|
||||
JPanel northFlowPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); |
||||
defaultPane.add(northFlowPane, BorderLayout.NORTH); |
||||
|
||||
DBCP_VALIDATION_QUERY.setColumns(15); |
||||
// ContextPane
|
||||
|
||||
double f = TableLayout.FILL; |
||||
// double p = TableLayout.PREFERRED;
|
||||
double[] rowSize = {f, f, f, f, f, f, f, f, f, f, f, f}; |
||||
double[] columnSize = {f, f}; |
||||
Component[][] comps = { |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Initial_Size") + ":", SwingConstants.RIGHT), DBCP_INITIAL_SIZE}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Max_Active") + ":", SwingConstants.RIGHT), DBCP_MAX_ACTIVE}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Max_Idle") + ":", SwingConstants.RIGHT), DBCP_MAX_IDLE}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Min_Idle") + ":", SwingConstants.RIGHT), DBCP_MIN_IDLE}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Max_Wait_Time") + ":", SwingConstants.RIGHT), DBCP_MAX_WAIT}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Validation_Query") + ":", SwingConstants.RIGHT), DBCP_VALIDATION_QUERY}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Borrow") + ":", SwingConstants.RIGHT), DBCP_TESTONBORROW}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Return") + ":", SwingConstants.RIGHT), DBCP_TESTONRETURN}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_While_Idle") + ":", SwingConstants.RIGHT), DBCP_TESTWHILEIDLE}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis") + ":", SwingConstants.RIGHT), |
||||
DBCP_TIMEBETWEENEVICTIONRUNSMILLS}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run") + ":", SwingConstants.RIGHT), DBCP_NUMTESTSPEREVICTIONRUN}, |
||||
{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Mix_Evictable_Idle_Time_Millis") + ":", SwingConstants.RIGHT), |
||||
DBCP_MINEVICTABLEIDLETIMEMILLIS}}; |
||||
|
||||
JPanel contextPane = TableLayoutHelper.createGapTableLayoutPane(comps, rowSize, columnSize, 10, 4); |
||||
contextPane.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, UIConstants.LINE_COLOR)); |
||||
northFlowPane.add(contextPane); |
||||
} |
||||
|
||||
public void populate(JDBCDatabaseConnection jdbcDatabase) { |
||||
DBCPConnectionPoolAttr dbcpAttr = jdbcDatabase.getDbcpAttr(); |
||||
if (dbcpAttr == null) { |
||||
dbcpAttr = new DBCPConnectionPoolAttr(); |
||||
jdbcDatabase.setDbcpAttr(dbcpAttr); |
||||
} |
||||
this.DBCP_INITIAL_SIZE.setValue(dbcpAttr.getInitialSize()); |
||||
this.DBCP_MAX_ACTIVE.setValue(dbcpAttr.getMaxActive()); |
||||
this.DBCP_MAX_IDLE.setValue(dbcpAttr.getMaxIdle()); |
||||
this.DBCP_MAX_WAIT.setValue(dbcpAttr.getMaxWait()); |
||||
this.DBCP_MIN_IDLE.setValue(dbcpAttr.getMinIdle()); |
||||
this.DBCP_VALIDATION_QUERY.setText(dbcpAttr.getValidationQuery()); |
||||
this.DBCP_TESTONBORROW.setSelectedIndex(dbcpAttr.isTestOnBorrow() ? 1 : 0); |
||||
this.DBCP_TESTONRETURN.setSelectedIndex(dbcpAttr.isTestOnReturn() ? 1 : 0); |
||||
this.DBCP_TESTWHILEIDLE.setSelectedIndex(dbcpAttr.isTestWhileIdle() ? 1 : 0); |
||||
this.DBCP_MINEVICTABLEIDLETIMEMILLIS.setValue(dbcpAttr.getMinEvictableIdleTimeMillis() / TIME_MULTIPLE); |
||||
this.DBCP_NUMTESTSPEREVICTIONRUN.setValue(dbcpAttr.getNumTestsPerEvictionRun()); |
||||
this.DBCP_TIMEBETWEENEVICTIONRUNSMILLS.setValue(dbcpAttr.getTimeBetweenEvictionRunsMillis()); |
||||
} |
||||
|
||||
public void update(JDBCDatabaseConnection jdbcDatabase) { |
||||
DBCPConnectionPoolAttr dbcpAttr = jdbcDatabase.getDbcpAttr(); |
||||
if (dbcpAttr == null) { |
||||
dbcpAttr = new DBCPConnectionPoolAttr(); |
||||
jdbcDatabase.setDbcpAttr(dbcpAttr); |
||||
} |
||||
dbcpAttr.setInitialSize(this.DBCP_INITIAL_SIZE.getValue().intValue()); |
||||
dbcpAttr.setMaxActive(this.DBCP_MAX_ACTIVE.getValue().intValue()); |
||||
dbcpAttr.setMaxIdle(this.DBCP_MAX_IDLE.getValue().intValue()); |
||||
dbcpAttr.setMaxWait(this.DBCP_MAX_WAIT.getValue().intValue()); |
||||
dbcpAttr.setMinIdle(this.DBCP_MIN_IDLE.getValue().intValue()); |
||||
dbcpAttr.setValidationQuery(this.DBCP_VALIDATION_QUERY.getText()); |
||||
dbcpAttr.setTestOnBorrow(this.DBCP_TESTONBORROW.getSelectedIndex() == 0 ? false : true); |
||||
dbcpAttr.setTestOnReturn(this.DBCP_TESTONRETURN.getSelectedIndex() == 0 ? false : true); |
||||
dbcpAttr.setTestWhileIdle(this.DBCP_TESTWHILEIDLE.getSelectedIndex() == 0 ? false : true); |
||||
dbcpAttr.setMinEvictableIdleTimeMillis(((Number) this.DBCP_MINEVICTABLEIDLETIMEMILLIS.getValue()).intValue() * TIME_MULTIPLE); |
||||
dbcpAttr.setNumTestsPerEvictionRun(((Number) this.DBCP_NUMTESTSPEREVICTIONRUN.getValue()).intValue()); |
||||
dbcpAttr.setTimeBetweenEvictionRunsMillis(((Number) this.DBCP_TIMEBETWEENEVICTIONRUNSMILLS.getValue()).intValue()); |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr"); |
||||
} |
||||
} |
@ -0,0 +1,173 @@
|
||||
package com.fr.design.mainframe.check; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.dialog.FineJOptionPane; |
||||
import com.fr.design.gui.ibutton.UIButton; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
import com.fr.file.FILE; |
||||
import com.fr.file.FileNodeFILE; |
||||
import com.fr.log.FineLoggerFactory; |
||||
import com.fr.rpc.ExceptionHandler; |
||||
import com.fr.rpc.RPCInvokerExceptionInfo; |
||||
import com.fr.workspace.WorkContext; |
||||
import com.fr.workspace.server.check.TemplateChecker; |
||||
|
||||
import javax.swing.BoxLayout; |
||||
import javax.swing.JDialog; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.SwingUtilities; |
||||
import javax.swing.SwingWorker; |
||||
import java.awt.Dimension; |
||||
import java.awt.FlowLayout; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
import java.awt.event.WindowAdapter; |
||||
import java.awt.event.WindowEvent; |
||||
import java.util.Set; |
||||
import java.util.concurrent.ExecutionException; |
||||
|
||||
import static javax.swing.JOptionPane.OK_CANCEL_OPTION; |
||||
import static javax.swing.JOptionPane.OK_OPTION; |
||||
import static javax.swing.JOptionPane.WARNING_MESSAGE; |
||||
|
||||
public class CheckButton extends UIButton { |
||||
|
||||
private UILabel message; |
||||
private UIButton okButton; |
||||
private JDialog dialog; |
||||
private UILabel uiLabel; |
||||
|
||||
public CheckButton() { |
||||
this.setIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/check.png")); |
||||
this.setToolTipText(Toolkit.i18nText("Fine_Designer_Check_Font")); |
||||
this.set4ToolbarButton(); |
||||
this.addActionListener(checkListener); |
||||
} |
||||
|
||||
private ActionListener checkListener = new ActionListener() { |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
|
||||
// Try check
|
||||
final SwingWorker<Set<String>, Void> checkThread = new SwingWorker<Set<String>, Void>() { |
||||
@Override |
||||
protected Set<String> doInBackground() throws Exception { |
||||
// 返回校验结果
|
||||
return check(DesignerContext.getDesignerFrame().getSelectedJTemplate()); |
||||
} |
||||
|
||||
@Override |
||||
protected void done() { |
||||
try { |
||||
Set<String> set = get(); |
||||
if (set == null) { |
||||
return; |
||||
} |
||||
if(set.isEmpty()) { |
||||
okButton.setEnabled(true); |
||||
uiLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/correct.png")); |
||||
message.setText("<html>" + Toolkit.i18nText("Fine_Designer_Check_Font_Success") + "</html>"); |
||||
} else { |
||||
dialog.dispose(); |
||||
StringBuilder textBuilder = new StringBuilder(); |
||||
textBuilder.append(Toolkit.i18nText("Fine_Designer_Check_Font_Missing_Font")).append("\n"); |
||||
for (String font : set) { |
||||
textBuilder.append(font).append("\n"); |
||||
} |
||||
String areaText = textBuilder.toString(); |
||||
CheckFontInfoDialog dialog = new CheckFontInfoDialog(DesignerContext.getDesignerFrame(), areaText); |
||||
dialog.setVisible(true); |
||||
} |
||||
} catch (InterruptedException | ExecutionException e) { |
||||
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
||||
} |
||||
} |
||||
}; |
||||
|
||||
JTemplate jtemplate = DesignerContext.getDesignerFrame().getSelectedJTemplate(); |
||||
if (jtemplate == null || jtemplate.getEditingFILE() == null) { |
||||
return; |
||||
} |
||||
FILE currentTemplate = jtemplate.getEditingFILE(); |
||||
if(currentTemplate instanceof FileNodeFILE){ |
||||
checkThread.execute(); |
||||
}else { |
||||
//模板不在报表环境下,提示保存
|
||||
int selVal = FineJOptionPane.showConfirmDialog( |
||||
DesignerContext.getDesignerFrame(), |
||||
Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"), |
||||
Toolkit.i18nText("Fine_Designer_Check_Font"), |
||||
OK_CANCEL_OPTION, |
||||
WARNING_MESSAGE); |
||||
|
||||
if (OK_OPTION == selVal) { |
||||
//保存成功才执行检测
|
||||
if (jtemplate.saveAsTemplate2Env()) { |
||||
checkThread.execute(); |
||||
} |
||||
} |
||||
} |
||||
initDialogPane(); |
||||
okButton.addActionListener(new ActionListener() { |
||||
public void actionPerformed(ActionEvent e) { |
||||
dialog.dispose(); |
||||
} |
||||
}); |
||||
|
||||
dialog.addWindowListener(new WindowAdapter() { |
||||
public void windowClosed(WindowEvent e) { |
||||
checkThread.cancel(true); |
||||
} |
||||
}); |
||||
|
||||
dialog.setVisible(true); |
||||
dialog.dispose(); |
||||
} |
||||
}; |
||||
|
||||
private Set<String> check(JTemplate jtemplate) { |
||||
String path = jtemplate.getEditingFILE().getEnvFullName(); |
||||
Set<String> fontSet = WorkContext.getCurrent().get(TemplateChecker.class, new ExceptionHandler<Void>() { |
||||
|
||||
@Override |
||||
public Void callHandler(RPCInvokerExceptionInfo rpcInvokerExceptionInfo) { |
||||
uiLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/error.png")); |
||||
message.setText("<html>" + Toolkit.i18nText("Fine_Designer_Check_Font_Upgrade") + "</html>"); |
||||
okButton.setEnabled(true); |
||||
return null; |
||||
} |
||||
}).checkFont(path); |
||||
return fontSet; |
||||
} |
||||
|
||||
private void initDialogPane() { |
||||
message = new UILabel(); |
||||
message.setText(Toolkit.i18nText("Fine-Designer_Check_Font_Checking") + "..."); |
||||
uiLabel = new UILabel(); |
||||
okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK")); |
||||
okButton.setEnabled(false); |
||||
dialog = new JDialog(); |
||||
dialog.setTitle(Toolkit.i18nText("Fine_Designer_Check_Font")); |
||||
dialog.setModal(true); |
||||
dialog.setSize(new Dimension(268, 118)); |
||||
JPanel jp = new JPanel(); |
||||
JPanel upPane = new JPanel(); |
||||
JPanel downPane = new JPanel(); |
||||
uiLabel = new UILabel(BaseUtils.readIcon("com/fr/design/images/waiting.png")); |
||||
upPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10)); |
||||
upPane.add(uiLabel); |
||||
upPane.add(message); |
||||
downPane.setLayout(new FlowLayout(FlowLayout.CENTER, 6, 0)); |
||||
downPane.add(okButton); |
||||
jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); |
||||
jp.add(upPane); |
||||
jp.add(downPane); |
||||
dialog.add(jp); |
||||
dialog.setResizable(false); |
||||
dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(this)); |
||||
} |
||||
} |
@ -0,0 +1,139 @@
|
||||
package com.fr.design.mainframe.check; |
||||
|
||||
import com.fr.design.dialog.link.MessageWithLink; |
||||
import com.fr.design.gui.ibutton.UIButton; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.utils.gui.GUICoreUtils; |
||||
import com.fr.general.CloudCenter; |
||||
import com.fr.general.GeneralContext; |
||||
import com.fr.general.IOUtils; |
||||
|
||||
import javax.swing.BorderFactory; |
||||
import javax.swing.JDialog; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.JScrollPane; |
||||
import javax.swing.JTextArea; |
||||
import javax.swing.UIManager; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Cursor; |
||||
import java.awt.Dimension; |
||||
import java.awt.Frame; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
import java.awt.event.MouseAdapter; |
||||
import java.awt.event.MouseEvent; |
||||
import java.util.Locale; |
||||
|
||||
/** |
||||
* 字体缺失检测的具体结果对话框 |
||||
* |
||||
*/ |
||||
public class CheckFontInfoDialog extends JDialog implements ActionListener { |
||||
|
||||
private JPanel topPanel; |
||||
private JPanel upInTopPanel; |
||||
private JPanel downInTopPanel; |
||||
private JPanel hiddenPanel; |
||||
private JPanel bottomPanel; |
||||
|
||||
private UILabel imageLabel; |
||||
private UILabel directUiLabel; |
||||
private UILabel detailLabel; |
||||
|
||||
public CheckFontInfoDialog(Frame parent, String areaText) { |
||||
super(parent,true); |
||||
//提示信息
|
||||
JPanel imagePanel = new JPanel(); |
||||
imageLabel = new UILabel(IOUtils.readIcon("com/fr/design/images/warnings/warning32.png")); |
||||
imagePanel.add(imageLabel); |
||||
|
||||
JPanel messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); |
||||
MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"), |
||||
Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"), |
||||
CloudCenter.getInstance().acquireUrlByKind("help.install.font", "https://help.fanruan.com/finereport/doc-view-3999.html")); |
||||
linkMessage.setPreferredSize(new Dimension(380, 31)); |
||||
messagePanel.add(linkMessage); |
||||
|
||||
// 查看详情按钮
|
||||
directUiLabel = new UILabel(); |
||||
directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.right")); |
||||
detailLabel = new UILabel(); |
||||
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail")); |
||||
|
||||
upInTopPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
upInTopPanel.add(imageLabel, BorderLayout.WEST); |
||||
upInTopPanel.add(messagePanel, BorderLayout.CENTER); |
||||
|
||||
downInTopPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
downInTopPanel.add(directUiLabel, BorderLayout.WEST); |
||||
downInTopPanel.add(detailLabel, BorderLayout.CENTER); |
||||
|
||||
topPanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); |
||||
topPanel.add(upInTopPanel, BorderLayout.NORTH); |
||||
topPanel.add(downInTopPanel, BorderLayout.SOUTH); |
||||
|
||||
//中间的详情展示(可隐藏)
|
||||
hiddenPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
hiddenPanel.setBorder(BorderFactory.createEmptyBorder(0,12,0,12)); |
||||
JScrollPane scrollPane = new JScrollPane(); |
||||
JTextArea checkArea = new JTextArea(areaText); |
||||
scrollPane.setViewportView(checkArea); |
||||
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
||||
checkArea.setEnabled(false); |
||||
hiddenPanel.add(scrollPane); |
||||
hiddenPanel.setVisible(false); |
||||
|
||||
downInTopPanel.addMouseListener(new MouseAdapter() { |
||||
@Override |
||||
public void mouseClicked(MouseEvent e) { |
||||
if (hiddenPanel.isVisible()) { |
||||
hiddenPanel.setVisible(false); |
||||
CheckFontInfoDialog.this.setSize(new Dimension(380, 185)); |
||||
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail")); |
||||
directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.right")); |
||||
} else { |
||||
CheckFontInfoDialog.this.setSize(new Dimension(380, 280)); |
||||
hiddenPanel.setVisible(true); |
||||
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Hide_Detail")); |
||||
directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.down")); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void mouseEntered(MouseEvent e) { |
||||
detailLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); |
||||
} |
||||
|
||||
@Override |
||||
public void mouseExited(MouseEvent e) { |
||||
detailLabel.setCursor(Cursor.getDefaultCursor()); |
||||
} |
||||
}); |
||||
|
||||
//底部的按钮面板
|
||||
UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK")); |
||||
JPanel buttonPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
buttonPanel.setBorder(BorderFactory.createEmptyBorder(0,10,10,10)); |
||||
buttonPanel.add(okButton, BorderLayout.EAST); |
||||
okButton.addActionListener(this); |
||||
bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); |
||||
bottomPanel.add(buttonPanel); |
||||
|
||||
this.setTitle(Toolkit.i18nText("Fine_Designer_Check_Font")); |
||||
this.setResizable(false); |
||||
|
||||
this.add(topPanel, BorderLayout.NORTH); |
||||
this.add(hiddenPanel, BorderLayout.CENTER); |
||||
this.add(bottomPanel, BorderLayout.SOUTH); |
||||
this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US)? 400:380, 185)); |
||||
|
||||
GUICoreUtils.centerWindow(this); |
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
this.dispose(); |
||||
} |
||||
} |
After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 736 B |
After Width: | Height: | Size: 785 B |
After Width: | Height: | Size: 768 B |
After Width: | Height: | Size: 1011 B |
After Width: | Height: | Size: 942 B |