@ -1,6 +1,9 @@
package com.fr.quickeditor.cellquick ;
import com.fine.swing.ui.layout.Layouts ;
import com.fine.theme.icon.LazyIcon ;
import com.formdev.flatlaf.ui.FlatUIUtils ;
import com.formdev.flatlaf.util.ScaledEmptyBorder ;
import com.fr.base.BaseFormula ;
import com.fr.design.actions.columnrow.DSColumnConditionAction ;
import com.fr.design.actions.core.ActionFactory ;
@ -17,6 +20,7 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.CustomVariableResolver ;
import com.fr.design.formula.FormulaFactory ;
import com.fr.design.formula.UIFormula ;
import com.fr.design.gui.core.ReactiveCardPane ;
import com.fr.design.gui.frpane.AttributeChangeListener ;
import com.fr.design.gui.ibutton.UIButton ;
import com.fr.design.gui.ibutton.UIHeadGroup ;
@ -28,13 +32,9 @@ import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField ;
import com.fr.design.i18n.Toolkit ;
import com.fr.design.layout.FRGUIPaneFactory ;
import com.fr.design.layout.TableLayout ;
import com.fr.design.layout.TableLayoutHelper ;
import com.fr.design.mainframe.cell.AbstractDSCellEditorPane ;
import com.fr.design.sort.celldscolumn.CellDSColumnSortPane ;
import com.fr.design.utils.gui.UIComponentUtils ;
import com.fr.design.widget.FRWidgetFactory ;
import com.fr.general.IOUtils ;
import com.fr.grid.selection.CellSelection ;
import com.fr.quickeditor.CellQuickEditor ;
import com.fr.report.cell.CellElement ;
@ -45,15 +45,12 @@ import com.fr.report.cell.cellattr.core.group.FilterTypeEnum;
import com.fr.report.cell.cellattr.core.group.SelectCount ;
import com.fr.stable.StringUtils ;
import javax.swing.BorderFactory ;
import javax.swing.JComponent ;
import javax.swing.JPanel ;
import javax.swing.SwingUtilities ;
import java.awt.BorderLayout ;
import java.awt.CardLayout ;
import java.awt.Color ;
import java.awt.Component ;
import java.awt.Dimension ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionListener ;
import java.awt.event.ItemEvent ;
@ -63,6 +60,9 @@ import java.util.Arrays;
import java.util.Set ;
import static com.fine.swing.ui.layout.Layouts.cell ;
import static com.fine.swing.ui.layout.Layouts.row ;
import static com.fine.swing.ui.layout.Layouts.column ;
import static com.fine.swing.ui.layout.Layouts.flex ;
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.BOTTOM ;
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.EVEN ;
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.ODD ;
@ -79,9 +79,6 @@ import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.UNDEFINE;
* @since 9 . 0
* /
public class CellDSColumnEditor extends CellQuickEditor {
private static final double P = TableLayout . PREFERRED , F = TableLayout . FILL ;
private static final Color TIP_FONT_COLOR = new Color ( 0x7F333334 , true ) ;
/ * *
* 基本和高级设置
@ -275,13 +272,6 @@ public class CellDSColumnEditor extends CellQuickEditor {
) . getComponent ( ) ;
}
protected void initContentPane ( ) {
leftContentPane = createContentPane ( ) ;
if ( leftContentPane ! = null ) {
this . add ( leftContentPane , BorderLayout . CENTER ) ;
}
}
private void initComponents ( ) {
dataPane = new SelectedDataColumnPane ( true , true ) ;
groupPane = new ResultSetGroupDockingPane ( ) ;
@ -295,7 +285,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
condition . setSmallIcon ( UIConstants . EMPTY_ICON ) ;
condition . setName ( Toolkit . i18nText ( "Fine-Design_Basic_Edit" ) ) ;
conditionUIButton = new UIButton ( condition ) ;
conditionPane = Layouts . row ( cell ( uiLabel ) . weight ( 1 . 2 ) , cell ( conditionUIButton ) . weight ( 3 ) ) . getComponent ( ) ;
conditionPane = row ( cell ( uiLabel ) . weight ( 1 . 2 ) , cell ( conditionUIButton ) . weight ( 3 ) ) . getComponent ( ) ;
}
private void initListener ( ) {
@ -411,10 +401,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
public DSColumnAdvancedEditorPane ( ) {
this . setBorder ( BorderFactory . createEmptyBorder ( 10 , 0 , 0 , 0 ) ) ;
}
@Override
public String getIconPath ( ) {
return Toolkit . i18nText ( "Fine-Design_Report_Advanced" ) ;
@ -425,8 +413,6 @@ public class CellDSColumnEditor extends CellQuickEditor {
return Toolkit . i18nText ( "Fine-Design_Report_Advanced" ) ;
}
@Override
public void update ( ) {
if ( cellElement ! = null ) {
@ -548,49 +534,33 @@ public class CellDSColumnEditor extends CellQuickEditor {
* /
@Override
protected JPanel createContentPane ( ) {
JPanel contentPane = new JPanel ( new BorderLayout ( ) ) ;
this . setLayout ( FRGUIPaneFactory . createBorderLayout ( ) ) ;
JPanel contentPane = new JPanel ( new BorderLayout ( ) ) ;
//结果筛选
filterPane = new ResultSetFilterConfigPane ( ) ;
//自定义值显示
valuePane = new CustomValuePane ( ) ;
//可扩展性
JPanel extendableDirectionPane = FRGUIPaneFactory . createYBoxEmptyBorderPane ( ) ;
extendableDirectionPane . add ( heCheckBox = new UICheckBox ( Toolkit . i18nText ( "Fine-Design_Report_ExpandD_Horizontal_Extendable" ) ) ) ;
extendableDirectionPane . add ( veCheckBox = new UICheckBox ( Toolkit . i18nText ( "Fine-Design_Report_ExpandD_Vertical_Extendable" ) ) ) ;
//补充空白数据
JPanel multiNumPane = FRGUIPaneFactory . createYBoxEmptyBorderPane ( ) ;
useMultiNumCheckBox = new UICheckBox ( Toolkit . i18nText ( "Fine-Design_Report_Fill_Blank_Data" ) ) ;
JPanel checkBoxPane = new JPanel ( new BorderLayout ( ) ) ;
checkBoxPane . add ( useMultiNumCheckBox , BorderLayout . WEST ) ;
multiNumPane . add ( checkBoxPane ) ;
multiNumSpinner = new UISpinner ( 1 , 10000 , 1 , 1 ) ;
//数据倍数
UILabel multipleLabel = new UILabel ( Toolkit . i18nText ( "Fine-Design_Report_Column_Multiple" ) ) ;
multiPane = TableLayoutHelper . createGapTableLayoutPane ( new Component [ ] [ ] {
new Component [ ] {
multipleLabel , multiNumSpinner
}
} , new double [ ] { P } , new double [ ] { P , F } , HGAP , VGAP
) ;
multiPane . setBorder ( BorderFactory . createEmptyBorder ( 0 , 20 , 0 , 0 ) ) ;
multiNumPane . add ( multiPane ) ;
Component [ ] [ ] components = new Component [ ] [ ] {
{ filterPane } ,
{ valuePane } ,
{ extendableDirectionPane } ,
{ multiNumPane }
} ;
double [ ] rowSize = new double [ components . length ] ;
Arrays . fill ( rowSize , P ) ;
double [ ] columnSize = { F } ;
JPanel advancePropertyPane = TableLayoutHelper . createGapTableLayoutPane ( components , rowSize , columnSize , HGAP , VGAP ) ;
multiPane = Layouts . row (
cell ( multipleLabel ) . weight ( 1 . 2 ) , cell ( multiNumSpinner ) . weight ( 3 )
) . getComponent ( ) ;
JPanel multiNumPane = Layouts . column ( LayoutConstants . VERTICAL_GAP ,
cell ( useMultiNumCheckBox ) ,
cell ( multiPane )
) . getComponent ( ) ;
// 核心面板
JPanel advancePropertyPane = Layouts . column ( LayoutConstants . VERTICAL_GAP ,
cell ( filterPane ) ,
cell ( valuePane ) ,
cell ( heCheckBox = new UICheckBox ( Toolkit . i18nText ( "Fine-Design_Report_ExpandD_Horizontal_Extendable" ) ) ) ,
cell ( veCheckBox = new UICheckBox ( Toolkit . i18nText ( "Fine-Design_Report_ExpandD_Vertical_Extendable" ) ) ) ,
cell ( multiNumPane )
) . getComponent ( ) ;
contentPane . add ( advancePropertyPane , BorderLayout . NORTH ) ;
UIExpandablePane sortUIExpandablePane =
new UIExpandablePane ( Toolkit . i18nText ( "Fine-Design_Sort_Data_Column_Sort" ) ,
@ -619,8 +589,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
private JPanel contentPane ;
private UIComboBox rsComboBox ;
private JPanel setCardPane ;
private JPanel tipCardPane ;
private ReactiveCardPane setTipCardPane ;
private UITextField serialTextField ;
private JFormulaField topFormulaPane ;
private JFormulaField bottomFormulaPane ;
@ -629,63 +598,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
@Override
public void actionPerformed ( ActionEvent evt ) {
int selectIndex = rsComboBox . getSelectedIndex ( ) ;
CardLayout setCardPaneLayout = ( CardLayout ) setCardPane . getLayout ( ) ;
CardLayout tipCardPaneLayout = ( CardLayout ) tipCardPane . getLayout ( ) ;
if ( selectIndex = = TOP . getValue ( ) ) {
//前N个
setCardPaneLayout . show ( setCardPane , TOP . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , TOP . name ( ) ) ;
//隐藏tip 显示set
setCardPane . setPreferredSize ( new Dimension ( 156 , 20 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , VGAP ) ;
tipCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , 0 ) ;
} else if ( selectIndex = = BOTTOM . getValue ( ) ) {
//后N个
setCardPaneLayout . show ( setCardPane , BOTTOM . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , BOTTOM . name ( ) ) ;
//隐藏tip 显示set
setCardPane . setPreferredSize ( new Dimension ( 156 , 20 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , VGAP ) ;
tipCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , 0 ) ;
} else if ( selectIndex = = ODD . getValue ( ) ) {
//奇数
setCardPaneLayout . show ( setCardPane , ODD . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , ODD . name ( ) ) ;
//隐藏set 显示tip
setCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , 0 ) ;
tipCardPane . setPreferredSize ( new Dimension ( 224 , 40 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , VGAP_INNER ) ;
} else if ( selectIndex = = EVEN . getValue ( ) ) {
//偶数
setCardPaneLayout . show ( setCardPane , EVEN . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , EVEN . name ( ) ) ;
//隐藏set 显示tip
setCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , 0 ) ;
tipCardPane . setPreferredSize ( new Dimension ( 224 , 40 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , VGAP_INNER ) ;
} else if ( selectIndex = = SPECIFY . getValue ( ) ) {
//指定
setCardPaneLayout . show ( setCardPane , SPECIFY . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , SPECIFY . name ( ) ) ;
//显示set和tip
setCardPane . setPreferredSize ( new Dimension ( 156 , 20 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , VGAP ) ;
tipCardPane . setPreferredSize ( new Dimension ( 224 , 50 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , VGAP_INNER ) ;
} else {
//未定义
setCardPaneLayout . show ( setCardPane , UNDEFINE . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , UNDEFINE . name ( ) ) ;
//隐藏set和tip
setCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , 0 ) ;
tipCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , 0 ) ;
}
changeSetTipCardPane ( selectIndex ) ;
}
} ;
@ -702,50 +615,47 @@ public class CellDSColumnEditor extends CellQuickEditor {
Toolkit . i18nText ( "Fine-Design_Report_Specify" )
} ) ;
rsComboBox . addActionListener ( actionListener ) ;
//配置展示CardLayout
setCardPane = FRGUIPaneFactory . createCardLayout_S_Pane ( ) ;
//提示信息展示CardLayout
tipCardPane = FRGUIPaneFactory . createCardLayout_S_Pane ( ) ;
initSetTipCardPane ( ) ;
contentPane = Layouts . column ( LayoutConstants . VERTICAL_GAP ,
row (
cell ( filterLabel ) . weight ( 1 . 2 ) , cell ( rsComboBox ) . weight ( 3 )
) ,
cell ( setTipCardPane )
) . getComponent ( ) ;
this . add ( contentPane , BorderLayout . CENTER ) ;
}
private void initSetTipCardPane ( ) {
//前N个
topFormulaPane = new JFormulaField ( DEFAULT_VALUE ) ;
setCardPane . add ( topFormulaPane , TOP . name ( ) ) ;
tipCardPane . add ( new JPanel ( ) , TOP . name ( ) ) ;
//后N个
bottomFormulaPane = new JFormulaField ( DEFAULT_VALUE ) ;
setCardPane . add ( bottomFormulaPane , BOTTOM . name ( ) ) ;
tipCardPane . add ( new JPanel ( ) , BOTTOM . name ( ) ) ;
//自定义值下方没有提示信息,也没有输入框
setCardPane . add ( new JPanel ( ) , UNDEFINE . name ( ) ) ;
tipCardPane . add ( new JPanel ( ) , UNDEFINE . name ( ) ) ;
//自定义
serialTextField = new UITextField ( 16 ) ;
//奇数 UILabel 占一行作为提示信息
setCardPane . add ( new JPanel ( ) , ODD . name ( ) ) ;
MultilineLabel oddTip = new MultilineLabel ( Toolkit . i18nText ( "Fine-Design_Report_DS_Filter_Odd_Tip" ) ) ;
oddTip . setForeground ( TIP_FONT_COLOR ) ;
tipCardPane . add ( oddTip , ODD . name ( ) ) ;
//偶数 UILabel 占一行作为提示信息
setCardPane . add ( new JPanel ( ) , EVEN . name ( ) ) ;
MultilineLabel evenTip = new MultilineLabel ( Toolkit . i18nText ( "Fine-Design_Report_DS_Filter_Even_Tip" ) ) ;
evenTip . setForeground ( TIP_FONT_COLOR ) ;
tipCardPane . add ( evenTip , EVEN . name ( ) ) ;
//输入框占用右半边,提示信息占一行
serialTextField = new UITextField ( 16 ) ;
setCardPane . add ( serialTextField , SPECIFY . name ( ) ) ;
MultilineLabel specifyTip = new MultilineLabel ( Toolkit . i18nText ( "Fine-Design_Report_DS_Filter_Specify_Tip" ) ) ;
specifyTip . setForeground ( TIP_FONT_COLOR ) ;
tipCardPane . add ( specifyTip , SPECIFY . name ( ) ) ;
contentPane = TableLayoutHelper . createDiffVGapTableLayoutPane ( new Component [ ] [ ] {
{ filterLabel , rsComboBox } ,
{ null , setCardPane } ,
{ tipCardPane , null }
} , new double [ ] { P , P , P } , new double [ ] { P , F } , HGAP , new double [ ] { VGAP , VGAP_INNER } ) ;
this . add ( contentPane , BorderLayout . CENTER ) ;
Color tipColor = FlatUIUtils . getUIColor ( "Label.tipColor" , Color . GRAY ) ;
Arrays . asList ( oddTip , evenTip , specifyTip ) . forEach ( it - > it . setForeground ( tipColor ) ) ;
setTipCardPane = ReactiveCardPane . create ( )
. addSupplier ( TOP . name ( ) , ( ) - > row ( flex ( 1 . 2 ) , cell ( topFormulaPane ) . weight ( 3 ) ) . getComponent ( ) )
. addSupplier ( BOTTOM . name ( ) , ( ) - > row ( flex ( 1 . 2 ) , cell ( bottomFormulaPane ) . weight ( 3 ) ) . getComponent ( ) )
. addSupplier ( ODD . name ( ) , ( ) - > row (
flex ( 1 . 2 ) ,
cell ( oddTip ) . weight ( 3 )
) . getComponent ( ) )
. addSupplier ( EVEN . name ( ) , ( ) - > row (
flex ( 1 . 2 ) ,
cell ( evenTip ) . weight ( 3 )
) . getComponent ( ) )
. addSupplier ( SPECIFY . name ( ) , ( ) - > column ( LayoutConstants . VERTICAL_GAP ,
row ( flex ( 1 . 2 ) , cell ( serialTextField ) . weight ( 3 ) ) ,
row ( flex ( 1 . 2 ) , cell ( specifyTip ) . weight ( 3 ) )
) . getComponent ( ) ) ;
// 未定义不显示
setTipCardPane . setVisible ( false ) ;
}
public void populate ( CellElement cellElement ) {
@ -757,8 +667,6 @@ public class CellDSColumnEditor extends CellQuickEditor {
SelectCount selectCount = dSColumn . getSelectCount ( ) ;
this . topFormulaPane . populateElement ( cellElement ) ;
this . bottomFormulaPane . populateElement ( cellElement ) ;
CardLayout setCardPaneLayout = ( CardLayout ) setCardPane . getLayout ( ) ;
CardLayout tipCardPaneLayout = ( CardLayout ) tipCardPane . getLayout ( ) ;
// 重置默认值
this . topFormulaPane . populate ( DEFAULT_VALUE ) ;
this . bottomFormulaPane . populate ( DEFAULT_VALUE ) ;
@ -767,86 +675,28 @@ public class CellDSColumnEditor extends CellQuickEditor {
if ( selectCount ! = null ) {
int selectCountType = selectCount . getType ( ) ;
this . rsComboBox . setSelectedIndex ( selectCountType ) ;
switch ( FilterTypeEnum . getFilterByValue ( selectCountType ) ) {
case TOP :
this . topFormulaPane . populate ( selectCount . getFormulaCount ( ) ) ;
//前N个
setCardPaneLayout . show ( setCardPane , TOP . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , TOP . name ( ) ) ;
//隐藏tip 显示set
setCardPane . setPreferredSize ( new Dimension ( 156 , 20 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , VGAP ) ;
tipCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , 0 ) ;
break ;
case BOTTOM :
this . bottomFormulaPane . populate ( selectCount . getFormulaCount ( ) ) ;
//后N个
setCardPaneLayout . show ( setCardPane , BOTTOM . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , BOTTOM . name ( ) ) ;
//隐藏tip 显示set
setCardPane . setPreferredSize ( new Dimension ( 156 , 20 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , VGAP ) ;
tipCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , 0 ) ;
break ;
case SPECIFY :
this . serialTextField . setText ( selectCount . getSerial ( ) ) ;
//指定
setCardPaneLayout . show ( setCardPane , SPECIFY . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , SPECIFY . name ( ) ) ;
//显示set和tip
setCardPane . setPreferredSize ( new Dimension ( 156 , 20 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , VGAP ) ;
tipCardPane . setPreferredSize ( new Dimension ( 224 , 50 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , VGAP_INNER ) ;
break ;
case EVEN :
//偶数
setCardPaneLayout . show ( setCardPane , EVEN . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , EVEN . name ( ) ) ;
//隐藏set 显示tip
setCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , 0 ) ;
tipCardPane . setPreferredSize ( new Dimension ( 224 , 40 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , VGAP_INNER ) ;
break ;
case ODD :
//奇数
setCardPaneLayout . show ( setCardPane , ODD . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , ODD . name ( ) ) ;
//隐藏set 显示tip
setCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , 0 ) ;
tipCardPane . setPreferredSize ( new Dimension ( 224 , 40 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , VGAP_INNER ) ;
break ;
default :
//未定义
setCardPaneLayout . show ( setCardPane , UNDEFINE . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , UNDEFINE . name ( ) ) ;
//隐藏set和tip
setCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , 0 ) ;
tipCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , 0 ) ;
}
this . topFormulaPane . populate ( selectCount . getFormulaCount ( ) ) ;
this . bottomFormulaPane . populate ( selectCount . getFormulaCount ( ) ) ;
this . serialTextField . setText ( selectCount . getSerial ( ) ) ;
changeSetTipCardPane ( selectCountType ) ;
} else {
this . rsComboBox . setSelectedIndex ( 0 ) ;
//未定义
setCardPaneLayout . show ( setCardPane , UNDEFINE . name ( ) ) ;
tipCardPaneLayout . show ( tipCardPane , UNDEFINE . name ( ) ) ;
//隐藏set和tip
setCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 2 , 0 ) ;
tipCardPane . setPreferredSize ( new Dimension ( 0 , 0 ) ) ;
TableLayoutHelper . modifyTableLayoutIndexVGap ( contentPane , 4 , 0 ) ;
setTipCardPane . setVisible ( false ) ;
}
}
}
rsComboBox . addActionListener ( actionListener ) ;
}
private void changeSetTipCardPane ( int index ) {
FilterTypeEnum type = FilterTypeEnum . getFilterByValue ( index ) ;
if ( type = = UNDEFINE ) {
setTipCardPane . setVisible ( false ) ;
} else {
setTipCardPane . select ( type . name ( ) ) . populate ( ) ;
}
}
public void update ( CellElement cellElement ) {
if ( cellElement ! = null ) {
Object value = cellElement . getValue ( ) ;
@ -912,10 +762,9 @@ public class CellDSColumnEditor extends CellQuickEditor {
formulaTextField . setText ( defaultValue ) ;
JPanel textFieldPane = new JPanel ( new BorderLayout ( ) ) ;
textFieldPane . add ( formulaTextField , BorderLayout . CENTER ) ;
textFieldPane . setBorder ( BorderFactory . create EmptyBorder( 0 , 0 , 0 , 5 ) ) ;
UIButton formulaButton = new UIButton ( IOUtils . read Icon( "/com/fr/design/images/m_insert/ formula.png " ) ) ;
textFieldPane . setBorder ( new Scaled EmptyBorder( 0 , 0 , 0 , 5 ) ) ;
UIButton formulaButton = new UIButton ( new Lazy Icon( "formula" ) ) ;
formulaButton . setToolTipText ( Toolkit . i18nText ( "Fine-Design_Report_Formula" ) + "..." ) ;
formulaButton . setPreferredSize ( new Dimension ( 20 , formulaTextField . getPreferredSize ( ) . height ) ) ;
formulaButton . addActionListener ( formulaButtonActionListener ) ;
JPanel pane = new JPanel ( new BorderLayout ( ) ) ;
@ -1000,11 +849,11 @@ public class CellDSColumnEditor extends CellQuickEditor {
public CustomValuePane ( ) {
this . setLayout ( new BorderLayout ( ) ) ;
UILabel customValueLabel = new UILabel ( Toolkit . i18nText ( "Fine-Design_Basic_Display_Value" ) ) ;
customValueLabel . setPreferredSize ( LABEL_DIMENSION ) ;
formulaField = new JFormulaField ( DEFAULT_VALUE ) ;
this . add ( TableLayoutHelper . createGapTableLayoutPane ( new Component [ ] [ ] {
new Component [ ] { customValueLabel , formulaField } ,
} , new double [ ] { P } , new double [ ] { P , F } , HGAP , VGAP ) , BorderLayout . CENTER ) ;
this . add ( Layouts . row (
cell ( customValueLabel ) . weight ( 1 . 2 ) ,
cell ( formulaField ) . weight ( 3 )
) . getComponent ( ) ) ;
}
public void populate ( CellElement cellElement ) {