You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.6 KiB
67 lines
1.6 KiB
package com.fr.plugin.present.ui; |
|
|
|
import com.fr.design.beans.FurtherBasicBeanPane; |
|
import com.fanruan.api.design.ui.component.formula.UIFormulaTextField; |
|
import com.fanruan.api.design.ui.component.UILabel; |
|
import com.fanruan.api.design.DesignKit; |
|
import com.fanruan.api.design.util.GUICoreKit; |
|
import com.fr.plugin.present.fun.StarPresent; |
|
|
|
import java.awt.*; |
|
|
|
/** |
|
* @author richie |
|
* @date 2015-05-24 |
|
* @since 8.0 |
|
*/ |
|
public class StarPresentPane extends FurtherBasicBeanPane<StarPresent> { |
|
|
|
private UIFormulaTextField formulaPane; |
|
|
|
public StarPresentPane() { |
|
initComponents(); |
|
} |
|
|
|
private void initComponents() { |
|
setLayout(new BorderLayout()); |
|
formulaPane = new UIFormulaTextField(); |
|
add(GUICoreKit.createBorderLayoutPane( |
|
new UILabel(DesignKit.i18nText("Plugin-Present_Value") + ":"), |
|
BorderLayout.WEST, |
|
formulaPane, |
|
BorderLayout.CENTER |
|
), BorderLayout.NORTH); |
|
|
|
} |
|
|
|
|
|
@Override |
|
public boolean accept(Object ob) { |
|
return ob instanceof StarPresent; |
|
} |
|
|
|
@Override |
|
public String title4PopupWindow() { |
|
return DesignKit.i18nText("Plugin-Present_Star"); |
|
} |
|
|
|
@Override |
|
public void reset() { |
|
|
|
} |
|
|
|
@Override |
|
public void populateBean(StarPresent ob) { |
|
if (ob == null) { |
|
return; |
|
} |
|
formulaPane.populateBean(ob.getCondition()); |
|
} |
|
|
|
@Override |
|
public StarPresent updateBean() { |
|
StarPresent starPresent = new StarPresent(); |
|
starPresent.setCondition(formulaPane.updateBean()); |
|
return starPresent; |
|
} |
|
} |