Skip to content

Commit

Permalink
支持导出功能
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhihang committed Nov 15, 2020
1 parent 9371c9d commit 206e315
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'com.liuzhihang'
version '1.0.1'
version '1.0.2'

JavaVersion.VERSION_1_8

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public String getDisplayName() {
@Override
public JComponent createComponent() {

return new SettingsForm().createCenterPanel();
return new SettingsForm().getRootPanel();
}

@Override
Expand Down
15 changes: 5 additions & 10 deletions src/main/java/com/liuzhihang/doc/view/ui/SettingsForm.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package com.liuzhihang.doc.view.ui;

import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManager;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.components.labels.LinkLabel;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
Expand All @@ -13,15 +16,14 @@
* @author liuzhihang
* @date 2020/2/26 19:17
*/
public class SettingsForm extends DialogWrapper {
public class SettingsForm {

private JPanel rootPanel;
private LinkLabel<String> supportLinkLabel;
private JPanel domainPanel;


public SettingsForm() {
super(null);

supportLinkLabel.setBorder(JBUI.Borders.emptyTop(20));

Expand All @@ -34,14 +36,7 @@ public SettingsForm() {

}

@Nullable
@Override
public JComponent createCenterPanel() {
public JPanel getRootPanel() {
return rootPanel;
}

private void createUIComponents() {
// place custom component creation code here

}
}
6 changes: 3 additions & 3 deletions src/main/java/com/liuzhihang/doc/view/ui/SupportForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class SupportForm extends DialogWrapper {
private LinkLabel<String> websiteLinkLabel;

public SupportForm() {
super(null);
super(null, true, DialogWrapper.IdeModalityType.PROJECT);

init();

Expand All @@ -39,8 +39,8 @@ public SupportForm() {
starLinkLabel.setListener((source, data) -> BrowserUtil.browse(data), "https://github.com/liuzhihang/doc-view");
reportLinkLabel.setListener((source, data) -> BrowserUtil.browse(data), "https://github.com/liuzhihang/doc-view/issues");
ideaLinkLabel.setListener((source, data) -> BrowserUtil.browse(data), "https://plugins.jetbrains.com/plugin/15305-doc-view");
prLinkLabel.setListener((source, data) -> BrowserUtil.browse(data), "https://github.com/liuzhihang/doc-view/pulls");
prLinkLabel.setListener((source, data) -> BrowserUtil.browse(data), "https://docview.liuzhihang.com");
shareLinkLabel.setListener((source, data) -> BrowserUtil.browse(data), "https://github.com/liuzhihang/doc-view/pulls");
websiteLinkLabel.setListener((source, data) -> BrowserUtil.browse(data), "https://docview.liuzhihang.com");
}

@Nullable
Expand Down

0 comments on commit 206e315

Please sign in to comment.