https://github.com/yanglang116/github_trending
Trending repositories on GitHub today
https://github.com/yanglang116/github_trending
github idea-plugin trending
Last synced: 2 months ago
JSON representation
Trending repositories on GitHub today
- Host: GitHub
- URL: https://github.com/yanglang116/github_trending
- Owner: YangLang116
- License: other
- Created: 2024-02-19T01:41:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-25T02:34:37.000Z (almost 2 years ago)
- Last Synced: 2025-06-28T18:09:47.952Z (about 1 year ago)
- Topics: github, idea-plugin, trending
- Language: Java
- Homepage: https://plugins.jetbrains.com/plugin/23804-github-trending
- Size: 1.88 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
You can browse and search Github Trending in Idea without opening a browser
## ScreenShot

---
## 项目说明
### 1、使用JSoup解析html
Java对xml解析方式主流分为Dom、SAX、JDom、Dom4J,但是面对如下两种标签时,会出现xml解析失败:
- 不存在闭合标签
```html
```
- 属性不以key=value的形式出现
```html
```
### 2、使用Box.createVerticalBox代替JBList
每个条目中的文案长度不一致,导致cell height不相同,由于JBList中的ListUI机制(BasicListUI#updateLayoutState),无法保证JBList+JTextArea支持动态Item高度。
JBList:
```java
JBList listView = new JBList<>();
//设置单选
listView.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
//绑定数据源
listModel = new DefaultListModel<>();
listView.setModel(this.listModel);
//设置UI样式
listView.setCellRenderer(new TrendingCellRender());
//item 点击
listView.addListSelectionListener(e -> {
int index = this.listView.getSelectedIndex();
...
});
```
Box:
```java
Box listView = Box.createVerticalBox();
listView.add(itemView);
```
### 3、文本内容多行显示
JLabel 无法多行显示,了解 JLabel、JTextArea、JTextField、JEditorPane、JTextComponent 继承关系以及区别
```java
JTextArea descView = new JTextArea();
//设置自动换行
descView.setLineWrap(true);
descView.setWrapStyleWord(true);
//设置透明背景色
descView.setBackground(new Color(0, 0, 0, 0));
```