|
|
@ -4,14 +4,14 @@ import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.GraphHelper; |
|
|
|
import com.fr.base.GraphHelper; |
|
|
|
import com.fr.base.Icon; |
|
|
|
import com.fr.base.Icon; |
|
|
|
import com.fr.base.IconManager; |
|
|
|
import com.fr.base.IconManager; |
|
|
|
import com.fr.design.designer.IntervalConstants; |
|
|
|
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
|
|
|
|
import com.fr.design.gui.ifilechooser.FileChooserArgs; |
|
|
|
|
|
|
|
import com.fr.design.gui.ifilechooser.FileChooserFactory; |
|
|
|
import com.fr.design.gui.ifilechooser.FileChooserProvider; |
|
|
|
import com.fr.design.gui.ifilechooser.FileChooserProvider; |
|
|
|
import com.fr.design.gui.ifilechooser.JavaFxNativeFileChooser; |
|
|
|
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.iscrollbar.UIScrollBar; |
|
|
|
import com.fr.design.gui.iscrollbar.UIScrollBar; |
|
|
|
import com.fr.design.gui.itextarea.DescriptionTextArea; |
|
|
|
import com.fr.design.gui.itextarea.DescriptionTextArea; |
|
|
@ -30,23 +30,34 @@ import com.fr.stable.ListMap; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.transaction.Configurations; |
|
|
|
import com.fr.transaction.Configurations; |
|
|
|
import com.fr.transaction.WorkerFacade; |
|
|
|
import com.fr.transaction.WorkerFacade; |
|
|
|
import javafx.stage.FileChooser; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
import java.awt.Cursor; |
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
|
|
|
import java.awt.Image; |
|
|
|
|
|
|
|
import javax.swing.ButtonGroup; |
|
|
|
|
|
|
|
import javax.swing.ImageIcon; |
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
|
|
|
import javax.swing.JFileChooser; |
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import javax.swing.JToggleButton; |
|
|
|
|
|
|
|
import javax.swing.ScrollPaneConstants; |
|
|
|
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
import javax.swing.filechooser.FileNameExtensionFilter; |
|
|
|
|
|
|
|
import javax.swing.plaf.basic.BasicButtonUI; |
|
|
|
import javax.swing.plaf.basic.BasicButtonUI; |
|
|
|
import java.awt.*; |
|
|
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.FocusEvent; |
|
|
|
import java.awt.event.FocusEvent; |
|
|
|
import java.awt.event.FocusListener; |
|
|
|
import java.awt.event.FocusListener; |
|
|
|
import java.awt.geom.Rectangle2D; |
|
|
|
import java.awt.geom.Rectangle2D; |
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
import java.io.File; |
|
|
|
|
|
|
|
import java.io.FileOutputStream; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* carl:自定义Icon编辑 |
|
|
|
* carl:自定义Icon编辑 |
|
|
@ -451,9 +462,8 @@ public class CustomIconPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
private void onBrowseButtonClicked() { |
|
|
|
private void onBrowseButtonClicked() { |
|
|
|
// carl:不知道是否只要png格式,反正导出时全部都转成png了
|
|
|
|
// carl:不知道是否只要png格式,反正导出时全部都转成png了
|
|
|
|
FileChooserProvider fileChooserProvider = new JavaFxNativeFileChooser.Builder(). |
|
|
|
FileChooserProvider fileChooserProvider = FileChooserFactory.createFileChooser(FileChooserArgs.newBuilder(). |
|
|
|
filter("Icon Image File", "*.jpg", "*.jpeg", "*.png", "*.gif"). |
|
|
|
setFilter("Icon Image File", "*.jpg", "*.jpeg", "*.png", "*.gif").build()); |
|
|
|
build(); |
|
|
|
|
|
|
|
if (JFileChooser.APPROVE_OPTION == fileChooserProvider.showDialog(DesignerContext.getDesignerFrame())) { |
|
|
|
if (JFileChooser.APPROVE_OPTION == fileChooserProvider.showDialog(DesignerContext.getDesignerFrame())) { |
|
|
|
String path = fileChooserProvider.getSelectedFile().getAbsolutePath(); |
|
|
|
String path = fileChooserProvider.getSelectedFile().getAbsolutePath(); |
|
|
|
// 图片存储有最大值48*48限制,没有超过最大值时,按原图大小存储,超过最大值后,压缩至最大值存储
|
|
|
|
// 图片存储有最大值48*48限制,没有超过最大值时,按原图大小存储,超过最大值后,压缩至最大值存储
|
|
|
|