|
|
@ -26,6 +26,7 @@ import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.backgroundpane.ImagePreviewPane; |
|
|
|
import com.fr.design.mainframe.backgroundpane.ImagePreviewPane; |
|
|
|
import com.fr.design.style.background.image.ImageFileChooser; |
|
|
|
import com.fr.design.style.background.image.ImageFileChooser; |
|
|
|
|
|
|
|
import com.fr.design.style.color.NewColorSelectBox; |
|
|
|
import com.fr.env.utils.DesignerInteractionHistory; |
|
|
|
import com.fr.env.utils.DesignerInteractionHistory; |
|
|
|
import com.fr.form.ui.LayoutBorderStyle; |
|
|
|
import com.fr.form.ui.LayoutBorderStyle; |
|
|
|
import com.fr.general.Background; |
|
|
|
import com.fr.general.Background; |
|
|
@ -85,7 +86,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
private UIObserverListener uiObserverListener; |
|
|
|
private UIObserverListener uiObserverListener; |
|
|
|
|
|
|
|
|
|
|
|
private BorderLineAndImageComboBox borderLineCombo; |
|
|
|
private BorderLineAndImageComboBox borderLineCombo; |
|
|
|
private UIColorButton borderColorPane; |
|
|
|
private NewColorSelectBox borderColorPane; |
|
|
|
private ImagePreviewPane imagePreviewPane; |
|
|
|
private ImagePreviewPane imagePreviewPane; |
|
|
|
private UIButton chooseImageButton; |
|
|
|
private UIButton chooseImageButton; |
|
|
|
private UIButton tweakNinePointHelpButton; |
|
|
|
private UIButton tweakNinePointHelpButton; |
|
|
@ -104,10 +105,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
|
|
|
|
|
|
|
|
private void initComponents() { |
|
|
|
private void initComponents() { |
|
|
|
borderLineCombo = new BorderLineAndImageComboBox(); |
|
|
|
borderLineCombo = new BorderLineAndImageComboBox(); |
|
|
|
borderColorPane = new UIColorButton(null) {{ |
|
|
|
borderColorPane = new NewColorSelectBox(145); |
|
|
|
setUI(createButtonUI(this)); |
|
|
|
|
|
|
|
set4ToolbarButton(); |
|
|
|
|
|
|
|
}}; |
|
|
|
|
|
|
|
imagePreviewPane = new ImagePreviewPane() {{ |
|
|
|
imagePreviewPane = new ImagePreviewPane() {{ |
|
|
|
setImageStyle(Style.DEFAULT_STYLE); |
|
|
|
setImageStyle(Style.DEFAULT_STYLE); |
|
|
|
}}; |
|
|
|
}}; |
|
|
@ -228,7 +226,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
getComponent(2).setVisible(borderLineCombo.isSelectedBorderImage()); |
|
|
|
getComponent(2).setVisible(borderLineCombo.isSelectedBorderImage()); |
|
|
|
|
|
|
|
|
|
|
|
if (!borderLineCombo.isSelectedBorderLine()) { |
|
|
|
if (!borderLineCombo.isSelectedBorderLine()) { |
|
|
|
borderColorPane.setColor(Color.BLACK); |
|
|
|
borderColorPane.setSelectObject(Color.BLACK); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!borderLineCombo.isSelectedBorderImage()) { |
|
|
|
if (!borderLineCombo.isSelectedBorderImage()) { |
|
|
|
imagePreviewPane.setImageWithSuffix(null); |
|
|
|
imagePreviewPane.setImageWithSuffix(null); |
|
|
@ -294,7 +292,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
Color borderColor = style.getColor(); |
|
|
|
Color borderColor = style.getColor(); |
|
|
|
|
|
|
|
|
|
|
|
this.borderLineCombo.setSelectedLineStyle(borderLine); |
|
|
|
this.borderLineCombo.setSelectedLineStyle(borderLine); |
|
|
|
this.borderColorPane.setColor(borderColor); |
|
|
|
this.borderColorPane.setSelectObject(borderColor); |
|
|
|
|
|
|
|
|
|
|
|
Background borderImage = style.getBorderImage(); |
|
|
|
Background borderImage = style.getBorderImage(); |
|
|
|
if (borderImage instanceof ImageBackground) { |
|
|
|
if (borderImage instanceof ImageBackground) { |
|
|
@ -332,13 +330,13 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.borderLineCombo.setSelectedLineStyle(style.getBorder()); |
|
|
|
this.borderLineCombo.setSelectedLineStyle(style.getBorder()); |
|
|
|
this.borderColorPane.setColor(style.getColor()); |
|
|
|
this.borderColorPane.setSelectObject(style.getColor()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void updateBean(LayoutBorderStyle style) { |
|
|
|
public void updateBean(LayoutBorderStyle style) { |
|
|
|
|
|
|
|
|
|
|
|
style.setBorder(this.borderLineCombo.getSelectedLineStyle()); |
|
|
|
style.setBorder(this.borderLineCombo.getSelectedLineStyle()); |
|
|
|
style.setColor(this.borderColorPane.getColor()); |
|
|
|
style.setColor(this.borderColorPane.getSelectObject()); |
|
|
|
style.setBorderImage(null); |
|
|
|
style.setBorderImage(null); |
|
|
|
|
|
|
|
|
|
|
|
if (this.borderLineCombo.isSelectedBorderImage()) { |
|
|
|
if (this.borderLineCombo.isSelectedBorderImage()) { |
|
|
|