JSD-4334 GIS地图集成
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.1 KiB

package com.fr.plugin.shdcmap.ui;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.extended.chart.ExtendedScrollPane;
import com.fr.plugin.shdcmap.CustomChart;
import javax.swing.*;
import java.awt.*;
/**
* @author duan.jingliang
*/
public class CustomChartLinkPane extends ExtendedScrollPane<CustomChart> {
private ChartHyperLinkPane hyperLinkPane;
@Override
protected JPanel createContentPane() {
return new ContentPane();
}
@Override
public void populateBean(CustomChart chart) {
hyperLinkPane.populateHyperLink(chart);
}
@Override
public void updateBean(CustomChart chart) {
hyperLinkPane.updateHyperLink(chart);
}
@Override
protected String title4PopupWindow() {
return Toolkit.i18nText("Plugin-ShdcMap-linktitle");
}
private class ContentPane extends JPanel {
public ContentPane() {
initComponents();
}
private void initComponents() {
this.setLayout(new BorderLayout());
// 链接
JPanel linkContentPane = createLinkContentPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p};
Component[][] acomponents = new Component[][]{
new Component[]{linkContentPane}
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents,rowSize,columnSize);
this.add(panel,BorderLayout.CENTER);
this.setVisible(true);
}
}
private JPanel createLinkContentPane(){
hyperLinkPane = new ChartHyperLinkPane();
Component[][] comps = new Component[][]{
new Component[]{null},
new Component[]{hyperLinkPane}
};
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
JPanel panel = TableLayoutHelper.createTableLayoutPane(comps, new double[]{p, p}, new double[]{f});
return panel;
}
}