|
|
|
@ -1,27 +1,19 @@
|
|
|
|
|
package com.fr.design.hyperlink; |
|
|
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
|
|
import javax.swing.DefaultComboBoxModel; |
|
|
|
|
import javax.swing.DefaultListCellRenderer; |
|
|
|
|
|
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
|
|
|
|
|
import javax.swing.JList; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
|
import com.fr.base.Utils; |
|
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.itextfield.UINumberField; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
import com.fr.js.Hyperlink; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
|
|
public abstract class AbstractHyperlinkPane<T extends Hyperlink> extends BasicBeanPane<T> { |
|
|
|
|
public static final int NEW_WINDOW = 0; |
|
|
|
|
public static final int DIALOG = 1; |
|
|
|
@ -46,7 +38,7 @@ public abstract class AbstractHyperlinkPane<T extends Hyperlink> extends BasicBe
|
|
|
|
|
headerPane = this.setHeaderPanel(); |
|
|
|
|
this.add(headerPane, BorderLayout.NORTH); |
|
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
|
targetFrameComboBox = new UIComboBox(new String[]{Inter.getLocText("Hyperlink-New_Window"), Inter.getLocText("FR-Hyperlink_Dialog"), Inter.getLocText("Hyperlink-Self_Window")}); |
|
|
|
|
targetFrameComboBox = new UIComboBox(getTargetFrames()); |
|
|
|
|
targetFrameComboBox.setRenderer(new DefaultListCellRenderer() { |
|
|
|
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
|
|
|
|
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
|
|
|
@ -86,6 +78,9 @@ public abstract class AbstractHyperlinkPane<T extends Hyperlink> extends BasicBe
|
|
|
|
|
|
|
|
|
|
this.add(this.setFootPanel(), BorderLayout.SOUTH); |
|
|
|
|
} |
|
|
|
|
protected String[] getTargetFrames(){ |
|
|
|
|
return new String[]{Inter.getLocText("Hyperlink-New_Window"), Inter.getLocText("FR-Hyperlink_Dialog"), Inter.getLocText("Hyperlink-Self_Window")}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected abstract JPanel setHeaderPanel(); |
|
|
|
|
|
|
|
|
@ -93,6 +88,30 @@ public abstract class AbstractHyperlinkPane<T extends Hyperlink> extends BasicBe
|
|
|
|
|
|
|
|
|
|
protected abstract void populateSubHyperlinkBean(T link); |
|
|
|
|
|
|
|
|
|
public UIComboBox getTargetFrameComboBox() { |
|
|
|
|
return targetFrameComboBox; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setTargetFrameComboBox(UIComboBox targetFrameComboBox) { |
|
|
|
|
this.targetFrameComboBox = targetFrameComboBox; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UINumberField getHeightTextFiled() { |
|
|
|
|
return heightTextFiled; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setHeightTextFiled(UINumberField heightTextFiled) { |
|
|
|
|
this.heightTextFiled = heightTextFiled; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UINumberField getWidthTextFiled() { |
|
|
|
|
return widthTextFiled; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setWidthTextFiled(UINumberField widthTextFiled) { |
|
|
|
|
this.widthTextFiled = widthTextFiled; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void populateBean(T link) { |
|
|
|
|
String name = link.getTargetFrame(); |
|
|
|
|