|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.fr.design.module; |
|
|
|
|
|
|
|
|
|
import com.fr.base.ChartPreStyleConfig; |
|
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
|
import com.fr.design.actions.UpdateAction; |
|
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
@ -8,11 +9,14 @@ import com.fr.design.mainframe.DesignerContext;
|
|
|
|
|
import com.fr.design.mainframe.DesignerFrame; |
|
|
|
|
import com.fr.design.menu.MenuKeySet; |
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
import com.fr.module.ModuleContext; |
|
|
|
|
import com.fr.transaction.CallBackAdaptor; |
|
|
|
|
import com.fr.transaction.Configurations; |
|
|
|
|
import com.fr.transaction.WorkerFacade; |
|
|
|
|
import com.fr.van.chart.designer.component.VanChartFillStylePane; |
|
|
|
|
|
|
|
|
|
import javax.swing.KeyStroke; |
|
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -22,6 +26,9 @@ import java.awt.event.ActionEvent;
|
|
|
|
|
*/ |
|
|
|
|
public class ChartPreStyleAction extends UpdateAction { |
|
|
|
|
|
|
|
|
|
private static ExecutorService refreshDesignPool = ModuleContext.getExecutor().newFixedThreadPool( |
|
|
|
|
10, new NamedThreadFactory("refreshChartStylePane")); |
|
|
|
|
|
|
|
|
|
public ChartPreStyleAction() { |
|
|
|
|
this.setMenuKeySet(CHART_DEFAULT_STYLE); |
|
|
|
|
this.setName(getMenuKeySet().getMenuKeySetName()+ "..."); |
|
|
|
@ -54,12 +61,20 @@ public class ChartPreStyleAction extends UpdateAction {
|
|
|
|
|
if (frame != null) { |
|
|
|
|
frame.repaint(); |
|
|
|
|
} |
|
|
|
|
new Thread() { |
|
|
|
|
@Override |
|
|
|
|
if (refreshDesignPool.isTerminated()) { |
|
|
|
|
synchronized (refreshDesignPool) { |
|
|
|
|
if (refreshDesignPool.isTerminated()) { |
|
|
|
|
refreshDesignPool = ModuleContext.getExecutor().newFixedThreadPool( |
|
|
|
|
10, new NamedThreadFactory("refreshChartStylePane")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
refreshDesignPool.execute(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
DesignerContext.getDesignerBean("vanChartFillStyle").refreshBeanElement(); |
|
|
|
|
} |
|
|
|
|
}.start(); |
|
|
|
|
DesignerContext.getDesignerBean(VanChartFillStylePane.name).refreshBeanElement(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
})); |
|
|
|
|
} |
|
|
|
|