Browse Source
* commit '6a5ab8f74dcf050842fcd0a09a56487bfcebb16f': 新增字段支持部分图表类型 调整富文本参数顺序 适配仪表盘,清理代码 适配饼图 适配箱型图 适配甘特图 REPORT-43833 【10.0.14】远程设计数据连接/服务器数据集增加锁定 1. 将本地实现作为默认实现,注册起来,以兼容远程连接老版服务器的情况 2. 之前清理脏数据的逻辑有点问题,修改方式为:为LockItem对象添加一个成员变量birth,代表其创建时间,并且会为每个ClientID在对应的服务中存上一个key=clientID,value=LockItem的键值对,在用户登入时初始化,每隔30s更新创建时间,用户登出时清除,并且在轮询任务中加入检查当前各个LockItem对应的服务下这个键值对里value的birth是否超时了,如果超时,清理脏数据 3. 将之前使用的applyForService修改为applyForCleanableService,便于集群重启时清理服务数据 适配框架图 REPORT-43833 【10.0.14】远程设计数据连接/服务器数据集增加锁定 将通知组件的操作放到EDT中 REPORT-43833 【10.0.14】远程设计数据连接/服务器数据集增加锁定 将弹窗关闭后解锁的操作,放到afterCommit中 适配漏斗图 适配流向地图 适配地图 适配多层饼图 设计新增字段的id REPORT-43833 【10.0.14】远程设计数据连接/服务器数据集增加锁定 【问题原因】自测+修改一些bug 【改动思路】自测+修改一些bug REPORT-43833 【10.0.14】远程设计数据连接/服务器数据集增加锁定 【问题原因】迭代提交 【改动思路】迭代提交research/11.0
superman
4 years ago
57 changed files with 1850 additions and 912 deletions
@ -0,0 +1,25 @@
|
||||
package com.fr.design.editlock; |
||||
|
||||
|
||||
import com.fr.report.LockItem; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/20 |
||||
* 定义数据连接的checker |
||||
*/ |
||||
public class ConnectionLockChangeChecker extends EditLockChangeChecker{ |
||||
|
||||
private static class Holder { |
||||
private static final ConnectionLockChangeChecker INSTANCE = new ConnectionLockChangeChecker(); |
||||
} |
||||
|
||||
public static ConnectionLockChangeChecker getInstance() { |
||||
return ConnectionLockChangeChecker.Holder.INSTANCE; |
||||
} |
||||
|
||||
public ConnectionLockChangeChecker() { |
||||
this.lockItem = LockItem.CONNECTION; |
||||
} |
||||
} |
@ -0,0 +1,73 @@
|
||||
package com.fr.design.editlock; |
||||
|
||||
import com.fr.concurrent.NamedThreadFactory; |
||||
import com.fr.design.ui.util.UIUtil; |
||||
import com.fr.log.FineLoggerFactory; |
||||
import com.fr.workspace.WorkContext; |
||||
import com.fr.workspace.server.lock.editlock.EditLockOperator; |
||||
import com.fr.report.LockItem; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.concurrent.Executors; |
||||
import java.util.concurrent.ScheduledExecutorService; |
||||
import java.util.concurrent.TimeUnit; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/19 |
||||
* 判断当前设计器在远程设计服务器中的锁状态是否发生了改变 |
||||
*/ |
||||
public abstract class EditLockChangeChecker { |
||||
|
||||
private static final int INTERVAL = 30000; |
||||
private ScheduledExecutorService scheduler; |
||||
protected LockItem lockItem; |
||||
private boolean isLocked = false; |
||||
private List<EditLockChangeListener> listeners = new ArrayList<>(); |
||||
|
||||
/** |
||||
* 轮询任务,如果是远程设计状态,每隔30s查询一次相应lockItem的锁状态是否改变 |
||||
*/ |
||||
public void start() { |
||||
this.scheduler = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("EditLockChangeChecker")); |
||||
this.scheduler.scheduleAtFixedRate(new Runnable() { |
||||
@Override |
||||
public void run() { |
||||
// 判断是否为远程设计环境
|
||||
if (!WorkContext.getCurrent().isLocal()) { |
||||
try { |
||||
EditLockOperator operator = WorkContext.getCurrent().get(EditLockOperator.class); |
||||
boolean locked = operator.isLocked(lockItem); |
||||
if (isLocked != locked) { |
||||
isLocked = locked; |
||||
fireChange(); |
||||
} |
||||
} catch (Exception e) { |
||||
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
||||
} |
||||
} |
||||
} |
||||
}, 0, INTERVAL, TimeUnit.MILLISECONDS); |
||||
} |
||||
|
||||
public void stop() { |
||||
this.scheduler.shutdown(); |
||||
} |
||||
|
||||
public void addEditLockChangeListener(EditLockChangeListener listener) { |
||||
this.listeners.add(listener); |
||||
} |
||||
|
||||
private void fireChange() { |
||||
UIUtil.invokeLaterIfNeeded(new Runnable() { |
||||
@Override |
||||
public void run() { |
||||
for (EditLockChangeListener listener : EditLockChangeChecker.this.listeners) { |
||||
listener.updateLockedState(new EditLockChangeEvent(isLocked)); |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,25 @@
|
||||
package com.fr.design.editlock; |
||||
|
||||
import java.util.EventObject; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/20 |
||||
*/ |
||||
public class EditLockChangeEvent extends EventObject { |
||||
|
||||
private boolean isLocked; |
||||
|
||||
/** |
||||
* @param source 锁状态发生了改变,且当前锁状态就是source |
||||
*/ |
||||
public EditLockChangeEvent(boolean source) { |
||||
super(source); |
||||
this.isLocked = source; |
||||
} |
||||
|
||||
public boolean isLocked() { |
||||
return isLocked; |
||||
} |
||||
} |
@ -0,0 +1,16 @@
|
||||
package com.fr.design.editlock; |
||||
|
||||
import java.util.EventListener; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/20 |
||||
*/ |
||||
public interface EditLockChangeListener extends EventListener { |
||||
/** |
||||
* 锁定状态改变后执行的动作 |
||||
* @param event 事件 |
||||
*/ |
||||
void updateLockedState(EditLockChangeEvent event); |
||||
} |
@ -0,0 +1,79 @@
|
||||
package com.fr.design.editlock; |
||||
|
||||
import com.fr.base.svg.IconUtils; |
||||
import com.fr.base.svg.SVGLoader; |
||||
import com.fr.design.dialog.FineJOptionPane; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.general.IOUtils; |
||||
import com.fr.workspace.WorkContext; |
||||
import com.fr.workspace.server.lock.editlock.EditLockOperator; |
||||
import com.fr.report.LockItem; |
||||
import org.jetbrains.annotations.Nullable; |
||||
|
||||
import javax.swing.Icon; |
||||
import javax.swing.JOptionPane; |
||||
import java.awt.Image; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/20 |
||||
* 关于编辑锁定的一些常量和静态方法 |
||||
*/ |
||||
public class EditLockUtils { |
||||
|
||||
/** |
||||
* 数据连接锁定标志 |
||||
*/ |
||||
public static final Icon CONNECTION_LOCKED_ICON = IconUtils.readIcon("/com/fr/design/images/m_web/connection_locked"); |
||||
|
||||
/** |
||||
* 小锁图片 |
||||
*/ |
||||
public static final @Nullable Image LOCKED_IMAGE = SVGLoader.load("/com/fr/design/images/m_web/locked_normal.svg"); |
||||
|
||||
/** |
||||
* 提示弹窗中的提示标志 |
||||
*/ |
||||
public static final Icon TOOLTIPS_ICON = IOUtils.readIcon("/com/fr/design/images/m_web/warningIcon.png"); |
||||
|
||||
/** |
||||
* 数据连接锁定中 |
||||
*/ |
||||
public static final String CONNECTION_LOCKED_TOOLTIPS = Toolkit.i18nText("Fine_Designer_Remote_Design_Data_Connection_Locked"); |
||||
|
||||
/** |
||||
* 服务器数据集锁定中 |
||||
*/ |
||||
public static final String SERVER_TABLEDATA_LOCKED_TOOLTIPS = Toolkit.i18nText("Fine_Designer_Remote_Design_Server_TableData_Locked"); |
||||
|
||||
/** |
||||
* 提示弹窗中的提示信息 |
||||
*/ |
||||
public static final String LOCKED_MESSAGE = Toolkit.i18nText("Fine_Designer_Remote_Design_Locked_Message"); |
||||
|
||||
/** |
||||
* 提示弹窗中的标题 |
||||
*/ |
||||
public static final String TOOLTIPS = Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Title_Hint"); |
||||
|
||||
/** |
||||
* 已经被锁,跳出弹窗提示 |
||||
*/ |
||||
public static void showLockMessage() { |
||||
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), EditLockUtils.LOCKED_MESSAGE, EditLockUtils.TOOLTIPS, JOptionPane.INFORMATION_MESSAGE, EditLockUtils.TOOLTIPS_ICON); |
||||
} |
||||
|
||||
public static boolean lock(LockItem lockItem) { |
||||
return WorkContext.getCurrent().get(EditLockOperator.class).lock(lockItem); |
||||
} |
||||
|
||||
public static boolean unlock(LockItem lockItem) { |
||||
return WorkContext.getCurrent().get(EditLockOperator.class).unlock(lockItem); |
||||
} |
||||
|
||||
public static boolean isLocked(LockItem lockItem) { |
||||
return WorkContext.getCurrent().get(EditLockOperator.class).isLocked(lockItem); |
||||
} |
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.fr.design.editlock; |
||||
|
||||
import com.fr.report.LockItem; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/20 |
||||
* 服务器数据集的checker |
||||
*/ |
||||
public class ServerTableDataLockChangeChecker extends EditLockChangeChecker{ |
||||
private static class Holder { |
||||
private static final ServerTableDataLockChangeChecker INSTANCE = new ServerTableDataLockChangeChecker(); |
||||
} |
||||
|
||||
public static ServerTableDataLockChangeChecker getInstance() { |
||||
return ServerTableDataLockChangeChecker.Holder.INSTANCE; |
||||
} |
||||
|
||||
public ServerTableDataLockChangeChecker() { |
||||
this.lockItem = LockItem.SERVER_TABLE_DATA; |
||||
} |
||||
} |
@ -0,0 +1,55 @@
|
||||
package com.fr.design.gui.ibutton; |
||||
|
||||
import com.fr.design.editlock.EditLockChangeEvent; |
||||
import com.fr.design.editlock.EditLockChangeListener; |
||||
import com.fr.design.editlock.EditLockUtils; |
||||
import com.fr.report.LockItem; |
||||
|
||||
import javax.swing.Icon; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/20 |
||||
*/ |
||||
public class UILockButton extends UIButton implements EditLockChangeListener { |
||||
|
||||
/** |
||||
* 锁定状态图标 |
||||
*/ |
||||
private Icon lockedIcon; |
||||
/** |
||||
* 正常状态图标 |
||||
*/ |
||||
private Icon normalIcon; |
||||
/** |
||||
* 锁定状态的提示信息 |
||||
*/ |
||||
private String lockedTooltips; |
||||
/** |
||||
* 正常状态的提示信息 |
||||
*/ |
||||
private String normalTooltips; |
||||
|
||||
public UILockButton(Icon lockedIcon, Icon normalIcon, String lockedTooltips, String normalTooltips) { |
||||
super(); |
||||
this.lockedIcon = lockedIcon; |
||||
this.normalIcon = normalIcon; |
||||
this.lockedTooltips = lockedTooltips; |
||||
this.normalTooltips = normalTooltips; |
||||
init(); |
||||
} |
||||
|
||||
private void init() { |
||||
boolean locked = EditLockUtils.isLocked(LockItem.CONNECTION); |
||||
this.setIcon(locked ? lockedIcon : normalIcon); |
||||
this.setToolTipText(locked ? lockedTooltips : normalTooltips); |
||||
} |
||||
|
||||
@Override |
||||
public void updateLockedState(EditLockChangeEvent event) { |
||||
this.setIcon(event.isLocked() ? lockedIcon : normalIcon); |
||||
this.setToolTipText(event.isLocked() ? lockedTooltips : normalTooltips); |
||||
this.repaint(); |
||||
} |
||||
} |
@ -0,0 +1,47 @@
|
||||
package com.fr.design.gui.imenu; |
||||
|
||||
import com.fr.design.editlock.EditLockChangeEvent; |
||||
import com.fr.design.editlock.EditLockChangeListener; |
||||
import com.fr.report.LockItem; |
||||
|
||||
import javax.swing.Action; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/20 |
||||
*/ |
||||
public class UILockMenuItem extends UIMenuItem implements EditLockChangeListener { |
||||
|
||||
/** |
||||
* 锁定状态的提示信息 |
||||
*/ |
||||
private String lockedTooltips; |
||||
/** |
||||
* 正常状态的提示信息 |
||||
*/ |
||||
private String normalTooltips; |
||||
|
||||
/** |
||||
* 当前锁定项 |
||||
*/ |
||||
private LockItem lockItem; |
||||
|
||||
public UILockMenuItem(Action action, String lockedTooltips, String normalTooltips, LockItem lockItem) { |
||||
super(action); |
||||
this.lockedTooltips = lockedTooltips; |
||||
this.normalTooltips = normalTooltips; |
||||
this.lockItem = lockItem; |
||||
setUI(new UILockMenuItemUI()); |
||||
} |
||||
|
||||
public LockItem getLockItem() { |
||||
return lockItem; |
||||
} |
||||
|
||||
@Override |
||||
public void updateLockedState(EditLockChangeEvent event) { |
||||
this.setToolTipText(event.isLocked() ? lockedTooltips : normalTooltips); |
||||
this.repaint(); |
||||
} |
||||
} |
@ -0,0 +1,28 @@
|
||||
package com.fr.design.gui.imenu; |
||||
|
||||
import com.fr.design.editlock.EditLockUtils; |
||||
|
||||
import javax.swing.JMenuItem; |
||||
import java.awt.Graphics; |
||||
import java.awt.Rectangle; |
||||
|
||||
/** |
||||
* @author Yvan |
||||
* @version 10.0 |
||||
* Created by Yvan on 2021/1/20 |
||||
*/ |
||||
public class UILockMenuItemUI extends UIMenuItemUI{ |
||||
|
||||
@Override |
||||
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { |
||||
super.paintText(g, menuItem, textRect, text); |
||||
// 除了绘制text之外,还需要画一下锁定图标
|
||||
UILockMenuItem lockMenuItem = (UILockMenuItem) menuItem; |
||||
if (EditLockUtils.isLocked(lockMenuItem.getLockItem())) { |
||||
int width = menuItem.getWidth(); |
||||
int height = menuItem.getHeight(); |
||||
g.drawImage(EditLockUtils.LOCKED_IMAGE, (int) Math.round(width * 0.9), (int) Math.round(height * 0.1), 16, 16, null); |
||||
} |
||||
|
||||
} |
||||
} |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 959 B |
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,135 @@
|
||||
package com.fr.van.chart.box; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.plugin.chart.base.AttrTooltipContent; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipDataMaxFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipDataMedianFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipDataMinFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipDataNumberFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipDataOutlierFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipDataQ1Format; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipDataQ3Format; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; |
||||
import com.fr.plugin.chart.box.attr.AttrBoxTooltipContent; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListener; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class VanChartBoxRichTextDetailedFieldListPane extends VanChartFieldListPane { |
||||
|
||||
private VanChartFieldButton richTextNumber; |
||||
private VanChartFieldButton richTextMax; |
||||
private VanChartFieldButton richTextQ3; |
||||
private VanChartFieldButton richTextMedian; |
||||
private VanChartFieldButton richTextQ1; |
||||
private VanChartFieldButton richTextMin; |
||||
private VanChartFieldButton richTextOutlier; |
||||
|
||||
public VanChartBoxRichTextDetailedFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
public VanChartFieldButton getRichTextMax() { |
||||
return richTextMax; |
||||
} |
||||
|
||||
public VanChartFieldButton getRichTextQ3() { |
||||
return richTextQ3; |
||||
} |
||||
|
||||
public VanChartFieldButton getRichTextMedian() { |
||||
return richTextMedian; |
||||
} |
||||
|
||||
public VanChartFieldButton getRichTextQ1() { |
||||
return richTextQ1; |
||||
} |
||||
|
||||
public VanChartFieldButton getRichTextMin() { |
||||
return richTextMin; |
||||
} |
||||
|
||||
protected void initDefaultFieldButton() { |
||||
VanChartFieldListener listener = getFieldListener(); |
||||
|
||||
setCategoryNameButton(new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"), new AttrTooltipCategoryFormat(), listener)); |
||||
setSeriesNameButton(new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), new AttrTooltipSeriesFormat(), listener)); |
||||
|
||||
richTextNumber = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Data_Number"), new AttrTooltipDataNumberFormat(), listener); |
||||
richTextMax = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Max_Value"), new AttrTooltipDataMaxFormat(), listener); |
||||
richTextQ3 = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Data_Q3"), new AttrTooltipDataQ3Format(), listener); |
||||
richTextMedian = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Data_Median"), new AttrTooltipDataMedianFormat(), listener); |
||||
richTextQ1 = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Data_Q1"), new AttrTooltipDataQ1Format(), listener); |
||||
richTextMin = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Min_Value"), new AttrTooltipDataMinFormat(), listener); |
||||
richTextOutlier = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Outlier_Value"), new AttrTooltipDataOutlierFormat(), listener); |
||||
} |
||||
|
||||
protected void addDefaultFieldButton(JPanel fieldPane) { |
||||
fieldPane.add(getCategoryNameButton()); |
||||
fieldPane.add(getSeriesNameButton()); |
||||
fieldPane.add(richTextNumber); |
||||
fieldPane.add(richTextMax); |
||||
fieldPane.add(richTextQ3); |
||||
fieldPane.add(richTextMedian); |
||||
fieldPane.add(richTextQ1); |
||||
fieldPane.add(richTextMin); |
||||
fieldPane.add(richTextOutlier); |
||||
} |
||||
|
||||
protected List<VanChartFieldButton> getDefaultFieldButtonList() { |
||||
List<VanChartFieldButton> fieldButtonList = new ArrayList<>(); |
||||
|
||||
fieldButtonList.add(getCategoryNameButton()); |
||||
fieldButtonList.add(getSeriesNameButton()); |
||||
fieldButtonList.add(richTextNumber); |
||||
fieldButtonList.add(richTextMax); |
||||
fieldButtonList.add(richTextQ3); |
||||
fieldButtonList.add(richTextMedian); |
||||
fieldButtonList.add(richTextQ1); |
||||
fieldButtonList.add(richTextMin); |
||||
fieldButtonList.add(richTextOutlier); |
||||
|
||||
return fieldButtonList; |
||||
} |
||||
|
||||
public void populateDefaultField(AttrTooltipContent tooltipContent) { |
||||
super.populateDefaultField(tooltipContent); |
||||
|
||||
if (tooltipContent instanceof AttrBoxTooltipContent) { |
||||
AttrBoxTooltipContent box = (AttrBoxTooltipContent) tooltipContent; |
||||
|
||||
populateButtonFormat(richTextNumber, box.getRichTextNumber()); |
||||
populateButtonFormat(richTextMax, box.getRichTextMax()); |
||||
populateButtonFormat(richTextQ3, box.getRichTextQ3()); |
||||
populateButtonFormat(richTextMedian, box.getRichTextMedian()); |
||||
populateButtonFormat(richTextQ1, box.getRichTextQ1()); |
||||
populateButtonFormat(richTextMin, box.getRichTextMin()); |
||||
populateButtonFormat(richTextOutlier, box.getRichTextOutlier()); |
||||
} |
||||
} |
||||
|
||||
public void updateDefaultField(AttrTooltipContent tooltipContent) { |
||||
super.updateDefaultField(tooltipContent); |
||||
|
||||
if (tooltipContent instanceof AttrBoxTooltipContent) { |
||||
AttrBoxTooltipContent box = (AttrBoxTooltipContent) tooltipContent; |
||||
|
||||
updateButtonFormat(richTextNumber, box.getRichTextNumber()); |
||||
updateButtonFormat(richTextMax, box.getRichTextMax()); |
||||
updateButtonFormat(richTextQ3, box.getRichTextQ3()); |
||||
updateButtonFormat(richTextMedian, box.getRichTextMedian()); |
||||
updateButtonFormat(richTextQ1, box.getRichTextQ1()); |
||||
updateButtonFormat(richTextMin, box.getRichTextMin()); |
||||
updateButtonFormat(richTextOutlier, box.getRichTextOutlier()); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,41 @@
|
||||
package com.fr.van.chart.box; |
||||
|
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class VanChartBoxRichTextResultFieldListPane extends VanChartBoxRichTextDetailedFieldListPane { |
||||
|
||||
public VanChartBoxRichTextResultFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void addDefaultFieldButton(JPanel fieldPane) { |
||||
fieldPane.add(getCategoryNameButton()); |
||||
fieldPane.add(getSeriesNameButton()); |
||||
fieldPane.add(getRichTextMax()); |
||||
fieldPane.add(getRichTextQ3()); |
||||
fieldPane.add(getRichTextMedian()); |
||||
fieldPane.add(getRichTextQ1()); |
||||
fieldPane.add(getRichTextMin()); |
||||
} |
||||
|
||||
protected List<VanChartFieldButton> getDefaultFieldButtonList() { |
||||
List<VanChartFieldButton> fieldButtonList = new ArrayList<>(); |
||||
|
||||
fieldButtonList.add(getCategoryNameButton()); |
||||
fieldButtonList.add(getSeriesNameButton()); |
||||
fieldButtonList.add(getRichTextMax()); |
||||
fieldButtonList.add(getRichTextQ3()); |
||||
fieldButtonList.add(getRichTextMedian()); |
||||
fieldButtonList.add(getRichTextQ1()); |
||||
fieldButtonList.add(getRichTextMin()); |
||||
|
||||
return fieldButtonList; |
||||
} |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.fr.van.chart.designer.component.tooltip; |
||||
|
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class VanChartFieldListPaneWithOutSeries extends VanChartFieldListPane { |
||||
|
||||
public VanChartFieldListPaneWithOutSeries(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void addDefaultFieldButton(JPanel fieldPane) { |
||||
fieldPane.add(getCategoryNameButton()); |
||||
fieldPane.add(getValueButton()); |
||||
fieldPane.add(getPercentButton()); |
||||
} |
||||
|
||||
protected List<VanChartFieldButton> getDefaultFieldButtonList() { |
||||
List<VanChartFieldButton> fieldButtonList = new ArrayList<>(); |
||||
|
||||
fieldButtonList.add(getCategoryNameButton()); |
||||
fieldButtonList.add(getValueButton()); |
||||
fieldButtonList.add(getPercentButton()); |
||||
|
||||
return fieldButtonList; |
||||
} |
||||
} |
@ -0,0 +1,62 @@
|
||||
package com.fr.van.chart.funnel.designer.style; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipNameFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListener; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class VanChartFunnelRichTextFieldListPane extends VanChartFieldListPane { |
||||
|
||||
public VanChartFunnelRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void initDefaultFieldButton() { |
||||
VanChartFieldListener fieldListener = getFieldListener(); |
||||
|
||||
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"), |
||||
new AttrTooltipCategoryFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), |
||||
new AttrTooltipNameFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton valueButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Value"), |
||||
new AttrTooltipValueFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton percentButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Value_Conversion"), |
||||
new AttrTooltipPercentFormat(), false, fieldListener); |
||||
|
||||
setCategoryNameButton(categoryNameButton); |
||||
setSeriesNameButton(seriesNameButton); |
||||
setValueButton(valueButton); |
||||
setPercentButton(percentButton); |
||||
} |
||||
|
||||
protected void addDefaultFieldButton(JPanel fieldPane) { |
||||
fieldPane.add(getSeriesNameButton()); |
||||
fieldPane.add(getValueButton()); |
||||
fieldPane.add(getPercentButton()); |
||||
} |
||||
|
||||
protected List<VanChartFieldButton> getDefaultFieldButtonList() { |
||||
List<VanChartFieldButton> fieldButtonList = new ArrayList<>(); |
||||
|
||||
fieldButtonList.add(getSeriesNameButton()); |
||||
fieldButtonList.add(getValueButton()); |
||||
fieldButtonList.add(getPercentButton()); |
||||
|
||||
return fieldButtonList; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,107 @@
|
||||
package com.fr.van.chart.gantt.designer.style.tooltip; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.plugin.chart.base.AttrTooltipContent; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipDurationFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipEndTimeFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipProcessesFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipProgressFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipStartTimeFormat; |
||||
import com.fr.plugin.chart.gantt.attr.AttrGanttTooltipContent; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListener; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class VanChartGanttRichTextFieldListPane extends VanChartFieldListPane { |
||||
|
||||
private VanChartFieldButton richTextProcessesFormatPane; |
||||
private VanChartFieldButton richTextStartTimeFormatPane; |
||||
private VanChartFieldButton richTextEndTimeFormatPane; |
||||
private VanChartFieldButton richTextDurationFormatPane; |
||||
private VanChartFieldButton richTextProgressFormatPane; |
||||
|
||||
public VanChartGanttRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void initDefaultFieldButton() { |
||||
VanChartFieldListener listener = getFieldListener(); |
||||
|
||||
richTextProcessesFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Project_Name"), |
||||
new AttrTooltipProcessesFormat(), false, listener); |
||||
|
||||
setSeriesNameButton(new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), |
||||
new AttrTooltipSeriesFormat(), false, listener)); |
||||
|
||||
richTextStartTimeFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Start_Time"), |
||||
new AttrTooltipStartTimeFormat(), false, listener); |
||||
|
||||
richTextEndTimeFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_End_Time"), |
||||
new AttrTooltipEndTimeFormat(), false, listener); |
||||
|
||||
richTextDurationFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Duration_Time"), |
||||
new AttrTooltipDurationFormat(), false, true, listener); |
||||
|
||||
richTextProgressFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Process"), |
||||
new AttrTooltipProgressFormat(), false, listener); |
||||
} |
||||
|
||||
protected void addDefaultFieldButton(JPanel fieldPane) { |
||||
fieldPane.add(richTextProcessesFormatPane); |
||||
fieldPane.add(getSeriesNameButton()); |
||||
fieldPane.add(richTextStartTimeFormatPane); |
||||
fieldPane.add(richTextEndTimeFormatPane); |
||||
fieldPane.add(richTextDurationFormatPane); |
||||
fieldPane.add(richTextProgressFormatPane); |
||||
} |
||||
|
||||
protected List<VanChartFieldButton> getDefaultFieldButtonList() { |
||||
List<VanChartFieldButton> fieldButtonList = new ArrayList<>(); |
||||
|
||||
fieldButtonList.add(richTextProcessesFormatPane); |
||||
fieldButtonList.add(getSeriesNameButton()); |
||||
fieldButtonList.add(richTextStartTimeFormatPane); |
||||
fieldButtonList.add(richTextEndTimeFormatPane); |
||||
fieldButtonList.add(richTextDurationFormatPane); |
||||
fieldButtonList.add(richTextProgressFormatPane); |
||||
|
||||
return fieldButtonList; |
||||
} |
||||
|
||||
public void populateDefaultField(AttrTooltipContent tooltipContent) { |
||||
super.populateDefaultField(tooltipContent); |
||||
|
||||
if (tooltipContent instanceof AttrGanttTooltipContent) { |
||||
AttrGanttTooltipContent gantt = (AttrGanttTooltipContent) tooltipContent; |
||||
|
||||
populateButtonFormat(richTextProcessesFormatPane, gantt.getRichTextProcessesFormat()); |
||||
populateButtonFormat(richTextStartTimeFormatPane, gantt.getRichTextStartTimeFormat()); |
||||
populateButtonFormat(richTextEndTimeFormatPane, gantt.getRichTextEndTimeFormat()); |
||||
populateButtonFormat(richTextDurationFormatPane, gantt.getRichTextDurationFormat()); |
||||
populateButtonFormat(richTextProgressFormatPane, gantt.getRichTextProgressFormat()); |
||||
} |
||||
} |
||||
|
||||
public void updateDefaultField(AttrTooltipContent tooltipContent) { |
||||
super.updateDefaultField(tooltipContent); |
||||
|
||||
if (tooltipContent instanceof AttrGanttTooltipContent) { |
||||
AttrGanttTooltipContent gantt = (AttrGanttTooltipContent) tooltipContent; |
||||
|
||||
updateButtonFormat(richTextProcessesFormatPane, gantt.getRichTextProcessesFormat()); |
||||
updateButtonFormat(richTextStartTimeFormatPane, gantt.getRichTextStartTimeFormat()); |
||||
updateButtonFormat(richTextEndTimeFormatPane, gantt.getRichTextEndTimeFormat()); |
||||
updateButtonFormat(richTextDurationFormatPane, gantt.getRichTextDurationFormat()); |
||||
updateButtonFormat(richTextProgressFormatPane, gantt.getRichTextProgressFormat()); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,41 @@
|
||||
package com.fr.van.chart.map.line; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipStartAndEndNameFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListener; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
public class VanChartLineMapRichTextFieldListPane extends VanChartFieldListPane { |
||||
|
||||
public VanChartLineMapRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void initDefaultFieldButton() { |
||||
VanChartFieldListener fieldListener = getFieldListener(); |
||||
|
||||
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Start_And_End"), |
||||
new AttrTooltipStartAndEndNameFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), |
||||
new AttrTooltipSeriesFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton valueButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Value"), |
||||
new AttrTooltipValueFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton percentButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Percent"), |
||||
new AttrTooltipPercentFormat(), false, fieldListener); |
||||
|
||||
setCategoryNameButton(categoryNameButton); |
||||
setSeriesNameButton(seriesNameButton); |
||||
setValueButton(valueButton); |
||||
setPercentButton(percentButton); |
||||
} |
||||
} |
@ -0,0 +1,41 @@
|
||||
package com.fr.van.chart.multilayer.style; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; |
||||
import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListener; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
public class VanChartMultiPieRichTextFieldListPane extends VanChartFieldListPane { |
||||
|
||||
public VanChartMultiPieRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void initDefaultFieldButton() { |
||||
VanChartFieldListener fieldListener = getFieldListener(); |
||||
|
||||
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Level_Name"), |
||||
new AttrTooltipMultiLevelNameFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), |
||||
new AttrTooltipSeriesFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton valueButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Value"), |
||||
new AttrTooltipValueFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton percentButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Percent"), |
||||
new AttrTooltipPercentFormat(), false, fieldListener); |
||||
|
||||
setCategoryNameButton(categoryNameButton); |
||||
setSeriesNameButton(seriesNameButton); |
||||
setValueButton(valueButton); |
||||
setPercentButton(percentButton); |
||||
} |
||||
} |
@ -0,0 +1,70 @@
|
||||
package com.fr.van.chart.pie.style; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.plugin.chart.base.AttrTooltipContent; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipSummaryValueFormat; |
||||
import com.fr.plugin.chart.pie.attr.PieCategoryLabelContent; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListener; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class VanChartPieCategoryRichTextFieldListPane extends VanChartFieldListPane { |
||||
|
||||
private VanChartFieldButton summaryValueButton; |
||||
|
||||
public VanChartPieCategoryRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void initDefaultFieldButton() { |
||||
super.initDefaultFieldButton(); |
||||
|
||||
VanChartFieldListener listener = getFieldListener(); |
||||
|
||||
summaryValueButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Summary_Value"), |
||||
new AttrTooltipSummaryValueFormat(), false, listener); |
||||
} |
||||
|
||||
protected boolean supportAddField() { |
||||
return false; |
||||
} |
||||
|
||||
protected void addDefaultFieldButton(JPanel fieldPane) { |
||||
fieldPane.add(getCategoryNameButton()); |
||||
fieldPane.add(summaryValueButton); |
||||
} |
||||
|
||||
protected List<VanChartFieldButton> getDefaultFieldButtonList() { |
||||
List<VanChartFieldButton> fieldButtonList = new ArrayList<>(); |
||||
|
||||
fieldButtonList.add(getCategoryNameButton()); |
||||
fieldButtonList.add(summaryValueButton); |
||||
|
||||
return fieldButtonList; |
||||
} |
||||
|
||||
public void populateDefaultField(AttrTooltipContent tooltipContent) { |
||||
super.populateDefaultField(tooltipContent); |
||||
|
||||
if (tooltipContent instanceof PieCategoryLabelContent) { |
||||
PieCategoryLabelContent pieCategory = (PieCategoryLabelContent) tooltipContent; |
||||
populateButtonFormat(summaryValueButton, pieCategory.getRichTextSummaryValueFormat()); |
||||
} |
||||
} |
||||
|
||||
public void updateDefaultField(AttrTooltipContent tooltipContent) { |
||||
super.updateDefaultField(tooltipContent); |
||||
|
||||
if (tooltipContent instanceof PieCategoryLabelContent) { |
||||
PieCategoryLabelContent pieCategory = (PieCategoryLabelContent) tooltipContent; |
||||
updateButtonFormat(summaryValueButton, pieCategory.getRichTextSummaryValueFormat()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.fr.van.chart.pie.style; |
||||
|
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class VanChartPieValueRichTextFieldListPane extends VanChartFieldListPane { |
||||
|
||||
public VanChartPieValueRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void addDefaultFieldButton(JPanel fieldPane) { |
||||
fieldPane.add(getSeriesNameButton()); |
||||
fieldPane.add(getValueButton()); |
||||
fieldPane.add(getPercentButton()); |
||||
} |
||||
|
||||
protected List<VanChartFieldButton> getDefaultFieldButtonList() { |
||||
List<VanChartFieldButton> fieldButtonList = new ArrayList<>(); |
||||
|
||||
fieldButtonList.add(getSeriesNameButton()); |
||||
fieldButtonList.add(getValueButton()); |
||||
fieldButtonList.add(getPercentButton()); |
||||
|
||||
return fieldButtonList; |
||||
} |
||||
} |
@ -0,0 +1,61 @@
|
||||
package com.fr.van.chart.structure.desinger.style; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.ui.ModernUIPane; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; |
||||
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; |
||||
import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldButton; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; |
||||
import com.fr.van.chart.designer.component.richText.VanChartFieldListener; |
||||
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class VanChartStructureRichTextFieldListPane extends VanChartFieldListPane { |
||||
|
||||
public VanChartStructureRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) { |
||||
super(fieldAttrPane, richEditorPane); |
||||
} |
||||
|
||||
protected void initDefaultFieldButton() { |
||||
VanChartFieldListener fieldListener = getFieldListener(); |
||||
|
||||
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Node_Name"), |
||||
new AttrTooltipMultiLevelNameFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), |
||||
new AttrTooltipSeriesFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton valueButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Value"), |
||||
new AttrTooltipValueFormat(), false, fieldListener); |
||||
|
||||
VanChartFieldButton percentButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Percent"), |
||||
new AttrTooltipPercentFormat(), false, fieldListener); |
||||
|
||||
setCategoryNameButton(categoryNameButton); |
||||
setSeriesNameButton(seriesNameButton); |
||||
setValueButton(valueButton); |
||||
setPercentButton(percentButton); |
||||
} |
||||
|
||||
protected void addDefaultFieldButton(JPanel fieldPane) { |
||||
fieldPane.add(getCategoryNameButton()); |
||||
fieldPane.add(getSeriesNameButton()); |
||||
fieldPane.add(getValueButton()); |
||||
} |
||||
|
||||
protected List<VanChartFieldButton> getDefaultFieldButtonList() { |
||||
List<VanChartFieldButton> fieldButtonList = new ArrayList<>(); |
||||
|
||||
fieldButtonList.add(getCategoryNameButton()); |
||||
fieldButtonList.add(getSeriesNameButton()); |
||||
fieldButtonList.add(getValueButton()); |
||||
|
||||
return fieldButtonList; |
||||
} |
||||
} |
Loading…
Reference in new issue