这是我的装饰课
SELECT Date, Amount, SUM(Amount) OVER (ORDER BY Date) AS CumulativeTotal
FROM Table
这是我的抽象装饰类
public class decorateButton extends addressDecorator {
//public addressbookInterface address;
public decorateButton(addressbookInterface AddressBookPane) {
super(AddressBookPane);
CommandButton add=new AddButton((AddressBookPane) super.address,((AddressBookPane)super.address).getRaf());
CommandButton redo=new CommandButton((AddressBookPane)super.address,((AddressBookPane)super.address).getRaf());
CommandButton undo=new CommandButton((AddressBookPane)super.address,((AddressBookPane)super.address).getRaf());
redo.setOnAction(((AddressBookPane)address).ae);
undo.setOnAction(((AddressBookPane)address).ae);
add.setOnAction(((AddressBookPane)address).ae);
( ((AddressBookPane)(super.address)).getJpButton()).getChildren().addAll(add,redo, undo);
}
@Override
public addressbookInterface getAddressBookPane() {
return super.getAddressBookPane();
}
}
我装饰了新的通讯簿,所以我需要添加3个按钮,但是我的类decoratButtons实际上是gridpane,所以我得到了gridpane内部的gridpane。
我的AddressBookPane是扩展网格窗格,我装饰了它