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.

51 lines
1.2 KiB

package com.fr.plugin.event.manager.data;
import com.fr.form.ui.Widget;
import com.fr.report.cell.CellElement;
import javax.swing.Icon;
/**
* @author Joe
* Created by Joe on 12/13/2020
*/
public class MyCellWidget extends MyWidget {
private CellElement cellElement;
// 来自普通还是条件属性
private WidgetSource source;
public MyCellWidget(CellElement cellElement, Widget widget) {
this(cellElement, widget, WidgetSource.NORMAL);
}
public MyCellWidget(CellElement cellElement, Widget widget, WidgetSource source) {
super(widget);
this.cellElement = cellElement;
this.source = source;
}
public Widget getWidget() {
return widget;
}
public void setWidget(Widget widget) {
this.widget = widget;
}
public WidgetSource getSource() {
return source;
}
public void setSource(WidgetSource source) {
this.source = source;
}
@Override
public String getNodeName() {
if (source == WidgetSource.NORMAL) {
return cellElement.getRow() + " - " + cellElement.getColumn();
} else {
return cellElement.getRow() + " - " + cellElement.getColumn() + "Cond";
}
}
}