|
|
|
@ -4,7 +4,6 @@ import com.fr.design.DesignerEnvManager;
|
|
|
|
|
import com.fr.design.mainframe.alphafine.AlphaFineConstants; |
|
|
|
|
import com.fr.design.mainframe.alphafine.AlphaFineHelper; |
|
|
|
|
import com.fr.design.mainframe.alphafine.model.ProductNews; |
|
|
|
|
import com.fr.design.utils.BrowseUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
|
|
|
|
|
import java.awt.Cursor; |
|
|
|
@ -33,7 +32,7 @@ public class ProductNewsList extends JList<ProductNews> {
|
|
|
|
|
@Override |
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
|
if (e.getClickCount() == AlphaFineConstants.DEFAULT_CLICK_COUNT) { |
|
|
|
|
dealWithClick(getSelectedValue().getUrl()); |
|
|
|
|
dealWithClick(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -62,9 +61,13 @@ public class ProductNewsList extends JList<ProductNews> {
|
|
|
|
|
this(new DefaultListModel<>()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void dealWithClick(String url) { |
|
|
|
|
private void dealWithClick() { |
|
|
|
|
ProductNews productNews = getSelectedValue(); |
|
|
|
|
BrowseUtils.browser(url); |
|
|
|
|
try { |
|
|
|
|
Desktop.getDesktop().browse(new URI(productNews.getUrl())); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
} |
|
|
|
|
DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getReadSet().add(productNews.getId()); |
|
|
|
|
AlphaFineHelper.getAlphaFineDialog().repaint(); |
|
|
|
|
} |
|
|
|
|