方磊
3 years ago
13 changed files with 88 additions and 50 deletions
@ -1,23 +1,32 @@
|
||||
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.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 UIObserverListener uiObserverListener; |
||||
|
||||
public AbstractMultiSelectionArrangementButton(MultiSelectionArrangement arrangement) { |
||||
super(); |
||||
this.arrangement = arrangement; |
||||
this.setNormalPainted(false); |
||||
this.setBorderPaintedOnlyWhenPressed(true); |
||||
this.setIcon(getIcon()); |
||||
this.setToolTipText(getTipText()); |
||||
this.addActionListener(getActionListener()); |
||||
} |
||||
|
||||
@Override |
||||
public UIButton create() { |
||||
UIButton btn = new UIButton(); |
||||
btn.setNormalPainted(false); |
||||
btn.setBorderPaintedOnlyWhenPressed(true); |
||||
btn.setIcon(getIcon()); |
||||
btn.setToolTipText(getTipText()); |
||||
btn.addActionListener(getActionListener()); |
||||
return btn; |
||||
public void registerChangeListener(UIObserverListener listener) { |
||||
uiObserverListener = listener; |
||||
} |
||||
|
||||
@Override |
||||
public boolean shouldResponseChangeListener() { |
||||
return true; |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue