|
|
|
@ -1,13 +1,6 @@
|
|
|
|
|
package com.fr.design.chart.series.SeriesCondition.impl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
|
|
import javax.swing.DefaultListCellRenderer; |
|
|
|
|
import javax.swing.JList; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
|
import com.fr.design.DesignModelAdapter; |
|
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
@ -22,12 +15,21 @@ import com.fr.general.Inter;
|
|
|
|
|
import com.fr.js.FormHyperlinkProvider; |
|
|
|
|
import com.fr.stable.bridge.StableFactory; |
|
|
|
|
|
|
|
|
|
import javax.swing.DefaultComboBoxModel; |
|
|
|
|
import javax.swing.DefaultListCellRenderer; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
+ * Created with IntelliJ IDEA. |
|
|
|
|
+ * User: zx |
|
|
|
|
+ * Date: 14-8-6 |
|
|
|
|
+ * Time: 下午2:53 |
|
|
|
|
+ */ |
|
|
|
|
* + * Created with IntelliJ IDEA. |
|
|
|
|
* + * User: zx |
|
|
|
|
* + * Date: 14-8-6 |
|
|
|
|
* + * Time: 下午2:53 |
|
|
|
|
* + |
|
|
|
|
* |
|
|
|
|
* @author zx |
|
|
|
|
*/ |
|
|
|
|
public class FormHyperlinkNorthPane extends BasicBeanPane<FormHyperlinkProvider> { |
|
|
|
|
|
|
|
|
|
private UITextField itemNameTextField; |
|
|
|
@ -47,12 +49,7 @@ public class FormHyperlinkNorthPane extends BasicBeanPane<FormHyperlinkProvider
|
|
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
|
formHyperlinkEditors = getFormHyperlinkEditors(); |
|
|
|
|
targetFrameComboBox = formHyperlinkEditors == null ? new UIComboBox() : new UIComboBox(getFormHyperlinkEditNames()); |
|
|
|
|
targetFrameComboBox.setRenderer(new DefaultListCellRenderer() { |
|
|
|
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
|
|
|
|
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
targetFrameComboBox.setRenderer(new DefaultListCellRenderer()); |
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double[] rowSize = {p, p, p}; |
|
|
|
|
double[] columnSize = {p, TableLayout.FILL}; |
|
|
|
@ -107,6 +104,7 @@ public class FormHyperlinkNorthPane extends BasicBeanPane<FormHyperlinkProvider
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void populateBean(FormHyperlinkProvider formHyperlink) { |
|
|
|
|
formHyperlinkEditors = getFormHyperlinkEditors(); |
|
|
|
|
if (itemNameTextField != null) { |
|
|
|
|
this.itemNameTextField.setText(formHyperlink.getItemName()); |
|
|
|
|
} |
|
|
|
@ -115,17 +113,23 @@ public class FormHyperlinkNorthPane extends BasicBeanPane<FormHyperlinkProvider
|
|
|
|
|
if (editorName == null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (targetFrameComboBox != null) { |
|
|
|
|
//noinspection unchecked
|
|
|
|
|
targetFrameComboBox.setModel(new DefaultComboBoxModel(getFormHyperlinkEditNames())); |
|
|
|
|
targetFrameComboBox.setSelectedItem(editorName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public FormHyperlinkProvider updateBean() { |
|
|
|
|
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); |
|
|
|
|
FormHyperlinkProvider formHyperlink = |
|
|
|
|
StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); |
|
|
|
|
updateBean(formHyperlink); |
|
|
|
|
return formHyperlink; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void updateBean(FormHyperlinkProvider formHyperlink) { |
|
|
|
|
if (itemNameTextField != null) { |
|
|
|
|
formHyperlink.setItemName(this.itemNameTextField.getText()); |
|
|
|
|