|
|
|
@ -17,6 +17,7 @@ import com.fr.transaction.WorkerCallBack;
|
|
|
|
|
import com.fr.transaction.WorkerFacade; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -24,6 +25,8 @@ import java.awt.event.ActionEvent;
|
|
|
|
|
* StyleList Action |
|
|
|
|
*/ |
|
|
|
|
public class StyleListAction extends UpdateAction { |
|
|
|
|
public static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(710, 600); |
|
|
|
|
|
|
|
|
|
public StyleListAction() { |
|
|
|
|
this.setMenuKeySet(PREDEFINED_STYLES); |
|
|
|
|
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); |
|
|
|
@ -37,23 +40,23 @@ public class StyleListAction extends UpdateAction {
|
|
|
|
|
* |
|
|
|
|
* @param evt 事件 |
|
|
|
|
*/ |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); |
|
|
|
|
final StyleManagerPane styleListPane = new StyleManagerPane(); |
|
|
|
|
final BasicDialog styleListDialog = styleListPane.showWindow(designerFrame); |
|
|
|
|
styleListDialog.addDialogActionListener(new DialogActionAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void doOk() { |
|
|
|
|
if (!styleListPane.isNamePermitted()) { |
|
|
|
|
styleListDialog.setDoOKSucceed(false); |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); |
|
|
|
|
final StyleManagerPane styleListPane = new StyleManagerPane(); |
|
|
|
|
final BasicDialog styleListDialog = styleListPane.showWindowWithCustomSize(designerFrame, null, WINDOW_CUSTOM_SIZE); |
|
|
|
|
styleListDialog.addDialogActionListener(new DialogActionAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void doOk() { |
|
|
|
|
if (!styleListPane.isNamePermitted()) { |
|
|
|
|
styleListDialog.setDoOKSucceed(false); |
|
|
|
|
} |
|
|
|
|
Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
styleListPane.update(ServerPreferenceConfig.getInstance()); |
|
|
|
|
} |
|
|
|
|
}.addCallBack(new CallBackAdaptor(){ |
|
|
|
|
@Override |
|
|
|
|
Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
styleListPane.update(ServerPreferenceConfig.getInstance()); |
|
|
|
|
} |
|
|
|
|
}.addCallBack(new CallBackAdaptor() { |
|
|
|
|
@Override |
|
|
|
|
public void afterCommit() { |
|
|
|
|
DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement(); |
|
|
|
|
} |
|
|
|
|