帆软报表设计器源代码。
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.
 
 
 
 

75 lines
1.7 KiB

package com.fr.design.webattr;
import java.util.ArrayList;
import java.util.List;
import com.fr.form.ui.ToolBar;
import com.fr.form.ui.Widget;
import com.fr.general.Background;
public class FToolBar {
private List<ToolBarButton> buttonlist = new ArrayList<ToolBarButton>();
private Background background = null;
private boolean isDefault = true;
private boolean buttonBgColorLight = true;
public List<ToolBarButton> getButtonlist() {
return buttonlist;
}
public void setButtonlist(List<ToolBarButton> buttonlist) {
if (buttonlist == null ) {
this.buttonlist = new ArrayList<ToolBarButton>();
} else {
this.buttonlist = buttonlist;
}
}
public void addButton(ToolBarButton toolBarButton) {
this.buttonlist.add(toolBarButton);
}
public void removeButton(ToolBarButton toolBarButton) {
this.buttonlist.remove(toolBarButton);
}
public void clearButton() {
this.buttonlist.clear();
}
public Background getBackground() {
return background;
}
public void setBackground(Background background) {
this.background = background;
}
public boolean isDefault() {
return isDefault;
}
public void setDefault(boolean isDefault) {
this.isDefault = isDefault;
}
public boolean isBgColorLight() {
return buttonBgColorLight;
}
public void setBgColorLight(boolean bgColorLight) {
this.buttonBgColorLight = bgColorLight;
}
public ToolBar getToolBar() {
Widget[] n = new Widget[this.getButtonlist().size()];
for (int j = 0; j < this.getButtonlist().size(); j++) {
n[j] = this.getButtonlist().get(j).getWidget();
}
ToolBar toolBar = new ToolBar(n);
toolBar.setBackground(this.background);
toolBar.setDefault(this.isDefault);
toolBar.setButtonBgColorLight(this.buttonBgColorLight);
return toolBar;
}
}