forked from fanruan/design
Browse Source
Merge in DESIGN/design from ~FANGLEI/design10.0:feature/10.0 to feature/10.0 * commit 'd09a4584793f1dcc35147ebf8a383ebe1355b013': REPORT-57233 修正本地调试的修改 REPORT-57233 【FRM布局推荐】组件复用-对齐、自动间距、手动间距,调整后没有触发模板的保存和还原按钮,导致关闭再打开此模板还是调整前的效果feature/10.0
fanglei
3 years ago
13 changed files with 85 additions and 47 deletions
@ -1,23 +1,32 @@ |
|||||||
package com.fr.design.mainframe.widget.arrangement.buttons; |
package com.fr.design.mainframe.widget.arrangement.buttons; |
||||||
|
|
||||||
|
import com.fr.design.event.UIObserver; |
||||||
|
import com.fr.design.event.UIObserverListener; |
||||||
import com.fr.design.gui.ibutton.UIButton; |
import com.fr.design.gui.ibutton.UIButton; |
||||||
import com.fr.design.mainframe.MultiSelectionArrangement; |
import com.fr.design.mainframe.MultiSelectionArrangement; |
||||||
|
|
||||||
public abstract class AbstractMultiSelectionArrangementButton implements MultiSelectionArrangementButton { |
public abstract class AbstractMultiSelectionArrangementButton extends UIButton implements MultiSelectionArrangementButton, UIObserver { |
||||||
|
private static final long serialVersionUID = -2114423583742242771L; |
||||||
protected MultiSelectionArrangement arrangement; |
protected MultiSelectionArrangement arrangement; |
||||||
|
protected UIObserverListener uiObserverListener; |
||||||
|
|
||||||
public AbstractMultiSelectionArrangementButton(MultiSelectionArrangement arrangement) { |
public AbstractMultiSelectionArrangementButton(MultiSelectionArrangement arrangement) { |
||||||
|
super(); |
||||||
this.arrangement = arrangement; |
this.arrangement = arrangement; |
||||||
|
this.setNormalPainted(false); |
||||||
|
this.setBorderPaintedOnlyWhenPressed(true); |
||||||
|
this.setIcon(getIcon()); |
||||||
|
this.setToolTipText(getTipText()); |
||||||
|
this.addActionListener(getActionListener()); |
||||||
} |
} |
||||||
|
|
||||||
@Override |
@Override |
||||||
public UIButton create() { |
public void registerChangeListener(UIObserverListener listener) { |
||||||
UIButton btn = new UIButton(); |
uiObserverListener = listener; |
||||||
btn.setNormalPainted(false); |
} |
||||||
btn.setBorderPaintedOnlyWhenPressed(true); |
|
||||||
btn.setIcon(getIcon()); |
@Override |
||||||
btn.setToolTipText(getTipText()); |
public boolean shouldResponseChangeListener() { |
||||||
btn.addActionListener(getActionListener()); |
return true; |
||||||
return btn; |
|
||||||
} |
} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue