|
|
@ -24,6 +24,8 @@ import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.CoreGraphHelper; |
|
|
|
import com.fr.stable.CoreGraphHelper; |
|
|
|
import com.fr.stable.ListMap; |
|
|
|
import com.fr.stable.ListMap; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
import com.fr.transaction.Configurations; |
|
|
|
|
|
|
|
import com.fr.transaction.WorkerFacade; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
@ -39,9 +41,7 @@ import java.awt.geom.Rectangle2D; |
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
|
|
|
|
* carl:自定义Icon编辑 |
|
|
|
* carl:自定义Icon编辑 |
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class CustomIconPane extends BasicPane { |
|
|
|
public class CustomIconPane extends BasicPane { |
|
|
|
private String selectedIconName = null; |
|
|
|
private String selectedIconName = null; |
|
|
@ -55,7 +55,6 @@ public class CustomIconPane extends BasicPane { |
|
|
|
private UIButton editButton; |
|
|
|
private UIButton editButton; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final int THE_WIDTH = 180; |
|
|
|
private static final int THE_WIDTH = 180; |
|
|
|
private static final int HORIZONTAL_COUNT = 6; |
|
|
|
private static final int HORIZONTAL_COUNT = 6; |
|
|
|
private static final int HEIGHT_PER = 29; |
|
|
|
private static final int HEIGHT_PER = 29; |
|
|
@ -283,6 +282,14 @@ public class CustomIconPane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String update() { |
|
|
|
public String update() { |
|
|
|
|
|
|
|
//把图标信息入库
|
|
|
|
|
|
|
|
Configurations.update(new WorkerFacade(WidgetInfoConfig.class) { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void run() { |
|
|
|
|
|
|
|
WidgetInfoConfig.getInstance().setIconManager(IconManager.getIconManager()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return selectedIconName; |
|
|
|
return selectedIconName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -309,6 +316,7 @@ public class CustomIconPane extends BasicPane { |
|
|
|
private static final int ICON_BUTTON_SIZE = 24; |
|
|
|
private static final int ICON_BUTTON_SIZE = 24; |
|
|
|
private static final int ICON_X = 4; |
|
|
|
private static final int ICON_X = 4; |
|
|
|
private static final int ICON_Y = 4; |
|
|
|
private static final int ICON_Y = 4; |
|
|
|
|
|
|
|
|
|
|
|
public IconButton(String name) { |
|
|
|
public IconButton(String name) { |
|
|
|
this.iconName = name; |
|
|
|
this.iconName = name; |
|
|
|
this.addActionListener(this); |
|
|
|
this.addActionListener(this); |
|
|
@ -403,6 +411,7 @@ public class CustomIconPane extends BasicPane { |
|
|
|
public void focusGained(FocusEvent e) { |
|
|
|
public void focusGained(FocusEvent e) { |
|
|
|
// do nothing
|
|
|
|
// do nothing
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void focusLost(FocusEvent e) { |
|
|
|
public void focusLost(FocusEvent e) { |
|
|
|
if (oldName != null && ComparatorUtils.equals(oldName, nameTextField.getText())) { |
|
|
|
if (oldName != null && ComparatorUtils.equals(oldName, nameTextField.getText())) { |
|
|
|
return; |
|
|
|
return; |
|
|
|