Browse Source
* commit 'cff86213b7bee3e2f1d83abae7102c2f068a28df': REPORT-6868 设计器数据列单元格切换频繁弹出sql参数对话框; 无任务,删除部分无用代码。 REPORT-3272 之前代码被冲突覆盖了. REPORT-6883 漏传了 REPORT-6883 (这边取的是fitlayout不是对应的button上的背景,兼容性不好处理) REPORT-6769 tab选中后背景变化 无JIRA任务 组件共享readme文件生成问题 REPORT-6769 tab添加一个选中背景 REPORT-6740 9.0切换工作目录和远程设计,卡 REPORT-6740 9.0切换工作目录和远程设计,卡 视觉修改 修复数据库表名带.引起的bug tab按钮添加渐变色设置 无 REPORT-6733 新tab布局vic验收问题以及一些代码质量 REPORT-6260 自适应布局下,选中body,无法粘贴组件了 REPORT-5856 插件管理新分类 平台插件分类过滤失效 代码修改 REPORT-6709 报表块、图表块的样式选了自定义,面板下方没有联动出内容 REPORT-6492 同步9.0 版本管理 验收问题修改
37 changed files with 1014 additions and 835 deletions
@ -1,40 +1,17 @@ |
|||||||
package com.fr.design.mainframe.widget.accessibles; |
package com.fr.design.mainframe.widget.accessibles; |
||||||
|
|
||||||
import com.fr.base.background.ColorBackground; |
import com.fr.design.style.background.BackgroundButtonPane; |
||||||
import com.fr.design.dialog.BasicDialog; |
import com.fr.design.style.background.BackgroundCardSwitchButtonPane; |
||||||
import com.fr.design.dialog.DialogActionAdapter; |
|
||||||
import com.fr.design.mainframe.widget.wrappers.BackgroundWrapper; |
|
||||||
import com.fr.design.style.background.BackgroundTabPane; |
|
||||||
import com.fr.general.Background; |
|
||||||
|
|
||||||
import javax.swing.SwingUtilities; |
|
||||||
import java.awt.Dimension; |
|
||||||
|
|
||||||
/** |
/** |
||||||
* @author kerry |
* @author kerry |
||||||
* @date 2018/1/17 |
* @date 2018/1/29 |
||||||
*/ |
*/ |
||||||
public class AccessibleTabBackgroundEditor extends UneditableAccessibleEditor { |
public class AccessibleTabBackgroundEditor extends AccessibleImgBackgroundEditor { |
||||||
private BackgroundTabPane choosePane; |
|
||||||
|
|
||||||
public AccessibleTabBackgroundEditor() { |
public AccessibleTabBackgroundEditor() { |
||||||
super(new BackgroundWrapper()); |
super(); |
||||||
} |
} |
||||||
|
|
||||||
@Override |
@Override |
||||||
protected void showEditorPane() { |
protected BackgroundButtonPane initBackgroundPane(){ |
||||||
choosePane = new BackgroundTabPane(); |
return new BackgroundCardSwitchButtonPane(); |
||||||
choosePane.setPreferredSize(new Dimension(600, 400)); |
|
||||||
BasicDialog dlg = choosePane.showWindow(SwingUtilities.getWindowAncestor(this)); |
|
||||||
dlg.addDialogActionListener(new DialogActionAdapter() { |
|
||||||
|
|
||||||
@Override |
|
||||||
public void doOk() { |
|
||||||
setValue(choosePane.update()); |
|
||||||
fireStateChanged(); |
|
||||||
} |
|
||||||
}); |
|
||||||
choosePane.populate(getValue() instanceof Background ? (Background) getValue() : new ColorBackground()); |
|
||||||
dlg.setVisible(true); |
|
||||||
} |
} |
||||||
} |
} |
@ -0,0 +1,40 @@ |
|||||||
|
package com.fr.design.mainframe.widget.accessibles; |
||||||
|
|
||||||
|
import com.fr.base.background.ColorBackground; |
||||||
|
import com.fr.design.dialog.BasicDialog; |
||||||
|
import com.fr.design.dialog.DialogActionAdapter; |
||||||
|
import com.fr.design.mainframe.widget.wrappers.BackgroundWrapper; |
||||||
|
import com.fr.design.style.background.BackgroundTabPane; |
||||||
|
import com.fr.general.Background; |
||||||
|
|
||||||
|
import javax.swing.SwingUtilities; |
||||||
|
import java.awt.Dimension; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author kerry |
||||||
|
* @date 2018/1/17 |
||||||
|
*/ |
||||||
|
public class AccessibleTabPaneBackgroundEditor extends UneditableAccessibleEditor { |
||||||
|
private BackgroundTabPane choosePane; |
||||||
|
|
||||||
|
public AccessibleTabPaneBackgroundEditor() { |
||||||
|
super(new BackgroundWrapper()); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void showEditorPane() { |
||||||
|
choosePane = new BackgroundTabPane(); |
||||||
|
choosePane.setPreferredSize(new Dimension(600, 400)); |
||||||
|
BasicDialog dlg = choosePane.showWindow(SwingUtilities.getWindowAncestor(this)); |
||||||
|
dlg.addDialogActionListener(new DialogActionAdapter() { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void doOk() { |
||||||
|
setValue(choosePane.update()); |
||||||
|
fireStateChanged(); |
||||||
|
} |
||||||
|
}); |
||||||
|
choosePane.populate(getValue() instanceof Background ? (Background) getValue() : new ColorBackground()); |
||||||
|
dlg.setVisible(true); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,95 @@ |
|||||||
|
package com.fr.design.style.background; |
||||||
|
|
||||||
|
import com.fr.base.background.ColorBackground; |
||||||
|
import com.fr.base.background.GradientBackground; |
||||||
|
import com.fr.base.background.ImageBackground; |
||||||
|
import com.fr.design.layout.FRGUIPaneFactory; |
||||||
|
import com.fr.design.style.background.gradient.GradientBackgroundPane; |
||||||
|
import com.fr.design.style.background.impl.ColorBackgroundPane; |
||||||
|
import com.fr.design.style.background.impl.ImageBackgroundPane; |
||||||
|
import com.fr.design.style.background.impl.NullBackgroundPane; |
||||||
|
import com.fr.general.Background; |
||||||
|
import com.fr.general.Inter; |
||||||
|
|
||||||
|
import java.util.LinkedHashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author kerry |
||||||
|
* @date 2018/1/29 |
||||||
|
*/ |
||||||
|
public class BackgroundCardSwitchButtonPane extends BackgroundButtonPane { |
||||||
|
|
||||||
|
private static Map<Class<? extends Background>, BackgroundUIWrapper> cardSwitchButton = new LinkedHashMap<>(); |
||||||
|
|
||||||
|
static { |
||||||
|
registerCardSwitchBtnBackground(cardSwitchButton); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
private static void registerCardSwitchBtnBackground(Map<Class<? extends Background>, BackgroundUIWrapper> map) { |
||||||
|
map.put(ColorBackground.class, BackgroundUIWrapper.create() |
||||||
|
.setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color"))); |
||||||
|
map.put(ImageBackground.class, BackgroundUIWrapper.create() |
||||||
|
.setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); |
||||||
|
map.put(GradientBackground.class, BackgroundUIWrapper.create() |
||||||
|
.setType(GradientBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Gradient_Color"))); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
public BackgroundCardSwitchButtonPane() { |
||||||
|
super(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void initTabPane() { |
||||||
|
int index = 0; |
||||||
|
for (Class<? extends Background> key : cardSwitchButton.keySet()) { |
||||||
|
BackgroundUIWrapper wrapper = cardSwitchButton.get(key); |
||||||
|
wrapper.setIndex(index++); |
||||||
|
tabbedPane.addTab(Inter.getLocText(wrapper.getTitle()), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane()); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected BackgroundUIWrapper getBackgroundUIWrapper(Background background) { |
||||||
|
return cardSwitchButton.get(background == null ? null : background.getClass()); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
protected BackgroundDetailPane getTabItemPane(Background background, int index) { |
||||||
|
BackgroundDetailPane quickPane = cacheMap.get(index); |
||||||
|
if (quickPane == null) { |
||||||
|
BackgroundUIWrapper uiWrapper = getBackgroundUIWrapper(background); |
||||||
|
quickPane = BackgroundFactory.createByWrapper(uiWrapper); |
||||||
|
quickPane.addChangeListener(backgroundChangeListener); |
||||||
|
cacheMap.put(index, quickPane); |
||||||
|
} |
||||||
|
tabbedPane.setComponentAt(index, quickPane); |
||||||
|
tabbedPane.setSelectedIndex(index); |
||||||
|
return quickPane; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected BackgroundDetailPane getTabItemPaneByIndex(int index) { |
||||||
|
BackgroundDetailPane quickPane = cacheMap.get(index); |
||||||
|
if (quickPane == null) { |
||||||
|
quickPane = createDetailPaneByIndex(index); |
||||||
|
tabbedPane.setComponentAt(index, quickPane); |
||||||
|
cacheMap.put(index, quickPane); |
||||||
|
quickPane.addChangeListener(backgroundChangeListener); |
||||||
|
} |
||||||
|
return quickPane; |
||||||
|
} |
||||||
|
|
||||||
|
public BackgroundDetailPane createDetailPaneByIndex(int index) { |
||||||
|
for (BackgroundUIWrapper wrapper : cardSwitchButton.values()) { |
||||||
|
if (wrapper.getIndex() == index) { |
||||||
|
return BackgroundFactory.createByWrapper(wrapper); |
||||||
|
} |
||||||
|
} |
||||||
|
return new NullBackgroundPane(); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue