@ -14,11 +14,11 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel ;
import com.fr.design.gui.ilable.UILabel ;
import com.fr.design.gui.itextarea.UITextArea ;
import com.fr.design.gui.itextarea.UITextArea ;
import com.fr.design.gui.itextfield.PlaceholderTextField ;
import com.fr.design.gui.itextfield.PlaceholderTextField ;
import com.fr.design.i18n.LocaleLinkProvider ;
import com.fr.design.i18n.Toolkit ;
import com.fr.design.i18n.Toolkit ;
import com.fr.design.javascript.jsapi.JSAPITreeHelper ;
import com.fr.design.javascript.jsapi.JSAPITreeHelper ;
import com.fr.design.javascript.jsapi.JSAPIUserObject ;
import com.fr.design.javascript.jsapi.JSAPIUserObject ;
import com.fr.design.layout.FRGUIPaneFactory ;
import com.fr.design.layout.FRGUIPaneFactory ;
import com.fr.general.CloudCenter ;
import com.fr.general.ComparatorUtils ;
import com.fr.general.ComparatorUtils ;
import com.fr.general.http.HttpToolbox ;
import com.fr.general.http.HttpToolbox ;
import com.fr.json.JSONArray ;
import com.fr.json.JSONArray ;
@ -26,6 +26,25 @@ import com.fr.json.JSONException;
import com.fr.json.JSONObject ;
import com.fr.json.JSONObject ;
import com.fr.log.FineLoggerFactory ;
import com.fr.log.FineLoggerFactory ;
import com.fr.stable.StringUtils ;
import com.fr.stable.StringUtils ;
import javax.swing.BorderFactory ;
import javax.swing.DefaultListCellRenderer ;
import javax.swing.DefaultListModel ;
import javax.swing.JComponent ;
import javax.swing.JList ;
import javax.swing.JPanel ;
import javax.swing.JPopupMenu ;
import javax.swing.JScrollPane ;
import javax.swing.JTree ;
import javax.swing.event.ListSelectionEvent ;
import javax.swing.event.ListSelectionListener ;
import javax.swing.event.TreeSelectionEvent ;
import javax.swing.event.TreeSelectionListener ;
import javax.swing.tree.DefaultMutableTreeNode ;
import javax.swing.tree.DefaultTreeCellRenderer ;
import javax.swing.tree.DefaultTreeModel ;
import javax.swing.tree.TreeNode ;
import javax.swing.tree.TreePath ;
import java.awt.BorderLayout ;
import java.awt.BorderLayout ;
import java.awt.CardLayout ;
import java.awt.CardLayout ;
import java.awt.Color ;
import java.awt.Color ;
@ -50,24 +69,6 @@ import java.util.ArrayList;
import java.util.Collections ;
import java.util.Collections ;
import java.util.Comparator ;
import java.util.Comparator ;
import java.util.List ;
import java.util.List ;
import javax.swing.BorderFactory ;
import javax.swing.DefaultListCellRenderer ;
import javax.swing.DefaultListModel ;
import javax.swing.JComponent ;
import javax.swing.JList ;
import javax.swing.JPanel ;
import javax.swing.JPopupMenu ;
import javax.swing.JScrollPane ;
import javax.swing.JTree ;
import javax.swing.event.ListSelectionEvent ;
import javax.swing.event.ListSelectionListener ;
import javax.swing.event.TreeSelectionEvent ;
import javax.swing.event.TreeSelectionListener ;
import javax.swing.tree.DefaultMutableTreeNode ;
import javax.swing.tree.DefaultTreeCellRenderer ;
import javax.swing.tree.DefaultTreeModel ;
import javax.swing.tree.TreeNode ;
import javax.swing.tree.TreePath ;
public class JSContentWithDescriptionPane extends JSContentPane implements KeyListener {
public class JSContentWithDescriptionPane extends JSContentPane implements KeyListener {
@ -108,8 +109,6 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi
private static final String URL_FOR_TEST_NETWORK = "https://www.baidu.com" ;
private static final String URL_FOR_TEST_NETWORK = "https://www.baidu.com" ;
private static final String DOCUMENT_SEARCH_URL = "https://help.fanruan.com/finereport/api-helpdoc-title-" ;
private String currentValue ;
private String currentValue ;
private static CardLayout card ;
private static CardLayout card ;
@ -117,6 +116,16 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi
private static final String RELOAD_CARD = "reloadCard" ;
private static final String RELOAD_CARD = "reloadCard" ;
private static final String DOC_LIST_CARD = "docListCard" ;
private static final String DOC_LIST_CARD = "docListCard" ;
/ * *
* 云中心Js高级编辑器帮助链接前缀在配置文件中对应的配置文件key
* /
private static final String PROPS_LINK_KEY = "Fine-Design-CloudCenter_Js_Editor" ;
/ * *
* 云中心Js高级编辑器帮助链接前缀在配置文件中对应的配置文件key
* /
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Js_Editor_Default" ;
public JSContentWithDescriptionPane ( String [ ] args ) {
public JSContentWithDescriptionPane ( String [ ] args ) {
this . setLayout ( new BorderLayout ( ) ) ;
this . setLayout ( new BorderLayout ( ) ) ;
//===============================
//===============================
@ -352,7 +361,7 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi
private void doHelpDocumentSearch ( ) {
private void doHelpDocumentSearch ( ) {
Object value = interfaceNameList . getSelectedValue ( ) ;
Object value = interfaceNameList . getSelectedValue ( ) ;
if ( value ! = null ) {
if ( value ! = null ) {
String url = CloudCent er. getInstance ( ) . acquireUrlByKind ( "af.doc_search" , DOCUMENT_SEARCH_URL ) + value . toString ( ) ;
String url = LocaleLinkProvid er. getInstance ( ) . getLink ( PROPS_LINK_KEY , PROPS_LINK_KEY_DEFAULT ) ;
try {
try {
String result = HttpToolbox . get ( url ) ;
String result = HttpToolbox . get ( url ) ;
JSONObject jsonObject = new JSONObject ( result ) ;
JSONObject jsonObject = new JSONObject ( result ) ;