|
|
@ -8,6 +8,7 @@ import com.fr.data.impl.JDBCDatabaseConnection; |
|
|
|
import com.fr.data.impl.JNDIDatabaseConnection; |
|
|
|
import com.fr.data.impl.JNDIDatabaseConnection; |
|
|
|
import com.fr.data.operator.DataOperator; |
|
|
|
import com.fr.data.operator.DataOperator; |
|
|
|
import com.fr.data.solution.ExceptionSolutionSelector; |
|
|
|
import com.fr.data.solution.ExceptionSolutionSelector; |
|
|
|
|
|
|
|
import com.fr.data.solution.entity.DriverPage; |
|
|
|
import com.fr.data.solution.processor.ClassNotFoundExceptionSolutionProcessor; |
|
|
|
import com.fr.data.solution.processor.ClassNotFoundExceptionSolutionProcessor; |
|
|
|
import com.fr.data.solution.processor.SolutionProcessor; |
|
|
|
import com.fr.data.solution.processor.SolutionProcessor; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
@ -87,6 +88,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti |
|
|
|
protected Void doInBackground() throws Exception { |
|
|
|
protected Void doInBackground() throws Exception { |
|
|
|
Connection database = DatabaseConnectionPane.this.updateBean(); |
|
|
|
Connection database = DatabaseConnectionPane.this.updateBean(); |
|
|
|
// 返回连接结果
|
|
|
|
// 返回连接结果
|
|
|
|
|
|
|
|
DriverPage.updateCache(); |
|
|
|
DataOperator.getInstance().testConnectionWithException(database); |
|
|
|
DataOperator.getInstance().testConnectionWithException(database); |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
@ -121,17 +123,18 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti |
|
|
|
deatail.setText(content); |
|
|
|
deatail.setText(content); |
|
|
|
deatail.setToolTipText(content); |
|
|
|
deatail.setToolTipText(content); |
|
|
|
gridJpanel.add(deatail); |
|
|
|
gridJpanel.add(deatail); |
|
|
|
|
|
|
|
String solution = select.getResultException().getSolution(); |
|
|
|
UILabel redirect = new UILabel(); |
|
|
|
UILabel redirect = new UILabel(); |
|
|
|
|
|
|
|
if (solution != null) { |
|
|
|
redirect.setText(Toolkit.i18nText("Fine_Designer_Download_Driver")); |
|
|
|
redirect.setText(Toolkit.i18nText("Fine_Designer_Download_Driver")); |
|
|
|
redirect.setForeground(Color.BLUE); |
|
|
|
redirect.setForeground(Color.BLUE); |
|
|
|
|
|
|
|
|
|
|
|
redirect.addMouseListener(new MouseAdapter() { |
|
|
|
redirect.addMouseListener(new MouseAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
Desktop.getDesktop().browse(new URI(select.getResultException().getSolution())); |
|
|
|
Desktop.getDesktop().browse(new URI(solution)); |
|
|
|
} catch (Exception clickException) { |
|
|
|
} catch (Exception clickException) { |
|
|
|
FineLoggerFactory.getLogger().warn("can not open browser with {}", select.getResultException().getSolution()); |
|
|
|
FineLoggerFactory.getLogger().warn("can not open browser with {}", solution); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -145,6 +148,9 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti |
|
|
|
redirect.setCursor(Cursor.getDefaultCursor()); |
|
|
|
redirect.setCursor(Cursor.getDefaultCursor()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
redirect.setText(Toolkit.i18nText("Fine_Designer_Not_Found_Driver_No_Solution")); |
|
|
|
|
|
|
|
} |
|
|
|
gridJpanel.add(redirect); |
|
|
|
gridJpanel.add(redirect); |
|
|
|
hiddenPanel.add(gridJpanel); |
|
|
|
hiddenPanel.add(gridJpanel); |
|
|
|
gridJpanel.setBackground(Color.WHITE); |
|
|
|
gridJpanel.setBackground(Color.WHITE); |
|
|
|