forked from fanruan/design
Browse Source
* commit '5a55c7b7afb38d076e46a8489d84b55f77b75e3e': (47 commits) REPORT-3262 splash REPORT-4553 windows下下拉框选择后弹出对话框但是下拉框不收起 删除无用import REPORT-4581 报表块样式-标题样式不起作用 REPORT-4580 部分视觉验收bug=>18,弹出框悬停背景色 REPORT-4580 部分视觉验收bug=>6,统一小箭头 REPORT-4580 部分视觉验收bug=>14(按钮高度调整) REPORT-4192 切换tab后重命名actio也要重新初始化下 REPORT-4047 [9.0一轮回归]单个单元格设置边框后,再对包含此单元格的一片单元格设置背景,边框消失 解决9.0bug fix BI启动用了UIbutton,导致FRCoreContext提前加载了 REPORT-4554 属性面板弹出后部分内容消失 REPORT-4554 弹出的属性面板最值 REPORT-4554 tab导航按钮样式 图标 REPORT-4558 滚动条按钮红边 1 改图标 ...master
xiaoxia
7 years ago
113 changed files with 1291 additions and 1059 deletions
@ -1,59 +1,69 @@
|
||||
/** |
||||
* |
||||
* |
||||
*/ |
||||
package com.fr.design.mainframe.bbs; |
||||
|
||||
import com.fr.general.IOUtils; |
||||
import com.fr.general.SiteCenter; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
import java.util.Properties; |
||||
|
||||
/** |
||||
* @author neil |
||||
* |
||||
* @date: 2015-3-10-上午9:50:13 |
||||
*/ |
||||
public class BBSConstants { |
||||
|
||||
//判断是否更新的关键字
|
||||
public static final String UPDATE_KEY = loadAttribute("UPDATE_KEY", "newIsPopup"); |
||||
|
||||
|
||||
private static final String GUEST_KEY = "USER"; |
||||
private static final String LINK_KEY = "LINK"; |
||||
private static final int GUEST_NUM = 5; |
||||
|
||||
//用户名信息数组
|
||||
public static final String[] ALL_GUEST = loadAllGuestsInfo(GUEST_KEY); |
||||
//用户论坛链接信息
|
||||
public static final String[] ALL_LINK = loadAllGuestsInfo(LINK_KEY); |
||||
|
||||
private static Properties PROP = null; |
||||
|
||||
//加载所有用户的信息, 用户名, 论坛连接
|
||||
private static String[] loadAllGuestsInfo(String key){ |
||||
String[] allGuests = new String[GUEST_NUM]; |
||||
for (int i = 0; i < GUEST_NUM; i++) { |
||||
allGuests[i] = loadAttribute(key + i, StringUtils.EMPTY); |
||||
} |
||||
|
||||
return allGuests; |
||||
} |
||||
//如果要定制, 直接改bbs.properties就行了
|
||||
private static String loadAttribute(String key, String defaultValue) { |
||||
if (PROP == null) { |
||||
PROP = new Properties(); |
||||
try { |
||||
PROP.load(IOUtils.getResourceAsStream("/com/fr/design/mainframe/bbs/bbs.properties", BBSConstants.class)); |
||||
} catch (Exception e) { |
||||
} |
||||
} |
||||
|
||||
String p = PROP.getProperty(key); |
||||
if (StringUtils.isEmpty(p)) { |
||||
p = defaultValue; |
||||
} |
||||
return p; |
||||
} |
||||
|
||||
|
||||
|
||||
private static final String GUEST_KEY = "USER"; |
||||
private static final String GUEST_KEY_ONLINE = "guest.user"; |
||||
private static final String LINK_KEY = "LINK"; |
||||
private static final String LINK_KEY_ONLINE = "guest.link"; |
||||
|
||||
private static Properties PROP = null; |
||||
|
||||
public static String[] getAllGuest() { |
||||
return loadAllGuestsInfoOnline(GUEST_KEY_ONLINE, loadAllGuestsInfo(GUEST_KEY)); |
||||
} |
||||
|
||||
public static String[] getAllLink() { |
||||
return loadAllGuestsInfoOnline(LINK_KEY_ONLINE, loadAllGuestsInfo(LINK_KEY)); |
||||
} |
||||
|
||||
//加载所有用户的信息, 用户名, 论坛连接
|
||||
private static String loadAllGuestsInfo(String key) { |
||||
return loadAttribute(key, StringUtils.EMPTY); |
||||
} |
||||
|
||||
//加载所有用户的信息, 用户名, 论坛连接
|
||||
private static String[] loadAllGuestsInfoOnline(String key, String defaultValue) { |
||||
String[] allGuests = new String[0]; |
||||
String guest = SiteCenter.getInstance().acquireUrlByKind(key, defaultValue); |
||||
if (StringUtils.isNotEmpty(guest)) { |
||||
allGuests = guest.split("\\|"); |
||||
} |
||||
return allGuests; |
||||
} |
||||
|
||||
//如果要定制, 直接改bbs.properties就行了
|
||||
private static String loadAttribute(String key, String defaultValue) { |
||||
if (PROP == null) { |
||||
PROP = new Properties(); |
||||
try { |
||||
PROP.load(IOUtils.getResourceAsStream("/com/fr/design/mainframe/bbs/bbs.properties", BBSConstants.class)); |
||||
} catch (Exception e) { |
||||
} |
||||
} |
||||
|
||||
String p = PROP.getProperty(key); |
||||
if (StringUtils.isEmpty(p)) { |
||||
p = defaultValue; |
||||
} |
||||
return p; |
||||
} |
||||
|
||||
} |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 278 B |
@ -0,0 +1,50 @@
|
||||
package com.fr.plugin.chart.designer.style.series; |
||||
|
||||
import com.fr.chart.chartglyph.ConditionAttr; |
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.gui.controlpane.UnrepeatedNameHelper; |
||||
import com.fr.general.FRLogger; |
||||
import com.fr.general.NameObject; |
||||
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; |
||||
import com.fr.plugin.chart.designer.style.background.ChartNameObjectCreator; |
||||
import com.fr.stable.Nameable; |
||||
|
||||
import java.lang.reflect.Constructor; |
||||
import java.lang.reflect.InvocationTargetException; |
||||
|
||||
/** |
||||
* Created by mengao on 2017/9/11. |
||||
*/ |
||||
public class StackedAndAxisNameObjectCreator extends ChartNameObjectCreator { |
||||
|
||||
public StackedAndAxisNameObjectCreator(Object object, String menuName, Class clazz, Class<? extends BasicBeanPane> updatePane) { |
||||
super(object, menuName, clazz, updatePane); |
||||
} |
||||
|
||||
/** |
||||
* create Nameable |
||||
* |
||||
* @param helper |
||||
* @return |
||||
*/ |
||||
public Nameable createNameable(UnrepeatedNameHelper helper) { |
||||
Constructor<? extends ConditionAttr> constructor = null; |
||||
try { |
||||
constructor = clazzOfInitCase.getConstructor(); |
||||
ConditionAttr conditionAttr = constructor.newInstance(); |
||||
conditionAttr.addDataSeriesCondition((AttrSeriesStackAndAxis) object); |
||||
return new NameObject(helper.createUnrepeatedName(this.menuName()), conditionAttr); |
||||
|
||||
} catch (NoSuchMethodException e) { |
||||
FRLogger.getLogger().error(e.getMessage(), e); |
||||
} catch (IllegalAccessException e) { |
||||
FRLogger.getLogger().error(e.getMessage(), e); |
||||
} catch (InstantiationException e) { |
||||
FRLogger.getLogger().error(e.getMessage(), e); |
||||
} catch (InvocationTargetException e) { |
||||
FRLogger.getLogger().error(e.getMessage(), e); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
} |
@ -1,111 +0,0 @@
|
||||
package com.fr.plugin.chart.designer.style.series; |
||||
|
||||
import com.fr.chart.chartglyph.ConditionAttr; |
||||
import com.fr.chart.chartglyph.ConditionCollection; |
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.gui.frpane.UICorrelationComboBoxPane; |
||||
import com.fr.design.gui.imenutable.UIMenuNameableCreator; |
||||
import com.fr.general.Inter; |
||||
import com.fr.plugin.chart.attr.DefaultAxisHelper; |
||||
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
||||
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; |
||||
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; |
||||
import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane; |
||||
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; |
||||
import com.fr.plugin.chart.designer.component.VanChartUIMenuNameableCreator; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* Created by Fangjie on 2016/4/28. |
||||
*/ |
||||
public class VanChartCustomStackAndAxisEditPane extends BasicBeanPane<VanChartRectanglePlot> { |
||||
//堆积和坐标轴
|
||||
protected UICorrelationComboBoxPane stackAndAxisPane; |
||||
protected JPanel stackAndAxisWholePane; |
||||
|
||||
public VanChartCustomStackAndAxisEditPane() { |
||||
|
||||
initStackedAndAxisPane(); |
||||
|
||||
initContentPane(); |
||||
} |
||||
|
||||
private void initContentPane() { |
||||
this.setLayout(new BorderLayout(0, 5)); |
||||
this.add(stackAndAxisWholePane, BorderLayout.CENTER); |
||||
} |
||||
|
||||
//堆积和坐标轴设置(自定义柱形图等用到)
|
||||
protected JPanel initStackedAndAxisPane() { |
||||
stackAndAxisPane = new UICorrelationComboBoxPane(); |
||||
stackAndAxisWholePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(getPaneTitle(), stackAndAxisPane); |
||||
return stackAndAxisWholePane; |
||||
} |
||||
@Override |
||||
public void populateBean(VanChartRectanglePlot plot) { |
||||
java.util.List<VanChartAxis> xAxisList = plot.getXAxisList(); |
||||
java.util.List<VanChartAxis> yAxisList = plot.getYAxisList(); |
||||
String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList); |
||||
String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList); |
||||
|
||||
java.util.List<UIMenuNameableCreator> menuList = new ArrayList<UIMenuNameableCreator>(); |
||||
ConditionAttr demo = new ConditionAttr(); |
||||
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis(); |
||||
seriesStackAndAxis.setXAxisNamesArray(axisXNames); |
||||
seriesStackAndAxis.setYAxisNameArray(axisYNames); |
||||
demo.addDataSeriesCondition(seriesStackAndAxis); |
||||
menuList.add(new VanChartUIMenuNameableCreator(getPaneTitle(), demo, getStackAndAxisPaneClass())); |
||||
stackAndAxisPane.refreshMenuAndAddMenuAction(menuList); |
||||
|
||||
java.util.List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>(); |
||||
|
||||
ConditionCollection stackAndAxisCondition = plot.getStackAndAxisCondition(); |
||||
|
||||
for(int i = 0, len = stackAndAxisCondition.getConditionAttrSize(); i < len; i++){ |
||||
ConditionAttr conditionAttr = stackAndAxisCondition.getConditionAttr(i); |
||||
AttrSeriesStackAndAxis stackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class); |
||||
stackAndAxis.setXAxisNamesArray(axisXNames); |
||||
stackAndAxis.setYAxisNameArray(axisYNames); |
||||
list.add(new VanChartUIMenuNameableCreator(conditionAttr.getName(), conditionAttr, getStackAndAxisPaneClass())); |
||||
} |
||||
|
||||
stackAndAxisPane.populateBean(list); |
||||
stackAndAxisPane.doLayout(); |
||||
} |
||||
|
||||
@Override |
||||
public VanChartRectanglePlot updateBean() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public void updateBean(VanChartRectanglePlot plot){ |
||||
ConditionCollection stackAndAxisCondition = plot.getStackAndAxisCondition(); |
||||
stackAndAxisCondition.clearConditionAttr(); |
||||
|
||||
java.util.List<UIMenuNameableCreator> list = stackAndAxisPane.updateBean(); |
||||
for(UIMenuNameableCreator creator : list){ |
||||
ConditionAttr conditionAttr = (ConditionAttr)creator.getObj(); |
||||
conditionAttr.setName(creator.getName()); |
||||
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class); |
||||
seriesStackAndAxis.setStackID(creator.getName()); |
||||
stackAndAxisCondition.addConditionAttr(conditionAttr); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return null; |
||||
} |
||||
|
||||
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() { |
||||
return VanChartCustomStackAndAxisConditionPane.class; |
||||
} |
||||
|
||||
protected String getPaneTitle(){ |
||||
return Inter.getLocText("Plugin-ChartF_StackAndSeries"); |
||||
} |
||||
} |
@ -0,0 +1,104 @@
|
||||
package com.fr.plugin.chart.designer.style.series; |
||||
|
||||
import com.fr.chart.chartattr.Plot; |
||||
import com.fr.chart.chartglyph.ConditionAttr; |
||||
import com.fr.chart.chartglyph.ConditionCollection; |
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.gui.controlpane.NameableCreator; |
||||
import com.fr.design.gui.controlpane.ShortCut4JControlPane; |
||||
import com.fr.general.Inter; |
||||
import com.fr.general.NameObject; |
||||
import com.fr.plugin.chart.attr.DefaultAxisHelper; |
||||
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
||||
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; |
||||
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; |
||||
import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane; |
||||
import com.fr.plugin.chart.designer.component.VanChartUIListControlPane; |
||||
import com.fr.stable.Nameable; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* Created by mengao on 2017/9/11. |
||||
* 堆积和坐标轴面板 |
||||
*/ |
||||
public class VanChartStackedAndAxisListControlPane extends VanChartUIListControlPane { |
||||
|
||||
|
||||
@Override |
||||
public NameableCreator[] createNameableCreators() { |
||||
return new StackedAndAxisNameObjectCreator[]{new StackedAndAxisNameObjectCreator(new AttrSeriesStackAndAxis(), getPaneTitle(), ConditionAttr.class, getStackAndAxisPaneClass())}; |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return Inter.getLocText("Plugin-ChartF_StackAndSeries"); |
||||
} |
||||
|
||||
protected String getAddItemText() { |
||||
return Inter.getLocText("Plugin-ChartF_Add"); |
||||
} |
||||
|
||||
protected ShortCut4JControlPane[] createShortcuts() { |
||||
return new ShortCut4JControlPane[]{ |
||||
moveUpItemShortCut(), |
||||
moveDownItemShortCut(), |
||||
removeItemShortCut() |
||||
}; |
||||
} |
||||
|
||||
public void populate(VanChartRectanglePlot plot) { |
||||
this.plot = plot; |
||||
java.util.List<VanChartAxis> xAxisList = plot.getXAxisList(); |
||||
java.util.List<VanChartAxis> yAxisList = plot.getYAxisList(); |
||||
String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList); |
||||
String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList); |
||||
|
||||
java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>(); |
||||
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis(); |
||||
seriesStackAndAxis.setXAxisNamesArray(axisXNames); |
||||
seriesStackAndAxis.setYAxisNameArray(axisYNames); |
||||
menuList.add(new StackedAndAxisNameObjectCreator(seriesStackAndAxis, getPaneTitle(), ConditionAttr.class, getStackAndAxisPaneClass())); |
||||
|
||||
refreshNameableCreator(menuList.toArray(new StackedAndAxisNameObjectCreator[menuList.size()])); |
||||
|
||||
java.util.List<NameObject> nameObjects = new ArrayList<NameObject>(); |
||||
|
||||
ConditionCollection stackAndAxisCondition = plot.getStackAndAxisCondition(); |
||||
|
||||
for (int i = 0, len = stackAndAxisCondition.getConditionAttrSize(); i < len; i++) { |
||||
ConditionAttr conditionAttr = stackAndAxisCondition.getConditionAttr(i); |
||||
AttrSeriesStackAndAxis stackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class); |
||||
stackAndAxis.setXAxisNamesArray(axisXNames); |
||||
stackAndAxis.setYAxisNameArray(axisYNames); |
||||
nameObjects.add(new NameObject(conditionAttr.getName(), conditionAttr)); |
||||
} |
||||
|
||||
populate(nameObjects.toArray(new NameObject[nameObjects.size()])); |
||||
doLayout(); |
||||
} |
||||
|
||||
@Override |
||||
protected void update(Plot plot) { |
||||
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; |
||||
ConditionCollection stackAndAxisCondition = rectanglePlot.getStackAndAxisCondition(); |
||||
stackAndAxisCondition.clearConditionAttr(); |
||||
|
||||
Nameable[] nameables = this.update(); |
||||
for (Nameable nameable : nameables) { |
||||
ConditionAttr conditionAttr = (ConditionAttr) ((NameObject) nameable).getObject(); |
||||
conditionAttr.setName(nameable.getName()); |
||||
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class); |
||||
seriesStackAndAxis.setStackID(nameable.getName()); |
||||
stackAndAxisCondition.addConditionAttr(conditionAttr); |
||||
} |
||||
} |
||||
|
||||
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() { |
||||
return VanChartCustomStackAndAxisConditionPane.class; |
||||
} |
||||
|
||||
public String getPaneTitle() { |
||||
return Inter.getLocText("Plugin-ChartF_StackAndSeries"); |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue